@tiinex/app 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 +26 -0
- package/docs/CONSUMER-CONTRACT.md +65 -0
- package/package.json +94 -0
- package/src/acceptance/knownScenarios.case.mjs +48 -0
- package/src/acceptance/knownScenarios.js +89 -0
- package/src/acceptance/postV423CanonicalTransitionProductVerticalSlice.case.mjs +774 -0
- package/src/acceptance/postV437M0ETimePortalProductParityClosure.case.mjs +51 -0
- package/src/acceptance/postV447M0FGithubSocialPublicationProductIntegration.case.mjs +33 -0
- package/src/acceptance/postV450M0ProductAcceptanceHardening.case.mjs +82 -0
- package/src/acceptance/postV470SchemaReadingContractMaterializationIdentitySourceCoalescingAuthorityCorrection.case.mjs +236 -0
- package/src/acceptance/recoveryAcceptance.case.mjs +196 -0
- package/src/adapters/adapter.definition.schema.json +33 -0
- package/src/adapters/archive/archive.adapter.case.mjs +212 -0
- package/src/adapters/export/export.adapter.js +79 -0
- package/src/adapters/git-native/git-native.adapter.js +43 -0
- package/src/adapters/github/github.adapter.case.mjs +843 -0
- package/src/adapters/github/github.adapter.js +395 -0
- package/src/adapters/github/github.issueEmbedded.js +262 -0
- package/src/adapters/github/github.issueMirror.js +309 -0
- package/src/adapters/github/github.issueSnapshot.js +475 -0
- package/src/adapters/github/github.issueSurface.js +188 -0
- package/src/adapters/github/github.issueTransport.js +237 -0
- package/src/adapters/github/github.publicationRead.js +24 -0
- package/src/adapters/github/github.readTransport.js +18 -0
- package/src/adapters/github/github.repoDiscovery.js +222 -0
- package/src/adapters/github/github.repoMirror.js +255 -0
- package/src/adapters/github/github.repoProxy.js +276 -0
- package/src/adapters/github/github.repoSurface.js +60 -0
- package/src/adapters/github/github.transportDiagnostics.js +68 -0
- package/src/adapters/local/local.adapter.case.mjs +72 -0
- package/src/adapters/local/local.adapter.js +188 -0
- package/src/adapters/registry.js +35 -0
- package/src/adapters/static/static.adapter.js +84 -0
- package/src/app/App.js +1 -0
- package/src/app/TiinexApp.jsx +822 -0
- package/src/app/appShell.views.jsx +58 -0
- package/src/app/artifactAuthoringCapability.js +49 -0
- package/src/app/boot/bootApp.js +19 -0
- package/src/app/boot/environment.js +1 -0
- package/src/app/canonicalAuthoringValues.js +4 -0
- package/src/app/canonicalCreationProductController.js +57 -0
- package/src/app/canonicalCreationProductSettlement.case.mjs +10 -0
- package/src/app/canonicalCreationProductSettlement.js +11 -0
- package/src/app/canonicalReferenceLocalCreateCommand.js +210 -0
- package/src/app/canonicalReferenceTargets.js +73 -0
- package/src/app/canonicalTransitionLocalCreateCommand.js +217 -0
- package/src/app/defaultWorkspaceStart.case.mjs +39 -0
- package/src/app/defaultWorkspaceStart.js +65 -0
- package/src/app/defaultWorkspaceStartCommand.js +55 -0
- package/src/app/durableLocalMutationPolicy.js +21 -0
- package/src/app/githubMaterializationSummary.js +69 -0
- package/src/app/githubProgress.js +25 -0
- package/src/app/githubSourceInput.js +47 -0
- package/src/app/githubSourceMaterializationCommand.js +97 -0
- package/src/app/githubSourceOperation.js +226 -0
- package/src/app/governanceDialogData.js +27 -0
- package/src/app/handoffPackageImportCommand.js +182 -0
- package/src/app/historyAuthority.js +53 -0
- package/src/app/initialWorkspaceBootstrapOperation.js +105 -0
- package/src/app/lineageCommand.js +118 -0
- package/src/app/lineageSourceRecovery.js +339 -0
- package/src/app/localDraftMutationCommand.js +174 -0
- package/src/app/localMaterialCommand.js +124 -0
- package/src/app/nodeGraphVerse.case.mjs +111 -0
- package/src/app/persistenceOwnership.js +92 -0
- package/src/app/productStateBoundary.js +7 -0
- package/src/app/providers/AppProviders.js +1 -0
- package/src/app/providers/LocaleProvider.js +1 -0
- package/src/app/providers/SchemaRegistryProvider.js +1 -0
- package/src/app/providers/WorkspaceProvider.js +1 -0
- package/src/app/publicTarget.js +251 -0
- package/src/app/publicTargetRestoreCommand.js +149 -0
- package/src/app/recordUi.cache.js +35 -0
- package/src/app/recordUi.js +11 -0
- package/src/app/routes/RouteSurface.js +1 -0
- package/src/app/routes/routes.js +1 -0
- package/src/app/runtimeState.js +54 -0
- package/src/app/schemaCurrentDeclaration.js +69 -0
- package/src/app/schemaFactoryLocalCreateCommand.js +101 -0
- package/src/app/schemaFactoryViewerProof.case.mjs +134 -0
- package/src/app/schemaFactoryViewerProof.js +20 -0
- package/src/app/schemaNavigationCommand.js +285 -0
- package/src/app/schemaNavigationMaterialization.js +171 -0
- package/src/app/schemaNavigationRuntimeCatalog.js +25 -0
- package/src/app/schemaNavigationState.js +66 -0
- package/src/app/schemaReadingContractQualification.js +91 -0
- package/src/app/schemaSourceRecovery.js +373 -0
- package/src/app/scrollPersistence.js +30 -0
- package/src/app/semanticOperationHistory.js +18 -0
- package/src/app/shareActionCommand.js +55 -0
- package/src/app/shareProjection.js +190 -0
- package/src/app/shell/AppShell.js +1 -0
- package/src/app/shell/Header.js +1 -0
- package/src/app/shell/Navigation.js +1 -0
- package/src/app/shell/SurfaceSwitcher.js +1 -0
- package/src/app/sourceTransportRefresh.js +176 -0
- package/src/app/startupOwnership.js +40 -0
- package/src/app/startupPresentation.case.mjs +34 -0
- package/src/app/startupPresentation.js +33 -0
- package/src/app/startupPresentation.views.jsx +21 -0
- package/src/app/startupRenderPhase.js +9 -0
- package/src/app/startupWorkspaceCommand.js +62 -0
- package/src/app/startupWorkspaceConfigApplication.js +49 -0
- package/src/app/statePersistenceScheduler.js +106 -0
- package/src/app/tiinexAppConfigPlan.js +108 -0
- package/src/app/tiinexAppConfigSource.js +349 -0
- package/src/app/tiinexAppStartupSource.js +79 -0
- package/src/app/tiinexHostedWorkspaceConventions.js +572 -0
- package/src/app/timePortalHistoricalRead.js +114 -0
- package/src/app/timePortalSnapshotResolution.js +53 -0
- package/src/app/urlMaterialCommand.js +24 -0
- package/src/app/useCanonicalPlacementSelectionOptions.js +9 -0
- package/src/app/useCanonicalReferenceSelectionOptions.js +8 -0
- package/src/app/useLocalMaterialIntake.js +68 -0
- package/src/app/useTimePortalProductController.jsx +111 -0
- package/src/app/useWorkspaceEntrypointIntake.js +77 -0
- package/src/app/useWorkspaceSelectionProductController.jsx +21 -0
- package/src/app/viewState.js +35 -0
- package/src/app/viewport.js +21 -0
- package/src/app/visualDormancy.js +286 -0
- package/src/app/workspaceContinuityNotices.js +32 -0
- package/src/app/workspaceDisplayCounts.js +9 -0
- package/src/app/workspaceEntrypointIntakeCommand.js +87 -0
- package/src/app/workspaceEntrypointProductRouting.case.mjs +20 -0
- package/src/app/workspaceExportCommand.js +21 -0
- package/src/app/workspaceExportDownload.js +23 -0
- package/src/app/workspaceExportExecutionCommand.js +10 -0
- package/src/app/workspaceGithubPublication.js +237 -0
- package/src/app/workspaceHandoffExport.js +56 -0
- package/src/app/workspaceHomeTarget.js +9 -0
- package/src/app/workspaceMulticolumn.js +113 -0
- package/src/app/workspaceNavigationParity.case.mjs +110 -0
- package/src/app/workspaceOpenProgress.js +26 -0
- package/src/app/workspacePlacementOptions.js +46 -0
- package/src/app/workspaceRecordActions.js +158 -0
- package/src/app/workspaceScopedInteraction.js +68 -0
- package/src/app/workspaceSelectionOriginContext.js +29 -0
- package/src/app/workspaceSelectionSession.js +54 -0
- package/src/app/workspaceSourceCloseCommand.js +25 -0
- package/src/app/workspaceSpineProductRouting.case.mjs +22 -0
- package/src/app/workspaceStartupTransition.js +32 -0
- package/src/app/workspaceWindow.js +85 -0
- package/src/artifacts/artifact.fixture.js +1 -0
- package/src/artifacts/artifact.identity.js +6 -0
- package/src/artifacts/artifact.identityAggregation.js +218 -0
- package/src/artifacts/artifact.model.js +2 -0
- package/src/artifacts/artifact.parse.case.mjs +196 -0
- package/src/artifacts/artifact.participantIndex.js +189 -0
- package/src/artifacts/fixtures/evidence.trace.md +50 -0
- package/src/artifacts/fixtures/topic.trace.md +33 -0
- package/src/artifacts/fixtures/unknown-schema.trace.md +25 -0
- package/src/audit/audit.findings.js +1 -0
- package/src/audit/audit.model.js +2 -0
- package/src/audit/audit.plan.js +13 -0
- package/src/audit/audit.report.js +12 -0
- package/src/audit/audit.severity.js +1 -0
- package/src/audit/audit.traverse.js +119 -0
- package/src/audit/integrity/auditIntegrity.checks.js +1 -0
- package/src/audit/integrity/auditIntegrity.compare.js +1 -0
- package/src/audit/lineage/auditLineage.load.js +1 -0
- package/src/audit/lineage/auditLineage.plan.js +1 -0
- package/src/audit/lineage/auditLineage.resolve.js +12 -0
- package/src/audit/sources/auditSources.boundaries.js +1 -0
- package/src/audit/sources/auditSources.checks.js +1 -0
- package/src/audit/validation/auditValidation.recheck.js +1 -0
- package/src/audit/validation/auditValidation.run.js +1 -0
- package/src/build.identity.js +15 -0
- package/src/commands/command.vocabulary.js +14 -0
- package/src/conformance/conformance.fixtures.js +151 -0
- package/src/conformance/conformance.run.js +238 -0
- package/src/data/applicationDataStore.js +23 -0
- package/src/data/companionAccess.js +35 -0
- package/src/diagnostics/events.js +1 -0
- package/src/diagnostics/invariant.js +1 -0
- package/src/diagnostics/schemaBindingChecks.js +1 -0
- package/src/diagnostics/schemaModuleChecks.js +1 -0
- package/src/diagnostics/sourceBoundaryChecks.js +5 -0
- package/src/diagnostics/sourceTransport.report.js +190 -0
- package/src/discovery/discovery.controls.js +7 -0
- package/src/export/export.plan.js +182 -0
- package/src/export/handoff.plan.js +50 -0
- package/src/export/package.builder.case.mjs +97 -0
- package/src/export/package.controlTopology.case.mjs +130 -0
- package/src/export/package.zip.case.mjs +33 -0
- package/src/graph/artifactGraph.model.js +344 -0
- package/src/graph/artifactGraph.project.js +139 -0
- package/src/graph/artifactGraph.worker.js +10 -0
- package/src/i18n/i18n.keys.js +1 -0
- package/src/i18n/i18n.provider.js +1 -0
- package/src/i18n/i18n.resolve.js +5 -0
- package/src/i18n/locales/en/common.json +4 -0
- package/src/i18n/locales/en/schemas/evidence.json +3 -0
- package/src/i18n/locales/en/schemas/presentation-surface.json +3 -0
- package/src/i18n/locales/en/schemas/preservation.json +3 -0
- package/src/i18n/locales/en/schemas/root.json +3 -0
- package/src/i18n/locales/en/schemas/schema-module.json +3 -0
- package/src/i18n/locales/en/schemas/topic.json +3 -0
- package/src/i18n/locales/en/surfaces/audit.json +3 -0
- package/src/i18n/locales/en/surfaces/create.json +3 -0
- package/src/i18n/locales/en/surfaces/detail.json +3 -0
- package/src/i18n/locales/en/surfaces/display-options.json +3 -0
- package/src/i18n/locales/en/surfaces/edit.json +3 -0
- package/src/i18n/locales/en/surfaces/feed.json +3 -0
- package/src/i18n/locales/en/surfaces/lineage.json +3 -0
- package/src/i18n/locales/en/surfaces/preview.json +3 -0
- package/src/i18n/locales/en/surfaces/share.json +3 -0
- package/src/i18n/locales/en/surfaces/source-settings.json +3 -0
- package/src/i18n/locales/en/surfaces/tree.json +3 -0
- package/src/i18n/locales/sv/common.json +4 -0
- package/src/i18n/locales/sv/schemas/evidence.json +3 -0
- package/src/i18n/locales/sv/schemas/presentation-surface.json +3 -0
- package/src/i18n/locales/sv/schemas/preservation.json +3 -0
- package/src/i18n/locales/sv/schemas/root.json +3 -0
- package/src/i18n/locales/sv/schemas/schema-module.json +3 -0
- package/src/i18n/locales/sv/schemas/topic.json +3 -0
- package/src/i18n/locales/sv/surfaces/audit.json +3 -0
- package/src/i18n/locales/sv/surfaces/create.json +3 -0
- package/src/i18n/locales/sv/surfaces/detail.json +3 -0
- package/src/i18n/locales/sv/surfaces/display-options.json +3 -0
- package/src/i18n/locales/sv/surfaces/edit.json +3 -0
- package/src/i18n/locales/sv/surfaces/feed.json +3 -0
- package/src/i18n/locales/sv/surfaces/lineage.json +3 -0
- package/src/i18n/locales/sv/surfaces/preview.json +3 -0
- package/src/i18n/locales/sv/surfaces/share.json +3 -0
- package/src/i18n/locales/sv/surfaces/source-settings.json +3 -0
- package/src/i18n/locales/sv/surfaces/tree.json +3 -0
- package/src/index.js +10 -0
- package/src/integrity/integrity.testFixture.js +9 -0
- package/src/interaction/interaction.spine.js +12 -0
- package/src/lineage/lineage.audit.js +1 -0
- package/src/lineage/lineage.edges.js +1 -0
- package/src/main.js +319 -0
- package/src/main.jsx +34 -0
- package/src/multiverse/multiverse.model.js +10 -0
- package/src/parity/poc.m1ParityScenarios.js +42 -0
- package/src/parity/poc.parityLedger.js +261 -0
- package/src/publication/publication.githubSocialContract.case.mjs +247 -0
- package/src/publication/publication.preflight.case.mjs +64 -0
- package/src/react/TiinexApplication.jsx +39 -0
- package/src/react/VerseHost.jsx +29 -0
- package/src/react/applicationDataContext.jsx +30 -0
- package/src/react.js +2 -0
- package/src/readers/modes/audit.reader.js +1 -0
- package/src/readers/modes/detail.reader.js +1 -0
- package/src/readers/modes/handover.reader.js +1 -0
- package/src/readers/modes/mobile.reader.js +1 -0
- package/src/readers/modes/print.reader.js +1 -0
- package/src/readers/modes/scan.reader.js +1 -0
- package/src/readers/reader.model.js +1 -0
- package/src/readers/reader.resolve.js +2 -0
- package/src/reingest/reingest.plan.case.mjs +65 -0
- package/src/runtime.js +54 -0
- package/src/schemas/README.md +99 -0
- package/src/schemas/coordination/handoff/tiinex.handoff.v1.schema.md +614 -0
- package/src/schemas/coordination/project/tiinex.project.v1.schema.md +311 -0
- package/src/schemas/core/decision/tiinex.decision.v1.schema.md +227 -0
- package/src/schemas/core/evidence/tiinex.evidence.v1.schema.md +318 -0
- package/src/schemas/core/feedback/tiinex.feedback.v1.schema.md +243 -0
- package/src/schemas/core/interpretation/.transitions/evidence-to-interpretation-transition-definition.trace.md +102 -0
- package/src/schemas/core/interpretation/tiinex.interpretation.v1.schema.md +308 -0
- package/src/schemas/core/preservation/tiinex.preservation.v1.schema.md +312 -0
- package/src/schemas/core/relation/.generation/reference-relation-generation-authority.trace.md +185 -0
- package/src/schemas/core/relation/.transitions/topic-references-task-transition-definition.trace.md +119 -0
- package/src/schemas/core/relation/tiinex.relation.v1.schema.md +240 -0
- package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.schema.md +550 -0
- package/src/schemas/core/signal/tiinex.signal.v1.schema.md +239 -0
- package/src/schemas/core/task/.transitions/create-task-transition-definition.trace.md +93 -0
- package/src/schemas/core/task/.transitions/topic-to-task-transition-definition.trace.md +102 -0
- package/src/schemas/core/task/task-semantic-package.trace.md +53 -0
- package/src/schemas/core/task/tiinex.task.v1-transitions.trace.md +33 -0
- package/src/schemas/core/task/tiinex.task.v1.authoring.js +65 -0
- package/src/schemas/core/task/tiinex.task.v1.schema.md +229 -0
- package/src/schemas/core/topic/.transitions/create-topic-transition-definition.trace.md +93 -0
- package/src/schemas/core/topic/tiinex.topic.v1-transitions.trace.md +33 -0
- package/src/schemas/core/topic/tiinex.topic.v1.schema.md +197 -0
- package/src/schemas/core/topic/topic-semantic-package.trace.md +53 -0
- package/src/schemas/discovery/finding/tiinex.discovery.finding.v1.schema.md +240 -0
- package/src/schemas/discovery/tiinex.discovery.v1.schema.md +294 -0
- package/src/schemas/manifest.json +367 -0
- package/src/schemas/origins.js +46 -0
- package/src/schemas/party/organization/tiinex.party.organization.v1.schema.md +290 -0
- package/src/schemas/party/role/tiinex.party.role.v1.schema.md +298 -0
- package/src/schemas/party/tiinex.party.v1.schema.js +14 -0
- package/src/schemas/party/tiinex.party.v1.schema.json +23 -0
- package/src/schemas/party/tiinex.party.v1.schema.md +311 -0
- package/src/schemas/party/tiinex.party.v1.schema.runtime.json +2033 -0
- package/src/schemas/party/tiinex.party.v1.schema.source.js +9 -0
- package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.schema.md +476 -0
- package/src/schemas/reduction/tiinex.reduction.v1.schema.md +248 -0
- package/src/schemas/schema/module/tiinex.schema.module.v1.schema.md +465 -0
- package/src/schemas/schema.companionContract.case.mjs +259 -0
- package/src/schemas/schema.factory.case.mjs +256 -0
- package/src/schemas/schema.factory.viewerProjection.js +183 -0
- package/src/schemas/schemaMarkdownCatalog.js +19 -0
- package/src/schemas/tiinex.root.v1.schema.md +865 -0
- package/src/schemas/validation/finding/tiinex.validation.finding.v1.schema.md +309 -0
- package/src/schemas/validation/method/tiinex.validation.method.v1.schema.md +280 -0
- package/src/schemas/validation/report/tiinex.validation.report.v1.schema.md +300 -0
- package/src/schemas/workspace/tiinex.workspace.v1.schema.md +486 -0
- package/src/schemas/workspace/workspace.add.views.jsx +327 -0
- package/src/schemas/workspace/workspace.audit.views.jsx +160 -0
- package/src/schemas/workspace/workspace.auditBadge.views.jsx +98 -0
- package/src/schemas/workspace/workspace.canonicalReferenceDialog.views.jsx +63 -0
- package/src/schemas/workspace/workspace.canonicalTaskDialog.views.jsx +169 -0
- package/src/schemas/workspace/workspace.cardActions.js +9 -0
- package/src/schemas/workspace/workspace.cards.views.jsx +146 -0
- package/src/schemas/workspace/workspace.chrome.views.jsx +299 -0
- package/src/schemas/workspace/workspace.continuationDialog.views.jsx +80 -0
- package/src/schemas/workspace/workspace.discovery.views.jsx +63 -0
- package/src/schemas/workspace/workspace.discoveryRenderWindow.js +56 -0
- package/src/schemas/workspace/workspace.displayOptions.views.jsx +114 -0
- package/src/schemas/workspace/workspace.entrypointChoice.views.jsx +30 -0
- package/src/schemas/workspace/workspace.exportDialog.controller.jsx +40 -0
- package/src/schemas/workspace/workspace.exportDialog.views.jsx +142 -0
- package/src/schemas/workspace/workspace.governance.views.jsx +45 -0
- package/src/schemas/workspace/workspace.graph.views.jsx +134 -0
- package/src/schemas/workspace/workspace.lineage.views.jsx +307 -0
- package/src/schemas/workspace/workspace.read.views.jsx +105 -0
- package/src/schemas/workspace/workspace.recordActionButton.views.jsx +35 -0
- package/src/schemas/workspace/workspace.recordDialogs.views.jsx +257 -0
- package/src/schemas/workspace/workspace.selection.views.jsx +14 -0
- package/src/schemas/workspace/workspace.sourceReceipt.views.jsx +40 -0
- package/src/schemas/workspace/workspace.timePortal.views.jsx +56 -0
- package/src/schemas/workspace/workspace.tree.views.jsx +107 -0
- package/src/schemas/workspace/workspace.viewFormatting.js +172 -0
- package/src/schemas/workspace/workspace.views.jsx +210 -0
- package/src/source-settings/sourceSettings.model.js +7 -0
- package/src/sources/draft/draft.source.js +1 -0
- package/src/sources/github/github.loader.js +204 -0
- package/src/sources/github/github.permalink.js +1 -0
- package/src/sources/github/github.source.js +1 -0
- package/src/sources/github/github.transport.case.mjs +237 -0
- package/src/sources/github/github.transport.js +472 -0
- package/src/sources/local/local.source.js +1 -0
- package/src/sources/source.assetReferences.js +109 -0
- package/src/sources/source.boundaries.js +24 -0
- package/src/sources/source.identity.js +56 -0
- package/src/sources/source.model.case.mjs +26 -0
- package/src/sources/source.model.js +56 -0
- package/src/sources/source.presenter.js +66 -0
- package/src/sources/source.resolve.js +11 -0
- package/src/sources/static/static.source.js +1 -0
- package/src/sources/transport.policy.case.mjs +39 -0
- package/src/sources/transport.policy.js +81 -0
- package/src/storage/storage.policy.js +79 -0
- package/src/styles/app.css +8699 -0
- package/src/styles/responsive.css +10 -0
- package/src/styles/theme.css +4 -0
- package/src/styles/tokens.css +30 -0
- package/src/surfaces/audit/AuditSurface.js +1 -0
- package/src/surfaces/audit/audit.model.js +1 -0
- package/src/surfaces/audit/audit.render.js +1 -0
- package/src/surfaces/contracts.js +45 -0
- package/src/surfaces/create/CreateSurface.js +1 -0
- package/src/surfaces/create/create.model.js +1 -0
- package/src/surfaces/create/create.render.js +1 -0
- package/src/surfaces/detail/DetailSurface.js +1 -0
- package/src/surfaces/detail/detail.model.js +1 -0
- package/src/surfaces/detail/detail.render.js +1 -0
- package/src/surfaces/display-options/DisplayOptionsSurface.js +1 -0
- package/src/surfaces/display-options/displayOptions.model.js +1 -0
- package/src/surfaces/display-options/displayOptions.render.js +1 -0
- package/src/surfaces/edit/EditSurface.js +1 -0
- package/src/surfaces/edit/edit.model.js +1 -0
- package/src/surfaces/edit/edit.render.js +1 -0
- package/src/surfaces/feed/FeedSurface.js +1 -0
- package/src/surfaces/feed/feed.model.js +1 -0
- package/src/surfaces/feed/feed.render.js +1 -0
- package/src/surfaces/lineage/LineageSurface.js +1 -0
- package/src/surfaces/lineage/lineage.model.js +1 -0
- package/src/surfaces/lineage/lineage.render.js +1 -0
- package/src/surfaces/preview/PreviewSurface.js +1 -0
- package/src/surfaces/preview/preview.model.js +1 -0
- package/src/surfaces/preview/preview.render.js +1 -0
- package/src/surfaces/registry.js +58 -0
- package/src/surfaces/share/ShareSurface.js +1 -0
- package/src/surfaces/share/share.model.js +1 -0
- package/src/surfaces/share/share.render.js +1 -0
- package/src/surfaces/source-settings/SourceSettingsSurface.js +1 -0
- package/src/surfaces/source-settings/sourceSettings.model.js +1 -0
- package/src/surfaces/source-settings/sourceSettings.render.js +1 -0
- package/src/surfaces/surfaceContext.js +1 -0
- package/src/surfaces/tree/TreeSurface.js +1 -0
- package/src/surfaces/tree/tree.model.js +1 -0
- package/src/surfaces/tree/tree.render.js +1 -0
- package/src/tooling/portable/adapters/cli/cli.common-output.case.mjs +153 -0
- package/src/tooling/portable/adapters/cli/cli.handoff-sibling-allocation.case.mjs +52 -0
- package/src/tooling/portable/adapters/cli/cli.run.case.mjs +372 -0
- package/src/tooling/portable/adapters/cli/cli.summaryProjection.case.mjs +46 -0
- package/src/tooling/portable/audit/audit.capability.case.mjs +45 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/collaboration/dogfood/001-tiinex-development-dogfood-collaboration-model.trace.fixture.txt +37 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/handoff/tooling/001-v480-tooling-workflow-schema-enablement-handoff.trace.fixture.txt +108 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/handoff/tooling/002-v481-tooling-recipient-relative-handoff-material-closure-planner-foundation-handoff.trace.fixture.txt +130 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/loom/role/001-loom-role.trace.fixture.txt +61 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/sigma/role/001-1-sigma-role.trace.fixture.txt +61 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-1-1-1-1-1-1-1-site-tooling-v474-loaded-parent-identity-evidence-closure-result.trace.fixture.txt +48 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-1-1-1-1-1-1-site-tooling-v474-loaded-parent-identity-evidence-closure.trace.fixture.txt +48 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-1-1-1-1-1-site-tooling-v473-portable-parent-authority-coherence-metadata-fidelity-closure-result.trace.fixture.txt +48 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-1-1-1-1-site-tooling-v473-portable-parent-authority-coherence-metadata-fidelity-closure.trace.fixture.txt +48 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-1-1-1-site-tooling-v472-portable-exact-authoring-fidelity-closure-result.trace.fixture.txt +48 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-1-1-site-tooling-v472-portable-exact-authoring-fidelity-closure.trace.fixture.txt +48 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-1-site-tooling-v471-portable-lineage-authoring-closure-result.trace.fixture.txt +48 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-site-tooling-v471-portable-lineage-authoring-closure.trace.fixture.txt +39 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/002-1-v475-canonical-artifact-envelope-reference-integrity-validation.trace.fixture.txt +43 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/003-1-v476-canonical-authority-binding-integrity-method-lineage-alloca.trace.fixture.txt +42 -0
- package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/027-handoff-package-workspace-archive-and-control-plane-minimality-audit.trace.fixture.txt +56 -0
- package/src/tooling/portable/fixtures/legacyArtifactFixtures.mjs +34 -0
- package/src/tooling/portable/grounding/grounding.capsule.case.mjs +65 -0
- package/src/tooling/portable/grounding/grounding.readiness.case.mjs +543 -0
- package/src/tooling/portable/grounding/grounding.semanticIntegration.case.mjs +131 -0
- package/src/tooling/portable/handoff/boundedWorkspaceRepresentation.case.mjs +103 -0
- package/src/tooling/portable/handoff/carrierLineage.fixedWidth.case.mjs +97 -0
- package/src/tooling/portable/handoff/coldStartQualification.case.mjs +293 -0
- package/src/tooling/portable/handoff/fixtures/027-invalid-audit-result.fixture.txt +192 -0
- package/src/tooling/portable/handoff/fixtures/027-invalid-return-handoff.fixture.txt +92 -0
- package/src/tooling/portable/handoff/fixtures/cold-start-qualification.v1.examples.json +60 -0
- package/src/tooling/portable/handoff/handoff.manufacture.case.mjs +293 -0
- package/src/tooling/portable/handoff/materialClosure.case.mjs +727 -0
- package/src/tooling/portable/handoff/multiRootManufacture.case.mjs +615 -0
- package/src/tooling/portable/handoff/operatorBridgeCore.case.mjs +205 -0
- package/src/tooling/portable/handoff/workspaceLandingPlan.case.mjs +143 -0
- package/src/tooling/portable/input/node.input.case.mjs +293 -0
- package/src/tooling/portable/lifecycle/lifecycle.readiness.case.mjs +179 -0
- package/src/tooling/portable/lineage/fixtures/lineage.integrity.repair-projection.v1.examples.json +605 -0
- package/src/tooling/portable/lineage/lineage.integrity.shared-capability.case.mjs +37 -0
- package/src/tooling/portable/lineage/publicationProviderReceipt.fixture.mjs +50 -0
- package/src/tooling/portable/package/fixtures/reference-relation-generation-authority.trace.md +84 -0
- package/src/tooling/portable/package/fixtures/tiinex.root.v1.package-authority.contract-fixture.md +64 -0
- package/src/tooling/portable/package/fixtures/tiinex.schema.generation.v1.generation-binding.contract-fixture.md +140 -0
- package/src/tooling/portable/package/fixtures/tiinex.schema.transition.companion.v1.contract-fixture.md +73 -0
- package/src/tooling/portable/package/fixtures/tiinex.semantic.package.v1.contract-fixture.md +147 -0
- package/src/tooling/portable/package/fixtures/tiinex.transition.definition.v1.package-contract-fixture.md +77 -0
- package/src/tooling/portable/providers/schema.providers.genericity.case.mjs +31 -0
- package/src/tooling/portable/reduction/reduction.preflight.case.mjs +298 -0
- package/src/tooling/portable/schema/fixtures/evidence-preservation-body.inheritance-record-fixture.md +65 -0
- package/src/tooling/portable/schema/fixtures/tiinex.portal.time.v1.contract-fixture.md +294 -0
- package/src/tooling/portable/schema/fixtures/tiinex.root.v1.contract-fixture.md +584 -0
- package/src/tooling/portable/schema/fixtures/tiinex.root.v1.machine-shape.contract-fixture.md +44 -0
- package/src/tooling/portable/schema/fixtures/tiinex.root.v1.ordinary-target.contract-fixture.md +630 -0
- package/src/tooling/portable/schema/fixtures/tiinex.schema.contract.v1.repeated-record.contract-fixture.md +69 -0
- package/src/tooling/portable/schema/fixtures/tiinex.schema.generation.v1.repeated-record.contract-fixture.md +98 -0
- package/src/tooling/portable/schema/fixtures/tiinex.schema.inheritance.v1.repeated-record.contract-fixture.md +58 -0
- package/src/tooling/portable/schema/fixtures/tiinex.task.v1.contract-fixture.md +165 -0
- package/src/tooling/portable/schema/fixtures/tiinex.transition.definition.v1.contract-fixture.md +744 -0
- package/src/tooling/portable/schema/fixtures/tiinex.transition.definition.v1.field-domain.contract-fixture.md +319 -0
- package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.relation.v1.schema.md +240 -0
- package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.schema.contract.v1.schema.md +391 -0
- package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.schema.generation.v1.schema.md +379 -0
- package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.schema.transition.companion.v1.schema.md +265 -0
- package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.semantic.package.v1.schema.md +402 -0
- package/src/transitions/canonical-schema-cache/52ecdea0a75893882ce282214d155f70e1309c2a/tiinex.topic.v1.schema.md +197 -0
- package/src/transitions/canonical-schema-cache/d69b8ff55a56b8cb9282b8684db6a938a4435b94/tiinex.root.v1.schema.md +797 -0
- package/src/transitions/canonical-schema-cache/d69b8ff55a56b8cb9282b8684db6a938a4435b94/tiinex.transition.definition.v1.schema.md +1062 -0
- package/src/transitions/canonicalTransition.packageContracts.js +22 -0
- package/src/transitions/canonicalTransition.productDefaults.js +105 -0
- package/src/transitions/canonicalTransition.schemaCache.case.mjs +45 -0
- package/src/transitions/canonicalTransition.schemaCache.js +81 -0
- package/src/transitions/canonicalTransition.semanticPackage.js +146 -0
- package/src/transitions/record.transitions.case.mjs +88 -0
- package/src/transitions/transition.authorityRepresentation.js +55 -0
- package/src/transitions/transition.availabilityPlanner.js +376 -0
- package/src/transitions/transition.availabilitySemantics.js +150 -0
- package/src/transitions/transition.definitionReadProjection.js +107 -0
- package/src/transitions/transition.definitionRegistry.js +355 -0
- package/src/transitions/transition.definitionRegistryAggregation.js +21 -0
- package/src/transitions/transition.definitions.js +46 -0
- package/src/transitions/transition.explicitGenerationPlanner.js +58 -0
- package/src/transitions/transition.generationInputPlanner.js +19 -0
- package/src/transitions/transition.interpretationMaterializer.js +2 -0
- package/src/transitions/transition.invocationBindingPacket.js +52 -0
- package/src/transitions/transition.invocationBindingPlanner.js +467 -0
- package/src/transitions/transition.legacyShorthand.js +133 -0
- package/src/transitions/transition.localArtifactMaterializers.js +16 -0
- package/src/transitions/transition.localCreateCapability.js +111 -0
- package/src/transitions/transition.outputMaterializationPlanner.js +336 -0
- package/src/transitions/transition.parentReference.js +90 -0
- package/src/transitions/transition.presentation.js +43 -0
- package/src/transitions/transition.productPreparation.js +377 -0
- package/src/transitions/transition.productPresentation.browser.js +28 -0
- package/src/transitions/transition.productPresentation.js +55 -0
- package/src/transitions/transition.referenceCreateCapability.js +119 -0
- package/src/transitions/transition.referenceTarget.js +50 -0
- package/src/transitions/transition.relationMaterializer.js +2 -0
- package/src/transitions/transition.resultSemantics.js +453 -0
- package/src/transitions/transition.taskMaterializer.js +2 -0
- package/src/transitions/transition.topicMaterializer.js +2 -0
- package/src/transitions/transition.validate.case.mjs +58 -0
- package/src/ui/cards/ArtifactCard.js +1 -0
- package/src/ui/cards/SchemaCard.js +1 -0
- package/src/ui/cards/SourceCard.js +1 -0
- package/src/ui/dialog.presenter.js +24 -0
- package/src/ui/feedback/DegradedNotice.js +1 -0
- package/src/ui/feedback/EmptyState.js +1 -0
- package/src/ui/feedback/ValidationNotice.js +1 -0
- package/src/ui/forms/FormRenderer.js +1 -0
- package/src/ui/forms/fields/MarkdownField.js +1 -0
- package/src/ui/forms/fields/SelectField.js +1 -0
- package/src/ui/forms/fields/SourcePickerField.js +1 -0
- package/src/ui/forms/fields/TextField.js +1 -0
- package/src/ui/icon.paths.js +37 -0
- package/src/ui/layout/Panel.js +1 -0
- package/src/ui/layout/ResponsiveFrame.js +1 -0
- package/src/ui/layout/SplitView.js +1 -0
- package/src/ui/layout/Stack.js +1 -0
- package/src/ui/panels/DetailPanel.js +1 -0
- package/src/ui/panels/LineagePanel.js +1 -0
- package/src/ui/panels/SourcePanel.js +1 -0
- package/src/ui/primitives/Badge.js +1 -0
- package/src/ui/primitives/Badge.jsx +5 -0
- package/src/ui/primitives/Button.js +1 -0
- package/src/ui/primitives/Button.jsx +12 -0
- package/src/ui/primitives/Card.js +1 -0
- package/src/ui/primitives/Field.js +1 -0
- package/src/ui/primitives/Field.jsx +21 -0
- package/src/ui/primitives/Icon.jsx +90 -0
- package/src/ui/primitives/Modal.jsx +27 -0
- package/src/validation/i18n.js +37 -0
- package/src/validation/validateArtifact.case.mjs +41 -0
- package/src/verses/column/ColumnVerse.js +1 -0
- package/src/verses/column/column.model.js +6 -0
- package/src/verses/column/column.project.js +7 -0
- package/src/verses/context.js +26 -0
- package/src/verses/contracts.js +1 -0
- package/src/verses/hostRegistry.js +47 -0
- package/src/verses/registry.js +22 -0
- package/src/verses/universe.model.js +8 -0
- package/src/verses/universe.presenter.js +8 -0
- package/src/verses/universe.project.js +12 -0
- package/src/viewer.js +34 -0
- package/src/workspace.model.js +5 -0
- package/src/workspaces/workspace.actions.js +1 -0
- package/src/workspaces/workspace.artifactActions.js +56 -0
- package/src/workspaces/workspace.auditView.js +153 -0
- package/src/workspaces/workspace.candidates.js +149 -0
- package/src/workspaces/workspace.config.js +153 -0
- package/src/workspaces/workspace.configuredSource.js +68 -0
- package/src/workspaces/workspace.discoveryProgress.js +34 -0
- package/src/workspaces/workspace.discoveryView.js +386 -0
- package/src/workspaces/workspace.displayFilters.js +63 -0
- package/src/workspaces/workspace.displayOptions.js +58 -0
- package/src/workspaces/workspace.emptyStateCopy.js +24 -0
- package/src/workspaces/workspace.entrypointLifecycle.js +131 -0
- package/src/workspaces/workspace.entrypointViewIntent.js +83 -0
- package/src/workspaces/workspace.entrypoints.js +157 -0
- package/src/workspaces/workspace.feedSort.js +152 -0
- package/src/workspaces/workspace.import.js +212 -0
- package/src/workspaces/workspace.importConflicts.js +200 -0
- package/src/workspaces/workspace.importLifecycle.case.mjs +103 -0
- package/src/workspaces/workspace.lifecycle.case.mjs +353 -0
- package/src/workspaces/workspace.lifecycle.js +357 -0
- package/src/workspaces/workspace.lineageView.js +244 -0
- package/src/workspaces/workspace.localSourceLifecycle.js +91 -0
- package/src/workspaces/workspace.materialLedger.js +110 -0
- package/src/workspaces/workspace.materialReconciliation.case.mjs +164 -0
- package/src/workspaces/workspace.materialReconciliation.js +390 -0
- package/src/workspaces/workspace.memberIdentity.js +140 -0
- package/src/workspaces/workspace.model.js +2 -0
- package/src/workspaces/workspace.navigation.js +20 -0
- package/src/workspaces/workspace.openSemantics.js +33 -0
- package/src/workspaces/workspace.pathTree.js +132 -0
- package/src/workspaces/workspace.persistence.case.mjs +271 -0
- package/src/workspaces/workspace.persistence.js +469 -0
- package/src/workspaces/workspace.persistenceCache.js +41 -0
- package/src/workspaces/workspace.persistenceClear.js +45 -0
- package/src/workspaces/workspace.persistencePresentation.js +93 -0
- package/src/workspaces/workspace.persistenceRecovery.js +147 -0
- package/src/workspaces/workspace.persistenceRouteCache.js +82 -0
- package/src/workspaces/workspace.publicationReceipts.case.mjs +36 -0
- package/src/workspaces/workspace.publicationReceipts.js +56 -0
- package/src/workspaces/workspace.recoverabilityView.js +264 -0
- package/src/workspaces/workspace.route.js +432 -0
- package/src/workspaces/workspace.runtimeCanonical.js +18 -0
- package/src/workspaces/workspace.sourceMaterial.js +71 -0
- package/src/workspaces/workspace.sourceRecordPath.js +5 -0
- package/src/workspaces/workspace.sourceRecords.js +75 -0
- package/src/workspaces/workspace.store.js +3 -0
- package/src/workspaces/workspace.summary.js +116 -0
- package/src/workspaces/workspace.timePortal.js +137 -0
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { prepareNodeHandoffManufacturingInput } from '@tiinex/core/tooling/portable/adapters/node/handoff.manufacture.js';
|
|
6
|
+
import { preparePackageParentWorkspaceReuse } from '@tiinex/core/tooling/portable/adapters/node/handoff.manufacture.packageParent.js';
|
|
7
|
+
import { entryFromEnumeration } from '@tiinex/core/tooling/portable/adapters/node/handoff.manufacture.requirements.js';
|
|
8
|
+
import { safeWorkspaceToken } from '@tiinex/core/tooling/portable/adapters/node/handoff.manufacture.multiRoot.js';
|
|
9
|
+
import { runPortableCli } from '@tiinex/core/tooling/portable/adapters/cli/cli.run.js';
|
|
10
|
+
import { groundContinuationOperationInput, materializeGroundWorkspaceCliOutput } from '@tiinex/core/tooling/portable/adapters/cli/cli.ground-materialize.js';
|
|
11
|
+
import { manufactureRecipientRelativeHandoffPackage } from '@tiinex/core/tooling/portable/handoff/manufacture.js';
|
|
12
|
+
import { qualifyPortableColdStart } from '@tiinex/core/tooling/portable/handoff/coldStartQualification.js';
|
|
13
|
+
import { qualifiedHandoffFixture } from '@tiinex/core/tooling/portable/handoff/qualifiedHandoffFixture.js';
|
|
14
|
+
import { packageFileBytes, sha256Hex } from '@tiinex/core/export/package.bytes.js';
|
|
15
|
+
import { zipBufferToImportEntries } from '@tiinex/core/adapters/archive/archive.adapter.js';
|
|
16
|
+
import { sealC14nV2Self } from '@tiinex/core/integrity/integrity.c14nV2.js';
|
|
17
|
+
import { virtualCacheMaterial } from '@tiinex/core/tooling/portable/handoff/recipientV2.inspect.helpers.js';
|
|
18
|
+
import { C14N_V2_VALIDATOR_TARGET } from '@tiinex/core/integrity/integrity.methodReference.js';
|
|
19
|
+
import { recipientFacingV2PackageZipBuffer } from '@tiinex/core/tooling/portable/output/recipientV2.zip.js';
|
|
20
|
+
import { loadNodePortableInput } from '@tiinex/core/tooling/portable/input/node.input.js';
|
|
21
|
+
import { inspectRecipientFacingV2Topology } from '@tiinex/core/tooling/portable/handoff/recipientV2.inspect.js';
|
|
22
|
+
import { projectHandoffHumanOutput } from '@tiinex/core/tooling/portable/handoff/carrierProjection.js';
|
|
23
|
+
import { projectRecipientV2HumanOutput } from '@tiinex/core/tooling/portable/handoff/recipientV2.humanOutput.js';
|
|
24
|
+
|
|
25
|
+
const root = await mkdtemp(path.join(os.tmpdir(), 'tiinex-multi-root-'));
|
|
26
|
+
try {
|
|
27
|
+
const siteRoot = path.join(root, 'site');
|
|
28
|
+
const docsRoot = path.join(root, 'docs');
|
|
29
|
+
const runtimeRoot = path.join(root, 'runtime');
|
|
30
|
+
await makeWorkspace(siteRoot, 'Site', 'Loom', 'site-context.md', [10, 11, 12]);
|
|
31
|
+
await makeWorkspace(docsRoot, 'Docs', 'Axiom', 'docs-context.md', [0, 1, 2, 255, 128]);
|
|
32
|
+
await makeRuntime(runtimeRoot);
|
|
33
|
+
|
|
34
|
+
const secondaryOnlyInput = await prepareNodeHandoffManufacturingInput({
|
|
35
|
+
workspaceRoot: siteRoot,
|
|
36
|
+
workspaceId: 'site',
|
|
37
|
+
workspaceTargetPath: 'workspace.workspace.md',
|
|
38
|
+
handoffPath: '.topics/015-handoff.trace.md',
|
|
39
|
+
additionalWorkspaces: [{ id: 'docs', root: docsRoot, title: 'Docs', workspaceTargetPath: 'workspace.workspace.md' }],
|
|
40
|
+
handoffRoutes: [{ workspaceId: 'docs', path: '.topics/015-handoff.trace.md' }],
|
|
41
|
+
toolingBootstrap: 'embedded',
|
|
42
|
+
runtimeRoot
|
|
43
|
+
});
|
|
44
|
+
assert.deepEqual(secondaryOnlyInput.workspaceMaterializations.map((item) => item.id), ['site', 'docs']);
|
|
45
|
+
assert.equal(secondaryOnlyInput.manufacturingEvidence.workspaceEnumerations.length, 2);
|
|
46
|
+
assert.equal(secondaryOnlyInput.workspaceMaterializations[1].source.authority, 'none');
|
|
47
|
+
const secondaryOnly = manufactureRecipientRelativeHandoffPackage(secondaryOnlyInput, { legacyRecipientV2Compatibility: true, packageInput: { builtAt: '2026-08-23T18:00:00.000Z' } });
|
|
48
|
+
assert.equal(secondaryOnly.status, 'ready');
|
|
49
|
+
assert.equal(secondaryOnly.carrierProjection.routes.length, 1);
|
|
50
|
+
assert.equal(secondaryOnly.carrierProjection.routes[0].workspaceId, 'docs');
|
|
51
|
+
assert.equal(secondaryOnly.carrierProjection.routes[0].workspaceRelativePath, '.topics/015-handoff.trace.md');
|
|
52
|
+
assert.equal(secondaryOnly.carrierProjection.workspaces.length, 2, 'a carried workspace may intentionally have no route');
|
|
53
|
+
const docsBinding = secondaryOnly.descriptor.workspaceArchiveBindings.find((binding) => binding.workspaceId === 'docs');
|
|
54
|
+
assert(docsBinding, 'secondary Workspace must have one recipient-v2 archive binding');
|
|
55
|
+
const docsArchive = secondaryOnly.bundle.files.find((file) => file.path === docsBinding.representation.packagePath);
|
|
56
|
+
assert(docsArchive, 'secondary Workspace archive must be carried');
|
|
57
|
+
const docsEntries = await zipBufferToImportEntries(packageFileBytes(docsArchive), { source: 'multi-root-docs-workspace', excludeRepositoryInternals: true });
|
|
58
|
+
assert.equal(docsEntries.errors.length, 0);
|
|
59
|
+
const docsBlob = docsEntries.entries.find((entry) => entry.path === 'content/blob.bin');
|
|
60
|
+
assert(docsBlob, 'secondary binary bytes must remain addressable inside the Workspace archive');
|
|
61
|
+
assert.deepEqual([...docsBlob.bytes], [0, 1, 2, 255, 128], 'secondary binary bytes must survive package manufacture');
|
|
62
|
+
|
|
63
|
+
const twoRoutesInput = await prepareNodeHandoffManufacturingInput({
|
|
64
|
+
workspaceRoot: siteRoot,
|
|
65
|
+
workspaceId: 'site',
|
|
66
|
+
workspaceTargetPath: 'workspace.workspace.md',
|
|
67
|
+
handoffPath: '.topics/015-handoff.trace.md',
|
|
68
|
+
additionalWorkspaces: [{ id: 'docs', root: docsRoot, workspaceTargetPath: 'workspace.workspace.md' }],
|
|
69
|
+
handoffRoutes: [
|
|
70
|
+
{ workspaceId: 'site', path: '.topics/015-handoff.trace.md' },
|
|
71
|
+
{ workspaceId: 'docs', path: '.topics/015-handoff.trace.md' }
|
|
72
|
+
],
|
|
73
|
+
toolingBootstrap: 'embedded',
|
|
74
|
+
runtimeRoot
|
|
75
|
+
});
|
|
76
|
+
const twoRoutes = manufactureRecipientRelativeHandoffPackage(twoRoutesInput, { legacyRecipientV2Compatibility: true, packageInput: { builtAt: '2026-08-23T18:00:00.000Z' } });
|
|
77
|
+
assert.equal(twoRoutes.status, 'ready');
|
|
78
|
+
assert.equal(twoRoutes.carrierProjection.mode, 'shared');
|
|
79
|
+
assert.deepEqual(twoRoutes.carrierProjection.routes.map((route) => route.workspaceId).sort(), ['docs', 'site']);
|
|
80
|
+
assert.equal(twoRoutes.pointerEntrypointProjection.entries.length, 2);
|
|
81
|
+
assert.equal(twoRoutes.inspection.format, 'tiinex-recipient-facing-handoff-v2-flat');
|
|
82
|
+
const legacyParentReuse = preparePackageParentWorkspaceReuse({
|
|
83
|
+
bundle: twoRoutes.bundle,
|
|
84
|
+
currentWorkspaceIds: ['site'],
|
|
85
|
+
parentPackagePath: path.join(root, 'legacy-shared-parent.zip'),
|
|
86
|
+
parentPackageSha256: '9'.repeat(64)
|
|
87
|
+
});
|
|
88
|
+
assert.equal(legacyParentReuse.state, 'qualified', 'valid recipient-v2-flat parent carriers must expose their already-qualified complete Workspace providers for child reuse');
|
|
89
|
+
assert.deepEqual(legacyParentReuse.inherited.map((item) => item.id), ['docs']);
|
|
90
|
+
const sharedHumanOutput = projectHandoffHumanOutput({ projection: twoRoutes.carrierProjection, route: 'handoff-route:site:.topics/015-handoff.trace.md' });
|
|
91
|
+
assert.equal(sharedHumanOutput.status, 'ready');
|
|
92
|
+
assert.match(sharedHumanOutput.primary.filename, /anchor-to-axiom-and-loom\.handoff-package\.zip$/, 'shared outer filename must include every recipient in deterministic qualified-route order');
|
|
93
|
+
assert.equal(sharedHumanOutput.sharedRouting.routes.length, 2, 'one shared human projection must expose one exact transport text per qualified route');
|
|
94
|
+
assert.equal(sharedHumanOutput.sharedRouting.selectionAuthority, 'exact-qualified-route-only');
|
|
95
|
+
assert.equal(sharedHumanOutput.sharedRouting.siblingInference, false);
|
|
96
|
+
const unselectedSharedHumanOutput = projectHandoffHumanOutput({ projection: twoRoutes.carrierProjection });
|
|
97
|
+
assert.equal(unselectedSharedHumanOutput.status, 'selection-required', 'read-only shared routing projection must not silently select a sibling route');
|
|
98
|
+
assert.equal(unselectedSharedHumanOutput.sharedRouting.routes.length, 2);
|
|
99
|
+
assert.equal(unselectedSharedHumanOutput.sharedRouting.primary.filename, sharedHumanOutput.primary.filename, 'every route text must address the same shared package filename');
|
|
100
|
+
const exactSharedRecipientOutput = projectRecipientV2HumanOutput(unselectedSharedHumanOutput, twoRoutes.inspection || inspectRecipientFacingV2Topology(twoRoutes.bundle));
|
|
101
|
+
assert.equal(exactSharedRecipientOutput.status, 'selection-required');
|
|
102
|
+
assert.equal(exactSharedRecipientOutput.sharedRouting.routes.length, 2);
|
|
103
|
+
assert(exactSharedRecipientOutput.sharedRouting.routes.every((route) => /Start:\n001-1-READ-BEFORE-PROCEEDING\.trace\.md/.test(route.transportText)), 'each shared route text must retain the fixed Start artifact');
|
|
104
|
+
assert(exactSharedRecipientOutput.sharedRouting.routes.every((route) => /Continue from .*:\n[^\n]+handoff-pointer\.trace\.md/.test(route.transportText)), 'each shared route text must carry one exact package-local Continue-from pointer');
|
|
105
|
+
const sharedMultiRouteContinuedRoot = path.join(root, 'continued-shared-multi-route-site');
|
|
106
|
+
const sharedMultiRouteContinued = await materializeGroundWorkspaceCliOutput({
|
|
107
|
+
readiness: { state: 'grounded-to-act' },
|
|
108
|
+
authority: { route: { workspaceId: 'site' } }
|
|
109
|
+
}, { bundle: twoRoutes.bundle }, { continue: sharedMultiRouteContinuedRoot });
|
|
110
|
+
assert.equal(sharedMultiRouteContinued.continuationMaterialization.state, 'materialized');
|
|
111
|
+
assert.equal(sharedMultiRouteContinued.continuationMaterialization.workspaceId, 'site');
|
|
112
|
+
assert.equal(await readFile(path.join(sharedMultiRouteContinuedRoot, '.topics', 'site-context.md'), 'utf8'), '# Site context\n', 'generic recipient-v2 multi-route continuation must materialize the explicitly selected Workspace');
|
|
113
|
+
|
|
114
|
+
const longPrefix = 'required-context:' + 'shared-route-material-'.repeat(8);
|
|
115
|
+
const longCache = {
|
|
116
|
+
facts: {
|
|
117
|
+
workspaceId: 'site',
|
|
118
|
+
materials: [
|
|
119
|
+
{ requirementId: `${longPrefix}alpha`, archiveEntry: 'material/1.bin', bytes: 1, sha256: 'a' },
|
|
120
|
+
{ requirementId: `${longPrefix}beta`, archiveEntry: 'material/2.bin', bytes: 1, sha256: 'b' }
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
archive: { archive: { entries: [
|
|
124
|
+
{ path: 'material/1.bin', data: Uint8Array.from([1]), bytes: 1, sha256: 'a' },
|
|
125
|
+
{ path: 'material/2.bin', data: Uint8Array.from([2]), bytes: 1, sha256: 'b' }
|
|
126
|
+
] } }
|
|
127
|
+
};
|
|
128
|
+
const longCacheProjection = virtualCacheMaterial(longCache, []);
|
|
129
|
+
assert.equal(longCacheProjection.files.length, 2);
|
|
130
|
+
assert.notEqual(longCacheProjection.files[0].path, longCacheProjection.files[1].path, 'long route-scoped material identities must remain collision-resistant after bounded path projection');
|
|
131
|
+
assert(longCacheProjection.files.every((file) => /-[0-9a-f]{12}\.bin$/.test(String(file.path || ''))), 'bounded long material paths must retain a deterministic digest suffix');
|
|
132
|
+
const longRoutePrefix = `.topics/${'shared-route-segment-'.repeat(7)}`;
|
|
133
|
+
const longRouteTokenA = safeWorkspaceToken(`${longRoutePrefix}alpha-handoff.trace.md`);
|
|
134
|
+
const longRouteTokenB = safeWorkspaceToken(`${longRoutePrefix}beta-handoff.trace.md`);
|
|
135
|
+
assert.notEqual(longRouteTokenA, longRouteTokenB, 'long route identities with the same truncated human prefix must remain distinct before route-scoped requirement ids are formed');
|
|
136
|
+
assert(/-[0-9a-f]{12}$/.test(longRouteTokenA) && /-[0-9a-f]{12}$/.test(longRouteTokenB), 'bounded long route tokens must retain deterministic digest suffixes');
|
|
137
|
+
|
|
138
|
+
const businessRoot = path.join(root, 'business');
|
|
139
|
+
await makeWorkspace(businessRoot, 'Business', 'Anchor', 'business-context.md', [21, 22, 23]);
|
|
140
|
+
await writeFile(path.join(businessRoot, '.topics', 'anchor-role.trace.md'), roleMarkdown('Anchor'), 'utf8');
|
|
141
|
+
await writeFile(path.join(businessRoot, '.topics', 'axiom-role.trace.md'), roleMarkdown('Axiom'), 'utf8');
|
|
142
|
+
await writeFile(path.join(businessRoot, '.topics', 'loom-role.trace.md'), roleMarkdown('Loom'), 'utf8');
|
|
143
|
+
await mkdir(path.join(businessRoot, '.topics', 'roles'), { recursive: true });
|
|
144
|
+
await writeFile(path.join(businessRoot, '.topics', 'roles', '001-6-kodax-role.trace.md'), roleMarkdown('Kodax'), 'utf8');
|
|
145
|
+
const loomRoutePath = '.topics/tooling/001-1-1-1-1-1-anchor-to-loom-artifact-first-shared-carrier-hardening-handoff.trace.md';
|
|
146
|
+
const axiomRoutePath = '.topics/role-authority/001-1-1-1-1-1-anchor-to-axiom-human-first-domain-neutral-canonical-clarification-handoff.trace.md';
|
|
147
|
+
await mkdir(path.join(siteRoot, '.topics', 'tooling'), { recursive: true });
|
|
148
|
+
await mkdir(path.join(docsRoot, '.topics', 'role-authority'), { recursive: true });
|
|
149
|
+
await writeFile(path.join(siteRoot, loomRoutePath), qualifiedHandoffFixture({
|
|
150
|
+
title: 'Anchor to Loom shared-carrier fixture',
|
|
151
|
+
to: 'Loom',
|
|
152
|
+
fromReference: 'external://roles/anchor',
|
|
153
|
+
toReference: 'external://roles/loom',
|
|
154
|
+
purpose: 'shared full-source Loom route',
|
|
155
|
+
createdAt: '2026-08-23 18:01:00',
|
|
156
|
+
requiredContext: `- loom-shared-carrier-context
|
|
157
|
+
- Material: exact Site context
|
|
158
|
+
- Material Reference: [Context](../site-context.md)
|
|
159
|
+
- Purpose: prove Loom route-local context
|
|
160
|
+
- Availability: available
|
|
161
|
+
- carried-docs-context
|
|
162
|
+
- Material: exact Docs context already present in the carried Docs Workspace
|
|
163
|
+
- Material Reference: [Docs Context](docs::.topics/docs-context.md)
|
|
164
|
+
- Purpose: prove workspace-qualified Required Context resolves directly from an already-carried complete Workspace without cache duplication
|
|
165
|
+
- Availability: available`
|
|
166
|
+
}), 'utf8');
|
|
167
|
+
await writeFile(path.join(docsRoot, '.topics', 'axiom-one.md'), '# Axiom semantic decision\n', 'utf8');
|
|
168
|
+
await writeFile(path.join(docsRoot, '.topics', 'axiom-two.md'), '# Axiom boundary discovery\n', 'utf8');
|
|
169
|
+
await writeFile(path.join(docsRoot, axiomRoutePath), qualifiedHandoffFixture({
|
|
170
|
+
title: 'Anchor to Axiom shared-carrier fixture',
|
|
171
|
+
to: 'Axiom',
|
|
172
|
+
fromReference: 'external://roles/anchor',
|
|
173
|
+
toReference: 'external://roles/axiom',
|
|
174
|
+
purpose: 'shared full-source Axiom route',
|
|
175
|
+
createdAt: '2026-08-23 18:01:00',
|
|
176
|
+
requiredContext: `- anchor-semantic-clarification-decision
|
|
177
|
+
- Material: exact Anchor semantic clarification decision
|
|
178
|
+
- Material Reference: [Decision](../axiom-one.md)
|
|
179
|
+
- Purpose: reproduce the long route-scoped material identity
|
|
180
|
+
- Availability: available
|
|
181
|
+
- axiom-boundary-discovery
|
|
182
|
+
- Material: exact Axiom boundary discovery
|
|
183
|
+
- Material Reference: [Boundary](../axiom-two.md)
|
|
184
|
+
- Purpose: reproduce the second long route-scoped material identity
|
|
185
|
+
- Availability: available`
|
|
186
|
+
}), 'utf8');
|
|
187
|
+
const sharedInput = await prepareNodeHandoffManufacturingInput({
|
|
188
|
+
workspaceRoot: siteRoot,
|
|
189
|
+
workspaceId: 'site',
|
|
190
|
+
workspaceTargetPath: 'workspace.workspace.md',
|
|
191
|
+
handoffPath: loomRoutePath,
|
|
192
|
+
additionalWorkspaces: [
|
|
193
|
+
{ id: 'docs', root: docsRoot, workspaceTargetPath: 'workspace.workspace.md' },
|
|
194
|
+
{ id: 'business', root: businessRoot, workspaceTargetPath: 'workspace.workspace.md' }
|
|
195
|
+
],
|
|
196
|
+
handoffRoutes: [
|
|
197
|
+
{ workspaceId: 'site', path: loomRoutePath },
|
|
198
|
+
{ workspaceId: 'docs', path: axiomRoutePath }
|
|
199
|
+
],
|
|
200
|
+
materialBindings: {
|
|
201
|
+
'external://roles/anchor': { workspaceId: 'business', path: '.topics/anchor-role.trace.md' },
|
|
202
|
+
'external://roles/axiom': { workspaceId: 'business', path: '.topics/axiom-role.trace.md' },
|
|
203
|
+
'external://roles/loom': { workspaceId: 'business', path: '.topics/loom-role.trace.md' }
|
|
204
|
+
},
|
|
205
|
+
toolingBootstrap: 'embedded',
|
|
206
|
+
runtimeRoot,
|
|
207
|
+
verifyRoundtrip: true
|
|
208
|
+
});
|
|
209
|
+
const shared = manufactureRecipientRelativeHandoffPackage({ ...sharedInput, recipientRouteSelector: `site:${loomRoutePath}` }, { verifyRoundtrip: true, packageInput: { builtAt: '2026-08-23T18:01:00.000Z' } });
|
|
210
|
+
assert.equal(shared.status, 'ready', JSON.stringify(shared.findings, null, 2));
|
|
211
|
+
assert.equal(shared.verification.roundtrip, 'passed');
|
|
212
|
+
assert.equal(shared.carrierProjection.mode, 'single', 'package-v1 recipient surface carries exactly one selected Handoff route');
|
|
213
|
+
assert.equal(shared.inspection.packageContract?.packageRole, 'recipient-facing-handoff-carrier');
|
|
214
|
+
assert.equal(shared.inspection.packageContract?.carrierKind, 'self-contained');
|
|
215
|
+
assert.deepEqual(shared.carrierProjection.workspaces.map((item) => item.id).sort(), ['business', 'docs', 'site'], 'package-v1 preserves the complete inherited Workspace source chain');
|
|
216
|
+
assert.deepEqual(shared.carrierProjection.routes.map((item) => item.workspaceId), ['site'], 'unselected sibling Handoff routes are not projected into the recipient closure');
|
|
217
|
+
assert.equal(shared.inspection.routes.length, 1);
|
|
218
|
+
assert.equal(shared.inspection.routes[0].workspaceId, 'site');
|
|
219
|
+
assert.equal(shared.inspection.routes[0].workspaceRelativeHandoffPath, loomRoutePath);
|
|
220
|
+
assert.equal(shared.findings.some((item) => item.code === 'portable.handoff-v2.outer-file-map.duplicate-path'), false);
|
|
221
|
+
assert.equal(shared.inspection.caches.length, 0, 'workspace-bound endpoint Roles must not be duplicated through detached caches');
|
|
222
|
+
assert.equal(shared.inspection.endpointRoles.length, 2, 'selected Loom route carries only its From/To Role pointers');
|
|
223
|
+
assert(shared.inspection.endpointRoles.every((item) => item.targetCarrierKind === 'workspace-archive-entry' && item.targetWorkspaceId === 'business'));
|
|
224
|
+
assert.equal(shared.bundle.files.some((file) => String(file.path || '').includes('workspace-payload')), false, 'complete package-local Workspace bindings do not emit Workspace External Payload companions');
|
|
225
|
+
assert.equal(shared.bundle.files.some((file) => String(file.path || '').includes('workspace-representation')), false, 'complete package-local Workspace bindings do not emit Workspace Representation companions');
|
|
226
|
+
assert(recipientFacingV2PackageZipBuffer(shared.bundle, { inspection: shared.inspection }).byteLength > 0, 'package-v1 recipient bundle must serialize through the supported deterministic ZIP writer');
|
|
227
|
+
const continuationInput = groundContinuationOperationInput({ includeRequiredContext: '', includeCurrentWork: false }, { continue: path.join(root, 'continued-site') });
|
|
228
|
+
assert.equal(continuationInput.includeRequiredContext, '', 'common --continue path must not automatically project every qualified Required Context body');
|
|
229
|
+
assert.equal(continuationInput.includeCurrentWork, true, 'common --continue path must automatically request the exact current-work body');
|
|
230
|
+
const fullContinuationInput = groundContinuationOperationInput({ includeRequiredContext: '', includeCurrentWork: false }, { continue: path.join(root, 'continued-site-full'), full: true });
|
|
231
|
+
assert.equal(fullContinuationInput.includeRequiredContext, 'all', 'explicit --full continuation must retain the complete qualified Required Context receipt path');
|
|
232
|
+
const continuedSiteRoot = path.join(root, 'continued-site');
|
|
233
|
+
const continued = await materializeGroundWorkspaceCliOutput({
|
|
234
|
+
readiness: { state: 'grounded-to-act' },
|
|
235
|
+
authority: { route: { workspaceId: 'site' } }
|
|
236
|
+
}, { bundle: shared.bundle }, { continue: continuedSiteRoot });
|
|
237
|
+
assert.equal(continued.continuationMaterialization.state, 'materialized');
|
|
238
|
+
assert.equal(continued.continuationMaterialization.workspaceId, 'site');
|
|
239
|
+
assert.equal(await readFile(path.join(continuedSiteRoot, '.topics', 'site-context.md'), 'utf8'), '# Site context\n', 'ground continuation must write exact qualified Workspace bytes');
|
|
240
|
+
await assert.rejects(
|
|
241
|
+
materializeGroundWorkspaceCliOutput({ readiness: { state: 'grounded-to-discuss' }, authority: { route: { workspaceId: 'site' } } }, { bundle: shared.bundle }, { continue: path.join(root, 'blocked-site') }),
|
|
242
|
+
/requires-grounded-to-act/,
|
|
243
|
+
'ground continuation must fail closed before Workspace materialization when readiness is not grounded-to-act'
|
|
244
|
+
);
|
|
245
|
+
for (const routeProjection of shared.carrierProjection.routes) {
|
|
246
|
+
const qualification = qualifyPortableColdStart({ bundle: shared.bundle, route: routeProjection.id, preTakeover: 'minimal-bootstrap-only' });
|
|
247
|
+
assert.equal(qualification.status, 'preferred-pass', JSON.stringify(qualification.findings || [], null, 2));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const packageParentPath = path.join(root, 'shared-package-parent.zip');
|
|
251
|
+
await writeFile(packageParentPath, recipientFacingV2PackageZipBuffer(shared.bundle, { inspection: shared.inspection }));
|
|
252
|
+
const crossWorkspaceGroundLines = [];
|
|
253
|
+
const crossWorkspaceGroundCode = await runPortableCli([
|
|
254
|
+
'ground', packageParentPath,
|
|
255
|
+
'--route', shared.inspection.routes[0].pointerPath,
|
|
256
|
+
'--holder-role', 'Loom',
|
|
257
|
+
'--include-required-context', 'all',
|
|
258
|
+
'--compact'
|
|
259
|
+
], { log: (value) => crossWorkspaceGroundLines.push(value), error: (value) => crossWorkspaceGroundLines.push(value) }, { runtimeRoot });
|
|
260
|
+
assert.equal(crossWorkspaceGroundCode, 0, crossWorkspaceGroundLines.join('\n'));
|
|
261
|
+
const crossWorkspaceGround = JSON.parse(crossWorkspaceGroundLines.at(-1));
|
|
262
|
+
const docsRequiredContext = crossWorkspaceGround.requiredContext?.items?.find((item) => item.requirementId === 'required:carried-docs-context');
|
|
263
|
+
assert(docsRequiredContext, 'cold ground must project the cross-workspace Required Context manufactured from the carried Docs Workspace');
|
|
264
|
+
assert.equal(docsRequiredContext.state, 'qualified');
|
|
265
|
+
assert.equal(docsRequiredContext.workspaceId, 'docs');
|
|
266
|
+
assert.equal(docsRequiredContext.innerPath, '.topics/docs-context.md');
|
|
267
|
+
assert.equal(crossWorkspaceGround.requiredContext.missingFromWorkspaceSnapshots, 0, 'manufacture and cold ground must agree on carried cross-workspace Required Context visibility');
|
|
268
|
+
|
|
269
|
+
const parentBusinessArchivePath = shared.inspection.workspaces.find((item) => item.workspaceId === 'business')?.workspaceArchivePath;
|
|
270
|
+
const parentBusinessArchive = shared.bundle.files.find((file) => file.path === parentBusinessArchivePath);
|
|
271
|
+
const parentBusinessEntries = await zipBufferToImportEntries(packageFileBytes(parentBusinessArchive), { source: 'untargeted-kodax-business-workspace', excludeRepositoryInternals: true });
|
|
272
|
+
assert.equal(parentBusinessEntries.errors.length, 0);
|
|
273
|
+
assert.equal(parentBusinessEntries.entries.some((entry) => entry.path === '.topics/roles/001-6-kodax-role.trace.md'), true, 'complete Business Workspace must carry an untargeted Kodax Role entry before any child route references it');
|
|
274
|
+
|
|
275
|
+
const duplicateEnumeration = { materialization: { entries: [
|
|
276
|
+
{ path: '.topics/roles/001-6-kodax-role.trace.md', data: Uint8Array.from([1]) },
|
|
277
|
+
{ path: '.topics/roles/001-6-kodax-role.trace.md', data: Uint8Array.from([2]) }
|
|
278
|
+
] } };
|
|
279
|
+
assert.equal(entryFromEnumeration(duplicateEnumeration, '.topics/roles/001-6-kodax-role.trace.md'), null, 'ambiguous exact workspace/path targets must fail closed instead of selecting provider order');
|
|
280
|
+
|
|
281
|
+
await writeFile(path.join(siteRoot, loomRoutePath), qualifiedHandoffFixture({
|
|
282
|
+
title: 'Loom to Anchor package-parent return fixture',
|
|
283
|
+
from: 'Loom',
|
|
284
|
+
to: 'Anchor',
|
|
285
|
+
fromReference: 'business::.topics/loom-role.trace.md',
|
|
286
|
+
toReference: 'business::.topics/anchor-role.trace.md',
|
|
287
|
+
purpose: 'prove package-parent return preserves workspace-qualified endpoint Role material without explicit rebinding',
|
|
288
|
+
createdAt: '2026-08-23 18:02:00',
|
|
289
|
+
requiredContext: `- carried-docs-context
|
|
290
|
+
- Material: exact Docs context inherited from the parent carrier
|
|
291
|
+
- Material Reference: [Docs Context](docs::.topics/docs-context.md)
|
|
292
|
+
- Purpose: prove inherited cross-workspace Required Context remains cold-groundable
|
|
293
|
+
- Availability: available`
|
|
294
|
+
}), 'utf8');
|
|
295
|
+
await writeFile(path.join(siteRoot, 'content', 'modified-site.txt'), 'current Site root must override the carried parent Site Workspace\n', 'utf8');
|
|
296
|
+
const packageParentChildOutputDir = path.join(root, 'package-parent-child-output');
|
|
297
|
+
const packageParentLines = [];
|
|
298
|
+
const packageParentCode = await runPortableCli([
|
|
299
|
+
'manufacture-handoff-package', siteRoot,
|
|
300
|
+
'--handoff', loomRoutePath,
|
|
301
|
+
'--workspace-id', 'site',
|
|
302
|
+
'--workspace-target', 'workspace.workspace.md',
|
|
303
|
+
'--package-parent', packageParentPath,
|
|
304
|
+
'--output-dir', packageParentChildOutputDir,
|
|
305
|
+
'--built-at', '2026-08-23T18:02:00.000Z',
|
|
306
|
+
'--compact'
|
|
307
|
+
], { log: (value) => packageParentLines.push(value), error: (value) => packageParentLines.push(value) }, { runtimeRoot });
|
|
308
|
+
assert.equal(packageParentCode, 0, packageParentLines.join('\n'));
|
|
309
|
+
const packageParentCli = JSON.parse(packageParentLines.at(-1));
|
|
310
|
+
assert.equal(packageParentCli.status, 'ready');
|
|
311
|
+
assert.equal(packageParentCli.verification.roundtrip, 'passed');
|
|
312
|
+
assert.deepEqual(packageParentCli.planSummary.workspaces.map((item) => item.id).sort(), ['business', 'docs', 'site']);
|
|
313
|
+
const packageParentWorkspaceSummary = new Map(packageParentCli.planSummary.workspaces.map((item) => [item.id, item]));
|
|
314
|
+
assert.equal(packageParentWorkspaceSummary.get('business')?.completenessProof, 'qualified-package-parent-workspace-reuse-v1');
|
|
315
|
+
assert.equal(packageParentWorkspaceSummary.get('docs')?.completenessProof, 'qualified-package-parent-workspace-reuse-v1');
|
|
316
|
+
assert.equal(packageParentWorkspaceSummary.get('site')?.completenessProof, 'deterministic-node-enumeration-v1');
|
|
317
|
+
assert.equal(packageParentCli.manufacturingEvidence?.packageParentWorkspaceReuse?.state, 'qualified');
|
|
318
|
+
assert.deepEqual(packageParentCli.manufacturingEvidence?.packageParentWorkspaceReuse?.inheritedWorkspaceIds?.slice().sort(), ['business', 'docs']);
|
|
319
|
+
|
|
320
|
+
const childPath = packageParentCli.primaryOutput.path;
|
|
321
|
+
const [parentBundle, childBundle] = await Promise.all([loadNodePortableInput([packageParentPath]), loadNodePortableInput([childPath])]);
|
|
322
|
+
const parentInspection = inspectRecipientFacingV2Topology(parentBundle);
|
|
323
|
+
const childInspection = inspectRecipientFacingV2Topology(childBundle);
|
|
324
|
+
assert.equal(parentInspection.status, 'valid');
|
|
325
|
+
assert.equal(childInspection.status, 'valid');
|
|
326
|
+
assert.equal(childInspection.routes.length, 1);
|
|
327
|
+
assert.equal(childInspection.routes[0].workspaceId, 'site');
|
|
328
|
+
assert.equal(childInspection.routes[0].workspaceRelativeHandoffPath, loomRoutePath);
|
|
329
|
+
assert(childInspection.endpointRoles.every((item) => item.targetCarrierKind === 'workspace-archive-entry' && item.targetWorkspaceId === 'business'));
|
|
330
|
+
for (const id of ['business', 'docs']) {
|
|
331
|
+
assert.equal(workspaceArchiveSha256(childBundle, childInspection, id), workspaceArchiveSha256(parentBundle, parentInspection, id), `${id} must reuse the exact qualified parent Workspace archive bytes`);
|
|
332
|
+
}
|
|
333
|
+
assert.notEqual(workspaceArchiveSha256(childBundle, childInspection, 'site'), workspaceArchiveSha256(parentBundle, parentInspection, 'site'), 'explicit current Site root must override stale parent Site bytes');
|
|
334
|
+
const childSiteArchive = childInspection.workspaces.find((item) => item.workspaceId === 'site')?.workspaceArchivePath;
|
|
335
|
+
assert(childSiteArchive, 'child Site Workspace archive must be addressable');
|
|
336
|
+
const childSiteFile = childBundle.files.find((file) => file.path === childSiteArchive);
|
|
337
|
+
assert(childSiteFile, 'child Site Workspace archive must be carried');
|
|
338
|
+
const childSiteEntries = await zipBufferToImportEntries(packageFileBytes(childSiteFile), { source: 'package-parent-child-site-workspace', excludeRepositoryInternals: true });
|
|
339
|
+
assert.equal(childSiteEntries.errors.length, 0);
|
|
340
|
+
assert.equal(childSiteEntries.entries.some((entry) => entry.path === 'content/modified-site.txt'), true, 'modified Site bytes must come from the explicit current root');
|
|
341
|
+
const childColdStartLines = [];
|
|
342
|
+
const childColdStartCode = await runPortableCli([
|
|
343
|
+
'qualify-cold-start', childPath,
|
|
344
|
+
'--route', childInspection.routes[0].pointerPath,
|
|
345
|
+
'--pre-takeover', 'minimal-bootstrap-only',
|
|
346
|
+
'--summary',
|
|
347
|
+
'--compact'
|
|
348
|
+
], { log: (value) => childColdStartLines.push(value), error: (value) => childColdStartLines.push(value) }, { runtimeRoot });
|
|
349
|
+
assert.equal(childColdStartCode, 0, childColdStartLines.join('\n'));
|
|
350
|
+
assert.equal(JSON.parse(childColdStartLines.at(-1)).status, 'preferred-pass');
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
const siblingOutputDir = path.join(root, 'package-parent-sibling-output');
|
|
354
|
+
const siblingLines = [];
|
|
355
|
+
const siblingCode = await runPortableCli([
|
|
356
|
+
'manufacture-handoff-package', siteRoot,
|
|
357
|
+
'--handoff', loomRoutePath,
|
|
358
|
+
'--workspace-id', 'site',
|
|
359
|
+
'--workspace-target', 'workspace.workspace.md',
|
|
360
|
+
'--package-parent', packageParentPath,
|
|
361
|
+
'--output-dir', siblingOutputDir,
|
|
362
|
+
'--built-at', '2026-08-23T18:03:00.000Z',
|
|
363
|
+
'--compact'
|
|
364
|
+
], { log: (value) => siblingLines.push(value), error: (value) => siblingLines.push(value) }, { runtimeRoot });
|
|
365
|
+
assert.equal(siblingCode, 0, siblingLines.join('\n'));
|
|
366
|
+
const siblingCli = JSON.parse(siblingLines.at(-1));
|
|
367
|
+
assert.equal(siblingCli.status, 'ready');
|
|
368
|
+
assert.equal(packageParentCli.carrierLineage.parentDimension, siblingCli.carrierLineage.parentDimension, 'parallel returns must share the same exact parent dimension');
|
|
369
|
+
assert.equal(packageParentCli.carrierLineage.dimension, `${packageParentCli.carrierLineage.parentDimension}-1`);
|
|
370
|
+
assert.equal(siblingCli.carrierLineage.dimension, `${siblingCli.carrierLineage.parentDimension}-2`, 'second return from the same parent must receive the next atomically reserved sibling dimension');
|
|
371
|
+
assert.notEqual(packageParentCli.primaryOutput.path, siblingCli.primaryOutput.path);
|
|
372
|
+
|
|
373
|
+
const kodaxPackageParentRoutePath = '.topics/tooling/001-1-1-1-1-2-loom-to-kodax-untargeted-endpoint-role-handoff.trace.md';
|
|
374
|
+
await writeFile(path.join(siteRoot, kodaxPackageParentRoutePath), qualifiedHandoffFixture({
|
|
375
|
+
title: 'Loom to Kodax package-parent untargeted endpoint Role fixture',
|
|
376
|
+
from: 'Loom',
|
|
377
|
+
to: 'Kodax',
|
|
378
|
+
fromReference: 'business::.topics/loom-role.trace.md',
|
|
379
|
+
toReference: 'business::.topics/roles/001-6-kodax-role.trace.md',
|
|
380
|
+
purpose: 'prove an explicit workspace-qualified Role resolves from the complete inherited Business Workspace even when no parent route targeted it',
|
|
381
|
+
createdAt: '2026-08-23 18:01:30'
|
|
382
|
+
}), 'utf8');
|
|
383
|
+
const kodaxOutputDir = path.join(root, 'package-parent-kodax-output');
|
|
384
|
+
const kodaxLines = [];
|
|
385
|
+
const kodaxCode = await runPortableCli([
|
|
386
|
+
'manufacture-handoff-package', siteRoot,
|
|
387
|
+
'--handoff', kodaxPackageParentRoutePath,
|
|
388
|
+
'--workspace-id', 'site',
|
|
389
|
+
'--workspace-target', 'workspace.workspace.md',
|
|
390
|
+
'--package-parent', packageParentPath,
|
|
391
|
+
'--output-dir', kodaxOutputDir,
|
|
392
|
+
'--built-at', '2026-08-23T18:01:30.000Z',
|
|
393
|
+
'--compact'
|
|
394
|
+
], { log: (value) => kodaxLines.push(value), error: (value) => kodaxLines.push(value) }, { runtimeRoot });
|
|
395
|
+
assert.equal(kodaxCode, 0, kodaxLines.join('\n'));
|
|
396
|
+
const kodaxCli = JSON.parse(kodaxLines.at(-1));
|
|
397
|
+
assert.equal(kodaxCli.status, 'ready');
|
|
398
|
+
const kodaxBundle = await loadNodePortableInput([kodaxCli.primaryOutput.path]);
|
|
399
|
+
const kodaxInspection = inspectRecipientFacingV2Topology(kodaxBundle);
|
|
400
|
+
assert.equal(kodaxInspection.status, 'valid');
|
|
401
|
+
const kodaxToRole = kodaxInspection.endpointRoles.find((item) => item.endpointParty === 'to');
|
|
402
|
+
assert.equal(kodaxToRole?.targetWorkspaceId, 'business');
|
|
403
|
+
assert.equal(kodaxToRole?.targetInnerPath, '.topics/roles/001-6-kodax-role.trace.md');
|
|
404
|
+
assert.equal(kodaxToRole?.targetCarrierKind, 'workspace-archive-entry');
|
|
405
|
+
|
|
406
|
+
const missingRoleRoutePath = '.topics/tooling/001-1-1-1-1-3-loom-to-missing-role-handoff.trace.md';
|
|
407
|
+
await writeFile(path.join(siteRoot, missingRoleRoutePath), qualifiedHandoffFixture({
|
|
408
|
+
title: 'Loom to missing Role fail-closed fixture',
|
|
409
|
+
from: 'Loom',
|
|
410
|
+
to: 'Missing',
|
|
411
|
+
fromReference: 'business::.topics/loom-role.trace.md',
|
|
412
|
+
toReference: 'business::.topics/roles/001-999-missing-role.trace.md',
|
|
413
|
+
purpose: 'prove an absent exact workspace-qualified Role target remains unresolved',
|
|
414
|
+
createdAt: '2026-08-23 18:01:40'
|
|
415
|
+
}), 'utf8');
|
|
416
|
+
const missingRoleLines = [];
|
|
417
|
+
const missingRoleCode = await runPortableCli([
|
|
418
|
+
'manufacture-handoff-package', siteRoot,
|
|
419
|
+
'--handoff', missingRoleRoutePath,
|
|
420
|
+
'--workspace-id', 'site',
|
|
421
|
+
'--workspace-target', 'workspace.workspace.md',
|
|
422
|
+
'--package-parent', packageParentPath,
|
|
423
|
+
'--built-at', '2026-08-23T18:01:40.000Z',
|
|
424
|
+
'--compact'
|
|
425
|
+
], { log: (value) => missingRoleLines.push(value), error: (value) => missingRoleLines.push(value) }, { runtimeRoot });
|
|
426
|
+
assert.equal(missingRoleCode, 2, missingRoleLines.join('\n'));
|
|
427
|
+
const missingRole = JSON.parse(missingRoleLines.at(-1));
|
|
428
|
+
assert.equal(missingRole.status, 'blocked');
|
|
429
|
+
assert.equal(missingRole.findings.some((item) => item.code === 'portable.handoff-material.endpoint-role.unresolved'), true, 'missing exact workspace-qualified endpoint Role must remain fail-closed');
|
|
430
|
+
|
|
431
|
+
await assert.rejects(
|
|
432
|
+
prepareNodeHandoffManufacturingInput({
|
|
433
|
+
workspaceRoot: siteRoot,
|
|
434
|
+
workspaceId: 'site',
|
|
435
|
+
handoffPath: '.topics/015-handoff.trace.md',
|
|
436
|
+
additionalWorkspaces: [{ id: 'site', root: docsRoot }],
|
|
437
|
+
runtimeRoot
|
|
438
|
+
}),
|
|
439
|
+
/workspace-id\.duplicate:site/
|
|
440
|
+
);
|
|
441
|
+
await assert.rejects(
|
|
442
|
+
prepareNodeHandoffManufacturingInput({
|
|
443
|
+
workspaceRoot: siteRoot,
|
|
444
|
+
workspaceId: 'site',
|
|
445
|
+
handoffPath: '.topics/015-handoff.trace.md',
|
|
446
|
+
additionalWorkspaces: [{ id: 'missing', root: path.join(root, 'missing') }],
|
|
447
|
+
runtimeRoot
|
|
448
|
+
}),
|
|
449
|
+
/ENOENT|no such file/i
|
|
450
|
+
);
|
|
451
|
+
await assert.rejects(
|
|
452
|
+
prepareNodeHandoffManufacturingInput({
|
|
453
|
+
workspaceRoot: siteRoot,
|
|
454
|
+
workspaceId: 'site',
|
|
455
|
+
handoffPath: '.topics/015-handoff.trace.md',
|
|
456
|
+
additionalWorkspaces: [{ id: 'docs', root: docsRoot, workspaceTargetPath: 'workspace.workspace.md' }],
|
|
457
|
+
handoffRoutes: [{ path: '.topics/015-handoff.trace.md' }],
|
|
458
|
+
runtimeRoot
|
|
459
|
+
}),
|
|
460
|
+
/route\.workspace-id\.required/
|
|
461
|
+
);
|
|
462
|
+
|
|
463
|
+
const workspaceJson = path.join(root, 'workspaces.json');
|
|
464
|
+
const routesJson = path.join(root, 'routes.json');
|
|
465
|
+
const cliOutputDir = path.join(root, 'cli-output');
|
|
466
|
+
await writeFile(workspaceJson, `${JSON.stringify({ workspaces: [{ id: 'docs', root: docsRoot, title: 'Docs', workspaceTargetPath: 'workspace.workspace.md' }] }, null, 2)}\n`, 'utf8');
|
|
467
|
+
await writeFile(routesJson, `${JSON.stringify({ routes: [{ workspaceId: 'site', path: '.topics/015-handoff.trace.md' }, { workspaceId: 'docs', path: '.topics/015-handoff.trace.md' }] }, null, 2)}\n`, 'utf8');
|
|
468
|
+
const lines = [];
|
|
469
|
+
const code = await runPortableCli([
|
|
470
|
+
'manufacture-handoff-package', siteRoot,
|
|
471
|
+
'--handoff', '.topics/015-handoff.trace.md',
|
|
472
|
+
'--workspace-id', 'site',
|
|
473
|
+
'--workspace-target', 'workspace.workspace.md',
|
|
474
|
+
'--legacy-recipient-v2-compatibility',
|
|
475
|
+
'--workspace-roots', workspaceJson,
|
|
476
|
+
'--workspace-routes', routesJson,
|
|
477
|
+
'--route', 'handoff-route:docs:.topics/015-handoff.trace.md',
|
|
478
|
+
'--output-dir', cliOutputDir,
|
|
479
|
+
'--built-at', '2026-08-23T18:00:00.000Z',
|
|
480
|
+
'--compact'
|
|
481
|
+
], { log: (value) => lines.push(value), error: (value) => lines.push(value) }, { runtimeRoot });
|
|
482
|
+
assert.equal(code, 0);
|
|
483
|
+
const cli = JSON.parse(lines.at(-1));
|
|
484
|
+
assert.equal(cli.status, 'ready');
|
|
485
|
+
assert.deepEqual(cli.planSummary.workspaces.map((item) => item.id), ['site', 'docs']);
|
|
486
|
+
assert.equal(cli.carrierProjection.routes.length, 2);
|
|
487
|
+
assert.equal((await readFile(cli.primaryOutput.path)).byteLength > 0, true);
|
|
488
|
+
|
|
489
|
+
const legacyInput = await prepareNodeHandoffManufacturingInput({
|
|
490
|
+
workspaceRoot: siteRoot,
|
|
491
|
+
workspaceId: 'site',
|
|
492
|
+
workspaceTargetPath: 'workspace.workspace.md',
|
|
493
|
+
handoffPath: '.topics/015-handoff.trace.md',
|
|
494
|
+
handoffRoutes: ['.topics/015-handoff.trace.md'],
|
|
495
|
+
toolingBootstrap: 'embedded',
|
|
496
|
+
runtimeRoot
|
|
497
|
+
});
|
|
498
|
+
assert.equal(legacyInput.workspaceMaterializations.length, 1);
|
|
499
|
+
assert.deepEqual(legacyInput.transportRoutes[0], { workspaceId: 'site', path: '.topics/015-handoff.trace.md' });
|
|
500
|
+
const legacy = manufactureRecipientRelativeHandoffPackage(legacyInput, { legacyRecipientV2Compatibility: true, packageInput: { builtAt: '2026-08-23T18:00:00.000Z' } });
|
|
501
|
+
assert.equal(legacy.status, 'ready');
|
|
502
|
+
assert.equal(legacy.carrierProjection.routes[0].workspaceId, 'site');
|
|
503
|
+
} finally {
|
|
504
|
+
await rm(root, { recursive: true, force: true });
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
function workspaceArchiveSha256(bundle, inspection, workspaceId) {
|
|
508
|
+
const archivePath = inspection.workspaces.find((item) => item.workspaceId === workspaceId)?.workspaceArchivePath;
|
|
509
|
+
assert(archivePath, `${workspaceId} Workspace archive path must resolve`);
|
|
510
|
+
const file = bundle.files.find((item) => item.path === archivePath);
|
|
511
|
+
assert(file, `${workspaceId} Workspace archive bytes must resolve`);
|
|
512
|
+
return sha256Hex(packageFileBytes(file));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
async function makeWorkspace(rootPath, title, to, contextName, bytes) {
|
|
516
|
+
await mkdir(path.join(rootPath, '.topics'), { recursive: true });
|
|
517
|
+
await mkdir(path.join(rootPath, 'content'), { recursive: true });
|
|
518
|
+
await writeFile(path.join(rootPath, 'package.json'), `${JSON.stringify({ name: `tiinex-${title.toLowerCase()}-fixture`, type: 'module' })}\n`, 'utf8');
|
|
519
|
+
await writeFile(path.join(rootPath, 'workspace.workspace.md'), workspaceMarkdown(title), 'utf8');
|
|
520
|
+
await writeFile(path.join(rootPath, '.topics', contextName), `# ${title} context\n`, 'utf8');
|
|
521
|
+
await writeFile(path.join(rootPath, '.topics', '015-handoff.trace.md'), handoffMarkdown(title, to, contextName), 'utf8');
|
|
522
|
+
await writeFile(path.join(rootPath, 'content', 'blob.bin'), Uint8Array.from(bytes));
|
|
523
|
+
}
|
|
524
|
+
function workspaceMarkdown(title) {
|
|
525
|
+
const unsigned = `# Continuity Context
|
|
526
|
+
|
|
527
|
+
- Envelope Schema: tiinex.root.v1
|
|
528
|
+
- Current
|
|
529
|
+
- Current Schema: tiinex.workspace.v1
|
|
530
|
+
- Created At: 2026-08-23 17:59:00
|
|
531
|
+
- Authors: Fixture
|
|
532
|
+
- Why: Qualify the exact ${title} Workspace carried by the multi-root regression.
|
|
533
|
+
- Summary: ${title} multi-root fixture Workspace.
|
|
534
|
+
- Status: active/local
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
# ${title} Multi-root Fixture Workspace
|
|
539
|
+
|
|
540
|
+
Bounded fixture Workspace.
|
|
541
|
+
|
|
542
|
+
# Continuity Integrity
|
|
543
|
+
|
|
544
|
+
- [sha256-base64url-c14n-v2](${C14N_V2_VALIDATOR_TARGET})
|
|
545
|
+
- Towards: self
|
|
546
|
+
- Value: `;
|
|
547
|
+
const sealed = sealC14nV2Self(unsigned);
|
|
548
|
+
assert.equal(sealed.state, 'sealed');
|
|
549
|
+
return `${sealed.markdown}\n`;
|
|
550
|
+
}
|
|
551
|
+
function handoffMarkdown(title, to, contextName) {
|
|
552
|
+
return qualifiedHandoffFixture({
|
|
553
|
+
title: `${title} handoff`,
|
|
554
|
+
to,
|
|
555
|
+
purpose: 'multi-root fixture',
|
|
556
|
+
createdAt: '2026-08-23 18:00:00',
|
|
557
|
+
requiredContext: `- local-context
|
|
558
|
+
- Material: exact context
|
|
559
|
+
- Material Reference: [Context](${contextName})
|
|
560
|
+
- Purpose: route-local context
|
|
561
|
+
- Availability: available`
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
function roleMarkdown(label) {
|
|
565
|
+
return `# Continuity Context
|
|
566
|
+
|
|
567
|
+
- Envelope Schema: tiinex.root.v1
|
|
568
|
+
- Current
|
|
569
|
+
- Current Schema: tiinex.party.role.v1
|
|
570
|
+
- Created At: 2026-08-23 18:01:00
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
# ${label}
|
|
575
|
+
|
|
576
|
+
## Role Identity
|
|
577
|
+
|
|
578
|
+
- Role Label: ${label}
|
|
579
|
+
- Role Kind: bounded endpoint role
|
|
580
|
+
|
|
581
|
+
## Role Boundary
|
|
582
|
+
|
|
583
|
+
- In Scope: exact endpoint grounding
|
|
584
|
+
- Out Of Scope: holder identity inference
|
|
585
|
+
|
|
586
|
+
## Authority And Responsibility Boundary
|
|
587
|
+
|
|
588
|
+
- May Do: participate within declared endpoint boundary
|
|
589
|
+
- Does Not Authorize: transport identity inference
|
|
590
|
+
|
|
591
|
+
## Holder Relationship
|
|
592
|
+
|
|
593
|
+
- Holder State: unproven
|
|
594
|
+
|
|
595
|
+
## Interpretation Limits
|
|
596
|
+
|
|
597
|
+
- Does Not Prove: holder identity
|
|
598
|
+
- Must Not Be Treated As: package authority
|
|
599
|
+
|
|
600
|
+
# Continuity Integrity
|
|
601
|
+
`;
|
|
602
|
+
}
|
|
603
|
+
async function makeRuntime(rootPath) {
|
|
604
|
+
await mkdir(path.join(rootPath, 'tools'), { recursive: true });
|
|
605
|
+
await mkdir(path.join(rootPath, 'src', 'tooling', 'portable', 'bootstrap'), { recursive: true });
|
|
606
|
+
await mkdir(path.join(rootPath, 'src', 'tooling', 'portable', 'schema', 'bootstrap', 'tiinex.root.v1'), { recursive: true });
|
|
607
|
+
await writeFile(path.join(rootPath, 'tools', 'tiinex-portable.mjs'), "import '../src/runtime.js';\n", 'utf8');
|
|
608
|
+
await writeFile(path.join(rootPath, 'src', 'runtime.js'), "export const runtime = 'fixture';\n", 'utf8');
|
|
609
|
+
await writeFile(path.join(rootPath, 'package.json'), '{"type":"module"}\n', 'utf8');
|
|
610
|
+
await writeFile(path.join(rootPath, 'src', 'tooling', 'portable', 'bootstrap', 'tiinex.llm.bootstrap.md'), '# Bootstrap\n', 'utf8');
|
|
611
|
+
await writeFile(path.join(rootPath, 'src', 'tooling', 'portable', 'bootstrap', 'tiinex.llm.bootstrap.pointer.json'), '{"schema":"fixture"}\n', 'utf8');
|
|
612
|
+
await writeFile(path.join(rootPath, 'src', 'tooling', 'portable', 'schema', 'bootstrap', 'tiinex.root.v1', 'schema.md'), '# Root\n', 'utf8');
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
console.log('✓ Tooling 015 operator-supplied multi-root manufacturing and one-root compatibility passed');
|