@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.
Files changed (580) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +31 -0
  3. package/README.md +26 -0
  4. package/docs/CONSUMER-CONTRACT.md +65 -0
  5. package/package.json +94 -0
  6. package/src/acceptance/knownScenarios.case.mjs +48 -0
  7. package/src/acceptance/knownScenarios.js +89 -0
  8. package/src/acceptance/postV423CanonicalTransitionProductVerticalSlice.case.mjs +774 -0
  9. package/src/acceptance/postV437M0ETimePortalProductParityClosure.case.mjs +51 -0
  10. package/src/acceptance/postV447M0FGithubSocialPublicationProductIntegration.case.mjs +33 -0
  11. package/src/acceptance/postV450M0ProductAcceptanceHardening.case.mjs +82 -0
  12. package/src/acceptance/postV470SchemaReadingContractMaterializationIdentitySourceCoalescingAuthorityCorrection.case.mjs +236 -0
  13. package/src/acceptance/recoveryAcceptance.case.mjs +196 -0
  14. package/src/adapters/adapter.definition.schema.json +33 -0
  15. package/src/adapters/archive/archive.adapter.case.mjs +212 -0
  16. package/src/adapters/export/export.adapter.js +79 -0
  17. package/src/adapters/git-native/git-native.adapter.js +43 -0
  18. package/src/adapters/github/github.adapter.case.mjs +843 -0
  19. package/src/adapters/github/github.adapter.js +395 -0
  20. package/src/adapters/github/github.issueEmbedded.js +262 -0
  21. package/src/adapters/github/github.issueMirror.js +309 -0
  22. package/src/adapters/github/github.issueSnapshot.js +475 -0
  23. package/src/adapters/github/github.issueSurface.js +188 -0
  24. package/src/adapters/github/github.issueTransport.js +237 -0
  25. package/src/adapters/github/github.publicationRead.js +24 -0
  26. package/src/adapters/github/github.readTransport.js +18 -0
  27. package/src/adapters/github/github.repoDiscovery.js +222 -0
  28. package/src/adapters/github/github.repoMirror.js +255 -0
  29. package/src/adapters/github/github.repoProxy.js +276 -0
  30. package/src/adapters/github/github.repoSurface.js +60 -0
  31. package/src/adapters/github/github.transportDiagnostics.js +68 -0
  32. package/src/adapters/local/local.adapter.case.mjs +72 -0
  33. package/src/adapters/local/local.adapter.js +188 -0
  34. package/src/adapters/registry.js +35 -0
  35. package/src/adapters/static/static.adapter.js +84 -0
  36. package/src/app/App.js +1 -0
  37. package/src/app/TiinexApp.jsx +822 -0
  38. package/src/app/appShell.views.jsx +58 -0
  39. package/src/app/artifactAuthoringCapability.js +49 -0
  40. package/src/app/boot/bootApp.js +19 -0
  41. package/src/app/boot/environment.js +1 -0
  42. package/src/app/canonicalAuthoringValues.js +4 -0
  43. package/src/app/canonicalCreationProductController.js +57 -0
  44. package/src/app/canonicalCreationProductSettlement.case.mjs +10 -0
  45. package/src/app/canonicalCreationProductSettlement.js +11 -0
  46. package/src/app/canonicalReferenceLocalCreateCommand.js +210 -0
  47. package/src/app/canonicalReferenceTargets.js +73 -0
  48. package/src/app/canonicalTransitionLocalCreateCommand.js +217 -0
  49. package/src/app/defaultWorkspaceStart.case.mjs +39 -0
  50. package/src/app/defaultWorkspaceStart.js +65 -0
  51. package/src/app/defaultWorkspaceStartCommand.js +55 -0
  52. package/src/app/durableLocalMutationPolicy.js +21 -0
  53. package/src/app/githubMaterializationSummary.js +69 -0
  54. package/src/app/githubProgress.js +25 -0
  55. package/src/app/githubSourceInput.js +47 -0
  56. package/src/app/githubSourceMaterializationCommand.js +97 -0
  57. package/src/app/githubSourceOperation.js +226 -0
  58. package/src/app/governanceDialogData.js +27 -0
  59. package/src/app/handoffPackageImportCommand.js +182 -0
  60. package/src/app/historyAuthority.js +53 -0
  61. package/src/app/initialWorkspaceBootstrapOperation.js +105 -0
  62. package/src/app/lineageCommand.js +118 -0
  63. package/src/app/lineageSourceRecovery.js +339 -0
  64. package/src/app/localDraftMutationCommand.js +174 -0
  65. package/src/app/localMaterialCommand.js +124 -0
  66. package/src/app/nodeGraphVerse.case.mjs +111 -0
  67. package/src/app/persistenceOwnership.js +92 -0
  68. package/src/app/productStateBoundary.js +7 -0
  69. package/src/app/providers/AppProviders.js +1 -0
  70. package/src/app/providers/LocaleProvider.js +1 -0
  71. package/src/app/providers/SchemaRegistryProvider.js +1 -0
  72. package/src/app/providers/WorkspaceProvider.js +1 -0
  73. package/src/app/publicTarget.js +251 -0
  74. package/src/app/publicTargetRestoreCommand.js +149 -0
  75. package/src/app/recordUi.cache.js +35 -0
  76. package/src/app/recordUi.js +11 -0
  77. package/src/app/routes/RouteSurface.js +1 -0
  78. package/src/app/routes/routes.js +1 -0
  79. package/src/app/runtimeState.js +54 -0
  80. package/src/app/schemaCurrentDeclaration.js +69 -0
  81. package/src/app/schemaFactoryLocalCreateCommand.js +101 -0
  82. package/src/app/schemaFactoryViewerProof.case.mjs +134 -0
  83. package/src/app/schemaFactoryViewerProof.js +20 -0
  84. package/src/app/schemaNavigationCommand.js +285 -0
  85. package/src/app/schemaNavigationMaterialization.js +171 -0
  86. package/src/app/schemaNavigationRuntimeCatalog.js +25 -0
  87. package/src/app/schemaNavigationState.js +66 -0
  88. package/src/app/schemaReadingContractQualification.js +91 -0
  89. package/src/app/schemaSourceRecovery.js +373 -0
  90. package/src/app/scrollPersistence.js +30 -0
  91. package/src/app/semanticOperationHistory.js +18 -0
  92. package/src/app/shareActionCommand.js +55 -0
  93. package/src/app/shareProjection.js +190 -0
  94. package/src/app/shell/AppShell.js +1 -0
  95. package/src/app/shell/Header.js +1 -0
  96. package/src/app/shell/Navigation.js +1 -0
  97. package/src/app/shell/SurfaceSwitcher.js +1 -0
  98. package/src/app/sourceTransportRefresh.js +176 -0
  99. package/src/app/startupOwnership.js +40 -0
  100. package/src/app/startupPresentation.case.mjs +34 -0
  101. package/src/app/startupPresentation.js +33 -0
  102. package/src/app/startupPresentation.views.jsx +21 -0
  103. package/src/app/startupRenderPhase.js +9 -0
  104. package/src/app/startupWorkspaceCommand.js +62 -0
  105. package/src/app/startupWorkspaceConfigApplication.js +49 -0
  106. package/src/app/statePersistenceScheduler.js +106 -0
  107. package/src/app/tiinexAppConfigPlan.js +108 -0
  108. package/src/app/tiinexAppConfigSource.js +349 -0
  109. package/src/app/tiinexAppStartupSource.js +79 -0
  110. package/src/app/tiinexHostedWorkspaceConventions.js +572 -0
  111. package/src/app/timePortalHistoricalRead.js +114 -0
  112. package/src/app/timePortalSnapshotResolution.js +53 -0
  113. package/src/app/urlMaterialCommand.js +24 -0
  114. package/src/app/useCanonicalPlacementSelectionOptions.js +9 -0
  115. package/src/app/useCanonicalReferenceSelectionOptions.js +8 -0
  116. package/src/app/useLocalMaterialIntake.js +68 -0
  117. package/src/app/useTimePortalProductController.jsx +111 -0
  118. package/src/app/useWorkspaceEntrypointIntake.js +77 -0
  119. package/src/app/useWorkspaceSelectionProductController.jsx +21 -0
  120. package/src/app/viewState.js +35 -0
  121. package/src/app/viewport.js +21 -0
  122. package/src/app/visualDormancy.js +286 -0
  123. package/src/app/workspaceContinuityNotices.js +32 -0
  124. package/src/app/workspaceDisplayCounts.js +9 -0
  125. package/src/app/workspaceEntrypointIntakeCommand.js +87 -0
  126. package/src/app/workspaceEntrypointProductRouting.case.mjs +20 -0
  127. package/src/app/workspaceExportCommand.js +21 -0
  128. package/src/app/workspaceExportDownload.js +23 -0
  129. package/src/app/workspaceExportExecutionCommand.js +10 -0
  130. package/src/app/workspaceGithubPublication.js +237 -0
  131. package/src/app/workspaceHandoffExport.js +56 -0
  132. package/src/app/workspaceHomeTarget.js +9 -0
  133. package/src/app/workspaceMulticolumn.js +113 -0
  134. package/src/app/workspaceNavigationParity.case.mjs +110 -0
  135. package/src/app/workspaceOpenProgress.js +26 -0
  136. package/src/app/workspacePlacementOptions.js +46 -0
  137. package/src/app/workspaceRecordActions.js +158 -0
  138. package/src/app/workspaceScopedInteraction.js +68 -0
  139. package/src/app/workspaceSelectionOriginContext.js +29 -0
  140. package/src/app/workspaceSelectionSession.js +54 -0
  141. package/src/app/workspaceSourceCloseCommand.js +25 -0
  142. package/src/app/workspaceSpineProductRouting.case.mjs +22 -0
  143. package/src/app/workspaceStartupTransition.js +32 -0
  144. package/src/app/workspaceWindow.js +85 -0
  145. package/src/artifacts/artifact.fixture.js +1 -0
  146. package/src/artifacts/artifact.identity.js +6 -0
  147. package/src/artifacts/artifact.identityAggregation.js +218 -0
  148. package/src/artifacts/artifact.model.js +2 -0
  149. package/src/artifacts/artifact.parse.case.mjs +196 -0
  150. package/src/artifacts/artifact.participantIndex.js +189 -0
  151. package/src/artifacts/fixtures/evidence.trace.md +50 -0
  152. package/src/artifacts/fixtures/topic.trace.md +33 -0
  153. package/src/artifacts/fixtures/unknown-schema.trace.md +25 -0
  154. package/src/audit/audit.findings.js +1 -0
  155. package/src/audit/audit.model.js +2 -0
  156. package/src/audit/audit.plan.js +13 -0
  157. package/src/audit/audit.report.js +12 -0
  158. package/src/audit/audit.severity.js +1 -0
  159. package/src/audit/audit.traverse.js +119 -0
  160. package/src/audit/integrity/auditIntegrity.checks.js +1 -0
  161. package/src/audit/integrity/auditIntegrity.compare.js +1 -0
  162. package/src/audit/lineage/auditLineage.load.js +1 -0
  163. package/src/audit/lineage/auditLineage.plan.js +1 -0
  164. package/src/audit/lineage/auditLineage.resolve.js +12 -0
  165. package/src/audit/sources/auditSources.boundaries.js +1 -0
  166. package/src/audit/sources/auditSources.checks.js +1 -0
  167. package/src/audit/validation/auditValidation.recheck.js +1 -0
  168. package/src/audit/validation/auditValidation.run.js +1 -0
  169. package/src/build.identity.js +15 -0
  170. package/src/commands/command.vocabulary.js +14 -0
  171. package/src/conformance/conformance.fixtures.js +151 -0
  172. package/src/conformance/conformance.run.js +238 -0
  173. package/src/data/applicationDataStore.js +23 -0
  174. package/src/data/companionAccess.js +35 -0
  175. package/src/diagnostics/events.js +1 -0
  176. package/src/diagnostics/invariant.js +1 -0
  177. package/src/diagnostics/schemaBindingChecks.js +1 -0
  178. package/src/diagnostics/schemaModuleChecks.js +1 -0
  179. package/src/diagnostics/sourceBoundaryChecks.js +5 -0
  180. package/src/diagnostics/sourceTransport.report.js +190 -0
  181. package/src/discovery/discovery.controls.js +7 -0
  182. package/src/export/export.plan.js +182 -0
  183. package/src/export/handoff.plan.js +50 -0
  184. package/src/export/package.builder.case.mjs +97 -0
  185. package/src/export/package.controlTopology.case.mjs +130 -0
  186. package/src/export/package.zip.case.mjs +33 -0
  187. package/src/graph/artifactGraph.model.js +344 -0
  188. package/src/graph/artifactGraph.project.js +139 -0
  189. package/src/graph/artifactGraph.worker.js +10 -0
  190. package/src/i18n/i18n.keys.js +1 -0
  191. package/src/i18n/i18n.provider.js +1 -0
  192. package/src/i18n/i18n.resolve.js +5 -0
  193. package/src/i18n/locales/en/common.json +4 -0
  194. package/src/i18n/locales/en/schemas/evidence.json +3 -0
  195. package/src/i18n/locales/en/schemas/presentation-surface.json +3 -0
  196. package/src/i18n/locales/en/schemas/preservation.json +3 -0
  197. package/src/i18n/locales/en/schemas/root.json +3 -0
  198. package/src/i18n/locales/en/schemas/schema-module.json +3 -0
  199. package/src/i18n/locales/en/schemas/topic.json +3 -0
  200. package/src/i18n/locales/en/surfaces/audit.json +3 -0
  201. package/src/i18n/locales/en/surfaces/create.json +3 -0
  202. package/src/i18n/locales/en/surfaces/detail.json +3 -0
  203. package/src/i18n/locales/en/surfaces/display-options.json +3 -0
  204. package/src/i18n/locales/en/surfaces/edit.json +3 -0
  205. package/src/i18n/locales/en/surfaces/feed.json +3 -0
  206. package/src/i18n/locales/en/surfaces/lineage.json +3 -0
  207. package/src/i18n/locales/en/surfaces/preview.json +3 -0
  208. package/src/i18n/locales/en/surfaces/share.json +3 -0
  209. package/src/i18n/locales/en/surfaces/source-settings.json +3 -0
  210. package/src/i18n/locales/en/surfaces/tree.json +3 -0
  211. package/src/i18n/locales/sv/common.json +4 -0
  212. package/src/i18n/locales/sv/schemas/evidence.json +3 -0
  213. package/src/i18n/locales/sv/schemas/presentation-surface.json +3 -0
  214. package/src/i18n/locales/sv/schemas/preservation.json +3 -0
  215. package/src/i18n/locales/sv/schemas/root.json +3 -0
  216. package/src/i18n/locales/sv/schemas/schema-module.json +3 -0
  217. package/src/i18n/locales/sv/schemas/topic.json +3 -0
  218. package/src/i18n/locales/sv/surfaces/audit.json +3 -0
  219. package/src/i18n/locales/sv/surfaces/create.json +3 -0
  220. package/src/i18n/locales/sv/surfaces/detail.json +3 -0
  221. package/src/i18n/locales/sv/surfaces/display-options.json +3 -0
  222. package/src/i18n/locales/sv/surfaces/edit.json +3 -0
  223. package/src/i18n/locales/sv/surfaces/feed.json +3 -0
  224. package/src/i18n/locales/sv/surfaces/lineage.json +3 -0
  225. package/src/i18n/locales/sv/surfaces/preview.json +3 -0
  226. package/src/i18n/locales/sv/surfaces/share.json +3 -0
  227. package/src/i18n/locales/sv/surfaces/source-settings.json +3 -0
  228. package/src/i18n/locales/sv/surfaces/tree.json +3 -0
  229. package/src/index.js +10 -0
  230. package/src/integrity/integrity.testFixture.js +9 -0
  231. package/src/interaction/interaction.spine.js +12 -0
  232. package/src/lineage/lineage.audit.js +1 -0
  233. package/src/lineage/lineage.edges.js +1 -0
  234. package/src/main.js +319 -0
  235. package/src/main.jsx +34 -0
  236. package/src/multiverse/multiverse.model.js +10 -0
  237. package/src/parity/poc.m1ParityScenarios.js +42 -0
  238. package/src/parity/poc.parityLedger.js +261 -0
  239. package/src/publication/publication.githubSocialContract.case.mjs +247 -0
  240. package/src/publication/publication.preflight.case.mjs +64 -0
  241. package/src/react/TiinexApplication.jsx +39 -0
  242. package/src/react/VerseHost.jsx +29 -0
  243. package/src/react/applicationDataContext.jsx +30 -0
  244. package/src/react.js +2 -0
  245. package/src/readers/modes/audit.reader.js +1 -0
  246. package/src/readers/modes/detail.reader.js +1 -0
  247. package/src/readers/modes/handover.reader.js +1 -0
  248. package/src/readers/modes/mobile.reader.js +1 -0
  249. package/src/readers/modes/print.reader.js +1 -0
  250. package/src/readers/modes/scan.reader.js +1 -0
  251. package/src/readers/reader.model.js +1 -0
  252. package/src/readers/reader.resolve.js +2 -0
  253. package/src/reingest/reingest.plan.case.mjs +65 -0
  254. package/src/runtime.js +54 -0
  255. package/src/schemas/README.md +99 -0
  256. package/src/schemas/coordination/handoff/tiinex.handoff.v1.schema.md +614 -0
  257. package/src/schemas/coordination/project/tiinex.project.v1.schema.md +311 -0
  258. package/src/schemas/core/decision/tiinex.decision.v1.schema.md +227 -0
  259. package/src/schemas/core/evidence/tiinex.evidence.v1.schema.md +318 -0
  260. package/src/schemas/core/feedback/tiinex.feedback.v1.schema.md +243 -0
  261. package/src/schemas/core/interpretation/.transitions/evidence-to-interpretation-transition-definition.trace.md +102 -0
  262. package/src/schemas/core/interpretation/tiinex.interpretation.v1.schema.md +308 -0
  263. package/src/schemas/core/preservation/tiinex.preservation.v1.schema.md +312 -0
  264. package/src/schemas/core/relation/.generation/reference-relation-generation-authority.trace.md +185 -0
  265. package/src/schemas/core/relation/.transitions/topic-references-task-transition-definition.trace.md +119 -0
  266. package/src/schemas/core/relation/tiinex.relation.v1.schema.md +240 -0
  267. package/src/schemas/core/relation/workspace/representation/tiinex.workspace.representation.v1.schema.md +550 -0
  268. package/src/schemas/core/signal/tiinex.signal.v1.schema.md +239 -0
  269. package/src/schemas/core/task/.transitions/create-task-transition-definition.trace.md +93 -0
  270. package/src/schemas/core/task/.transitions/topic-to-task-transition-definition.trace.md +102 -0
  271. package/src/schemas/core/task/task-semantic-package.trace.md +53 -0
  272. package/src/schemas/core/task/tiinex.task.v1-transitions.trace.md +33 -0
  273. package/src/schemas/core/task/tiinex.task.v1.authoring.js +65 -0
  274. package/src/schemas/core/task/tiinex.task.v1.schema.md +229 -0
  275. package/src/schemas/core/topic/.transitions/create-topic-transition-definition.trace.md +93 -0
  276. package/src/schemas/core/topic/tiinex.topic.v1-transitions.trace.md +33 -0
  277. package/src/schemas/core/topic/tiinex.topic.v1.schema.md +197 -0
  278. package/src/schemas/core/topic/topic-semantic-package.trace.md +53 -0
  279. package/src/schemas/discovery/finding/tiinex.discovery.finding.v1.schema.md +240 -0
  280. package/src/schemas/discovery/tiinex.discovery.v1.schema.md +294 -0
  281. package/src/schemas/manifest.json +367 -0
  282. package/src/schemas/origins.js +46 -0
  283. package/src/schemas/party/organization/tiinex.party.organization.v1.schema.md +290 -0
  284. package/src/schemas/party/role/tiinex.party.role.v1.schema.md +298 -0
  285. package/src/schemas/party/tiinex.party.v1.schema.js +14 -0
  286. package/src/schemas/party/tiinex.party.v1.schema.json +23 -0
  287. package/src/schemas/party/tiinex.party.v1.schema.md +311 -0
  288. package/src/schemas/party/tiinex.party.v1.schema.runtime.json +2033 -0
  289. package/src/schemas/party/tiinex.party.v1.schema.source.js +9 -0
  290. package/src/schemas/presentation/surface/tiinex.presentation.surface.v1.schema.md +476 -0
  291. package/src/schemas/reduction/tiinex.reduction.v1.schema.md +248 -0
  292. package/src/schemas/schema/module/tiinex.schema.module.v1.schema.md +465 -0
  293. package/src/schemas/schema.companionContract.case.mjs +259 -0
  294. package/src/schemas/schema.factory.case.mjs +256 -0
  295. package/src/schemas/schema.factory.viewerProjection.js +183 -0
  296. package/src/schemas/schemaMarkdownCatalog.js +19 -0
  297. package/src/schemas/tiinex.root.v1.schema.md +865 -0
  298. package/src/schemas/validation/finding/tiinex.validation.finding.v1.schema.md +309 -0
  299. package/src/schemas/validation/method/tiinex.validation.method.v1.schema.md +280 -0
  300. package/src/schemas/validation/report/tiinex.validation.report.v1.schema.md +300 -0
  301. package/src/schemas/workspace/tiinex.workspace.v1.schema.md +486 -0
  302. package/src/schemas/workspace/workspace.add.views.jsx +327 -0
  303. package/src/schemas/workspace/workspace.audit.views.jsx +160 -0
  304. package/src/schemas/workspace/workspace.auditBadge.views.jsx +98 -0
  305. package/src/schemas/workspace/workspace.canonicalReferenceDialog.views.jsx +63 -0
  306. package/src/schemas/workspace/workspace.canonicalTaskDialog.views.jsx +169 -0
  307. package/src/schemas/workspace/workspace.cardActions.js +9 -0
  308. package/src/schemas/workspace/workspace.cards.views.jsx +146 -0
  309. package/src/schemas/workspace/workspace.chrome.views.jsx +299 -0
  310. package/src/schemas/workspace/workspace.continuationDialog.views.jsx +80 -0
  311. package/src/schemas/workspace/workspace.discovery.views.jsx +63 -0
  312. package/src/schemas/workspace/workspace.discoveryRenderWindow.js +56 -0
  313. package/src/schemas/workspace/workspace.displayOptions.views.jsx +114 -0
  314. package/src/schemas/workspace/workspace.entrypointChoice.views.jsx +30 -0
  315. package/src/schemas/workspace/workspace.exportDialog.controller.jsx +40 -0
  316. package/src/schemas/workspace/workspace.exportDialog.views.jsx +142 -0
  317. package/src/schemas/workspace/workspace.governance.views.jsx +45 -0
  318. package/src/schemas/workspace/workspace.graph.views.jsx +134 -0
  319. package/src/schemas/workspace/workspace.lineage.views.jsx +307 -0
  320. package/src/schemas/workspace/workspace.read.views.jsx +105 -0
  321. package/src/schemas/workspace/workspace.recordActionButton.views.jsx +35 -0
  322. package/src/schemas/workspace/workspace.recordDialogs.views.jsx +257 -0
  323. package/src/schemas/workspace/workspace.selection.views.jsx +14 -0
  324. package/src/schemas/workspace/workspace.sourceReceipt.views.jsx +40 -0
  325. package/src/schemas/workspace/workspace.timePortal.views.jsx +56 -0
  326. package/src/schemas/workspace/workspace.tree.views.jsx +107 -0
  327. package/src/schemas/workspace/workspace.viewFormatting.js +172 -0
  328. package/src/schemas/workspace/workspace.views.jsx +210 -0
  329. package/src/source-settings/sourceSettings.model.js +7 -0
  330. package/src/sources/draft/draft.source.js +1 -0
  331. package/src/sources/github/github.loader.js +204 -0
  332. package/src/sources/github/github.permalink.js +1 -0
  333. package/src/sources/github/github.source.js +1 -0
  334. package/src/sources/github/github.transport.case.mjs +237 -0
  335. package/src/sources/github/github.transport.js +472 -0
  336. package/src/sources/local/local.source.js +1 -0
  337. package/src/sources/source.assetReferences.js +109 -0
  338. package/src/sources/source.boundaries.js +24 -0
  339. package/src/sources/source.identity.js +56 -0
  340. package/src/sources/source.model.case.mjs +26 -0
  341. package/src/sources/source.model.js +56 -0
  342. package/src/sources/source.presenter.js +66 -0
  343. package/src/sources/source.resolve.js +11 -0
  344. package/src/sources/static/static.source.js +1 -0
  345. package/src/sources/transport.policy.case.mjs +39 -0
  346. package/src/sources/transport.policy.js +81 -0
  347. package/src/storage/storage.policy.js +79 -0
  348. package/src/styles/app.css +8699 -0
  349. package/src/styles/responsive.css +10 -0
  350. package/src/styles/theme.css +4 -0
  351. package/src/styles/tokens.css +30 -0
  352. package/src/surfaces/audit/AuditSurface.js +1 -0
  353. package/src/surfaces/audit/audit.model.js +1 -0
  354. package/src/surfaces/audit/audit.render.js +1 -0
  355. package/src/surfaces/contracts.js +45 -0
  356. package/src/surfaces/create/CreateSurface.js +1 -0
  357. package/src/surfaces/create/create.model.js +1 -0
  358. package/src/surfaces/create/create.render.js +1 -0
  359. package/src/surfaces/detail/DetailSurface.js +1 -0
  360. package/src/surfaces/detail/detail.model.js +1 -0
  361. package/src/surfaces/detail/detail.render.js +1 -0
  362. package/src/surfaces/display-options/DisplayOptionsSurface.js +1 -0
  363. package/src/surfaces/display-options/displayOptions.model.js +1 -0
  364. package/src/surfaces/display-options/displayOptions.render.js +1 -0
  365. package/src/surfaces/edit/EditSurface.js +1 -0
  366. package/src/surfaces/edit/edit.model.js +1 -0
  367. package/src/surfaces/edit/edit.render.js +1 -0
  368. package/src/surfaces/feed/FeedSurface.js +1 -0
  369. package/src/surfaces/feed/feed.model.js +1 -0
  370. package/src/surfaces/feed/feed.render.js +1 -0
  371. package/src/surfaces/lineage/LineageSurface.js +1 -0
  372. package/src/surfaces/lineage/lineage.model.js +1 -0
  373. package/src/surfaces/lineage/lineage.render.js +1 -0
  374. package/src/surfaces/preview/PreviewSurface.js +1 -0
  375. package/src/surfaces/preview/preview.model.js +1 -0
  376. package/src/surfaces/preview/preview.render.js +1 -0
  377. package/src/surfaces/registry.js +58 -0
  378. package/src/surfaces/share/ShareSurface.js +1 -0
  379. package/src/surfaces/share/share.model.js +1 -0
  380. package/src/surfaces/share/share.render.js +1 -0
  381. package/src/surfaces/source-settings/SourceSettingsSurface.js +1 -0
  382. package/src/surfaces/source-settings/sourceSettings.model.js +1 -0
  383. package/src/surfaces/source-settings/sourceSettings.render.js +1 -0
  384. package/src/surfaces/surfaceContext.js +1 -0
  385. package/src/surfaces/tree/TreeSurface.js +1 -0
  386. package/src/surfaces/tree/tree.model.js +1 -0
  387. package/src/surfaces/tree/tree.render.js +1 -0
  388. package/src/tooling/portable/adapters/cli/cli.common-output.case.mjs +153 -0
  389. package/src/tooling/portable/adapters/cli/cli.handoff-sibling-allocation.case.mjs +52 -0
  390. package/src/tooling/portable/adapters/cli/cli.run.case.mjs +372 -0
  391. package/src/tooling/portable/adapters/cli/cli.summaryProjection.case.mjs +46 -0
  392. package/src/tooling/portable/audit/audit.capability.case.mjs +45 -0
  393. package/src/tooling/portable/fixtures/legacy-artifacts/collaboration/dogfood/001-tiinex-development-dogfood-collaboration-model.trace.fixture.txt +37 -0
  394. package/src/tooling/portable/fixtures/legacy-artifacts/handoff/tooling/001-v480-tooling-workflow-schema-enablement-handoff.trace.fixture.txt +108 -0
  395. 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
  396. package/src/tooling/portable/fixtures/legacy-artifacts/loom/role/001-loom-role.trace.fixture.txt +61 -0
  397. package/src/tooling/portable/fixtures/legacy-artifacts/sigma/role/001-1-sigma-role.trace.fixture.txt +61 -0
  398. 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
  399. 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
  400. 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
  401. 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
  402. 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
  403. 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
  404. package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-1-site-tooling-v471-portable-lineage-authoring-closure-result.trace.fixture.txt +48 -0
  405. package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/001-site-tooling-v471-portable-lineage-authoring-closure.trace.fixture.txt +39 -0
  406. package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/002-1-v475-canonical-artifact-envelope-reference-integrity-validation.trace.fixture.txt +43 -0
  407. package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/003-1-v476-canonical-authority-binding-integrity-method-lineage-alloca.trace.fixture.txt +42 -0
  408. package/src/tooling/portable/fixtures/legacy-artifacts/tooling/dogfood/027-handoff-package-workspace-archive-and-control-plane-minimality-audit.trace.fixture.txt +56 -0
  409. package/src/tooling/portable/fixtures/legacyArtifactFixtures.mjs +34 -0
  410. package/src/tooling/portable/grounding/grounding.capsule.case.mjs +65 -0
  411. package/src/tooling/portable/grounding/grounding.readiness.case.mjs +543 -0
  412. package/src/tooling/portable/grounding/grounding.semanticIntegration.case.mjs +131 -0
  413. package/src/tooling/portable/handoff/boundedWorkspaceRepresentation.case.mjs +103 -0
  414. package/src/tooling/portable/handoff/carrierLineage.fixedWidth.case.mjs +97 -0
  415. package/src/tooling/portable/handoff/coldStartQualification.case.mjs +293 -0
  416. package/src/tooling/portable/handoff/fixtures/027-invalid-audit-result.fixture.txt +192 -0
  417. package/src/tooling/portable/handoff/fixtures/027-invalid-return-handoff.fixture.txt +92 -0
  418. package/src/tooling/portable/handoff/fixtures/cold-start-qualification.v1.examples.json +60 -0
  419. package/src/tooling/portable/handoff/handoff.manufacture.case.mjs +293 -0
  420. package/src/tooling/portable/handoff/materialClosure.case.mjs +727 -0
  421. package/src/tooling/portable/handoff/multiRootManufacture.case.mjs +615 -0
  422. package/src/tooling/portable/handoff/operatorBridgeCore.case.mjs +205 -0
  423. package/src/tooling/portable/handoff/workspaceLandingPlan.case.mjs +143 -0
  424. package/src/tooling/portable/input/node.input.case.mjs +293 -0
  425. package/src/tooling/portable/lifecycle/lifecycle.readiness.case.mjs +179 -0
  426. package/src/tooling/portable/lineage/fixtures/lineage.integrity.repair-projection.v1.examples.json +605 -0
  427. package/src/tooling/portable/lineage/lineage.integrity.shared-capability.case.mjs +37 -0
  428. package/src/tooling/portable/lineage/publicationProviderReceipt.fixture.mjs +50 -0
  429. package/src/tooling/portable/package/fixtures/reference-relation-generation-authority.trace.md +84 -0
  430. package/src/tooling/portable/package/fixtures/tiinex.root.v1.package-authority.contract-fixture.md +64 -0
  431. package/src/tooling/portable/package/fixtures/tiinex.schema.generation.v1.generation-binding.contract-fixture.md +140 -0
  432. package/src/tooling/portable/package/fixtures/tiinex.schema.transition.companion.v1.contract-fixture.md +73 -0
  433. package/src/tooling/portable/package/fixtures/tiinex.semantic.package.v1.contract-fixture.md +147 -0
  434. package/src/tooling/portable/package/fixtures/tiinex.transition.definition.v1.package-contract-fixture.md +77 -0
  435. package/src/tooling/portable/providers/schema.providers.genericity.case.mjs +31 -0
  436. package/src/tooling/portable/reduction/reduction.preflight.case.mjs +298 -0
  437. package/src/tooling/portable/schema/fixtures/evidence-preservation-body.inheritance-record-fixture.md +65 -0
  438. package/src/tooling/portable/schema/fixtures/tiinex.portal.time.v1.contract-fixture.md +294 -0
  439. package/src/tooling/portable/schema/fixtures/tiinex.root.v1.contract-fixture.md +584 -0
  440. package/src/tooling/portable/schema/fixtures/tiinex.root.v1.machine-shape.contract-fixture.md +44 -0
  441. package/src/tooling/portable/schema/fixtures/tiinex.root.v1.ordinary-target.contract-fixture.md +630 -0
  442. package/src/tooling/portable/schema/fixtures/tiinex.schema.contract.v1.repeated-record.contract-fixture.md +69 -0
  443. package/src/tooling/portable/schema/fixtures/tiinex.schema.generation.v1.repeated-record.contract-fixture.md +98 -0
  444. package/src/tooling/portable/schema/fixtures/tiinex.schema.inheritance.v1.repeated-record.contract-fixture.md +58 -0
  445. package/src/tooling/portable/schema/fixtures/tiinex.task.v1.contract-fixture.md +165 -0
  446. package/src/tooling/portable/schema/fixtures/tiinex.transition.definition.v1.contract-fixture.md +744 -0
  447. package/src/tooling/portable/schema/fixtures/tiinex.transition.definition.v1.field-domain.contract-fixture.md +319 -0
  448. package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.relation.v1.schema.md +240 -0
  449. package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.schema.contract.v1.schema.md +391 -0
  450. package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.schema.generation.v1.schema.md +379 -0
  451. package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.schema.transition.companion.v1.schema.md +265 -0
  452. package/src/transitions/canonical-schema-cache/053d46ce082d4ec261b82abc44ecca403d61e240/tiinex.semantic.package.v1.schema.md +402 -0
  453. package/src/transitions/canonical-schema-cache/52ecdea0a75893882ce282214d155f70e1309c2a/tiinex.topic.v1.schema.md +197 -0
  454. package/src/transitions/canonical-schema-cache/d69b8ff55a56b8cb9282b8684db6a938a4435b94/tiinex.root.v1.schema.md +797 -0
  455. package/src/transitions/canonical-schema-cache/d69b8ff55a56b8cb9282b8684db6a938a4435b94/tiinex.transition.definition.v1.schema.md +1062 -0
  456. package/src/transitions/canonicalTransition.packageContracts.js +22 -0
  457. package/src/transitions/canonicalTransition.productDefaults.js +105 -0
  458. package/src/transitions/canonicalTransition.schemaCache.case.mjs +45 -0
  459. package/src/transitions/canonicalTransition.schemaCache.js +81 -0
  460. package/src/transitions/canonicalTransition.semanticPackage.js +146 -0
  461. package/src/transitions/record.transitions.case.mjs +88 -0
  462. package/src/transitions/transition.authorityRepresentation.js +55 -0
  463. package/src/transitions/transition.availabilityPlanner.js +376 -0
  464. package/src/transitions/transition.availabilitySemantics.js +150 -0
  465. package/src/transitions/transition.definitionReadProjection.js +107 -0
  466. package/src/transitions/transition.definitionRegistry.js +355 -0
  467. package/src/transitions/transition.definitionRegistryAggregation.js +21 -0
  468. package/src/transitions/transition.definitions.js +46 -0
  469. package/src/transitions/transition.explicitGenerationPlanner.js +58 -0
  470. package/src/transitions/transition.generationInputPlanner.js +19 -0
  471. package/src/transitions/transition.interpretationMaterializer.js +2 -0
  472. package/src/transitions/transition.invocationBindingPacket.js +52 -0
  473. package/src/transitions/transition.invocationBindingPlanner.js +467 -0
  474. package/src/transitions/transition.legacyShorthand.js +133 -0
  475. package/src/transitions/transition.localArtifactMaterializers.js +16 -0
  476. package/src/transitions/transition.localCreateCapability.js +111 -0
  477. package/src/transitions/transition.outputMaterializationPlanner.js +336 -0
  478. package/src/transitions/transition.parentReference.js +90 -0
  479. package/src/transitions/transition.presentation.js +43 -0
  480. package/src/transitions/transition.productPreparation.js +377 -0
  481. package/src/transitions/transition.productPresentation.browser.js +28 -0
  482. package/src/transitions/transition.productPresentation.js +55 -0
  483. package/src/transitions/transition.referenceCreateCapability.js +119 -0
  484. package/src/transitions/transition.referenceTarget.js +50 -0
  485. package/src/transitions/transition.relationMaterializer.js +2 -0
  486. package/src/transitions/transition.resultSemantics.js +453 -0
  487. package/src/transitions/transition.taskMaterializer.js +2 -0
  488. package/src/transitions/transition.topicMaterializer.js +2 -0
  489. package/src/transitions/transition.validate.case.mjs +58 -0
  490. package/src/ui/cards/ArtifactCard.js +1 -0
  491. package/src/ui/cards/SchemaCard.js +1 -0
  492. package/src/ui/cards/SourceCard.js +1 -0
  493. package/src/ui/dialog.presenter.js +24 -0
  494. package/src/ui/feedback/DegradedNotice.js +1 -0
  495. package/src/ui/feedback/EmptyState.js +1 -0
  496. package/src/ui/feedback/ValidationNotice.js +1 -0
  497. package/src/ui/forms/FormRenderer.js +1 -0
  498. package/src/ui/forms/fields/MarkdownField.js +1 -0
  499. package/src/ui/forms/fields/SelectField.js +1 -0
  500. package/src/ui/forms/fields/SourcePickerField.js +1 -0
  501. package/src/ui/forms/fields/TextField.js +1 -0
  502. package/src/ui/icon.paths.js +37 -0
  503. package/src/ui/layout/Panel.js +1 -0
  504. package/src/ui/layout/ResponsiveFrame.js +1 -0
  505. package/src/ui/layout/SplitView.js +1 -0
  506. package/src/ui/layout/Stack.js +1 -0
  507. package/src/ui/panels/DetailPanel.js +1 -0
  508. package/src/ui/panels/LineagePanel.js +1 -0
  509. package/src/ui/panels/SourcePanel.js +1 -0
  510. package/src/ui/primitives/Badge.js +1 -0
  511. package/src/ui/primitives/Badge.jsx +5 -0
  512. package/src/ui/primitives/Button.js +1 -0
  513. package/src/ui/primitives/Button.jsx +12 -0
  514. package/src/ui/primitives/Card.js +1 -0
  515. package/src/ui/primitives/Field.js +1 -0
  516. package/src/ui/primitives/Field.jsx +21 -0
  517. package/src/ui/primitives/Icon.jsx +90 -0
  518. package/src/ui/primitives/Modal.jsx +27 -0
  519. package/src/validation/i18n.js +37 -0
  520. package/src/validation/validateArtifact.case.mjs +41 -0
  521. package/src/verses/column/ColumnVerse.js +1 -0
  522. package/src/verses/column/column.model.js +6 -0
  523. package/src/verses/column/column.project.js +7 -0
  524. package/src/verses/context.js +26 -0
  525. package/src/verses/contracts.js +1 -0
  526. package/src/verses/hostRegistry.js +47 -0
  527. package/src/verses/registry.js +22 -0
  528. package/src/verses/universe.model.js +8 -0
  529. package/src/verses/universe.presenter.js +8 -0
  530. package/src/verses/universe.project.js +12 -0
  531. package/src/viewer.js +34 -0
  532. package/src/workspace.model.js +5 -0
  533. package/src/workspaces/workspace.actions.js +1 -0
  534. package/src/workspaces/workspace.artifactActions.js +56 -0
  535. package/src/workspaces/workspace.auditView.js +153 -0
  536. package/src/workspaces/workspace.candidates.js +149 -0
  537. package/src/workspaces/workspace.config.js +153 -0
  538. package/src/workspaces/workspace.configuredSource.js +68 -0
  539. package/src/workspaces/workspace.discoveryProgress.js +34 -0
  540. package/src/workspaces/workspace.discoveryView.js +386 -0
  541. package/src/workspaces/workspace.displayFilters.js +63 -0
  542. package/src/workspaces/workspace.displayOptions.js +58 -0
  543. package/src/workspaces/workspace.emptyStateCopy.js +24 -0
  544. package/src/workspaces/workspace.entrypointLifecycle.js +131 -0
  545. package/src/workspaces/workspace.entrypointViewIntent.js +83 -0
  546. package/src/workspaces/workspace.entrypoints.js +157 -0
  547. package/src/workspaces/workspace.feedSort.js +152 -0
  548. package/src/workspaces/workspace.import.js +212 -0
  549. package/src/workspaces/workspace.importConflicts.js +200 -0
  550. package/src/workspaces/workspace.importLifecycle.case.mjs +103 -0
  551. package/src/workspaces/workspace.lifecycle.case.mjs +353 -0
  552. package/src/workspaces/workspace.lifecycle.js +357 -0
  553. package/src/workspaces/workspace.lineageView.js +244 -0
  554. package/src/workspaces/workspace.localSourceLifecycle.js +91 -0
  555. package/src/workspaces/workspace.materialLedger.js +110 -0
  556. package/src/workspaces/workspace.materialReconciliation.case.mjs +164 -0
  557. package/src/workspaces/workspace.materialReconciliation.js +390 -0
  558. package/src/workspaces/workspace.memberIdentity.js +140 -0
  559. package/src/workspaces/workspace.model.js +2 -0
  560. package/src/workspaces/workspace.navigation.js +20 -0
  561. package/src/workspaces/workspace.openSemantics.js +33 -0
  562. package/src/workspaces/workspace.pathTree.js +132 -0
  563. package/src/workspaces/workspace.persistence.case.mjs +271 -0
  564. package/src/workspaces/workspace.persistence.js +469 -0
  565. package/src/workspaces/workspace.persistenceCache.js +41 -0
  566. package/src/workspaces/workspace.persistenceClear.js +45 -0
  567. package/src/workspaces/workspace.persistencePresentation.js +93 -0
  568. package/src/workspaces/workspace.persistenceRecovery.js +147 -0
  569. package/src/workspaces/workspace.persistenceRouteCache.js +82 -0
  570. package/src/workspaces/workspace.publicationReceipts.case.mjs +36 -0
  571. package/src/workspaces/workspace.publicationReceipts.js +56 -0
  572. package/src/workspaces/workspace.recoverabilityView.js +264 -0
  573. package/src/workspaces/workspace.route.js +432 -0
  574. package/src/workspaces/workspace.runtimeCanonical.js +18 -0
  575. package/src/workspaces/workspace.sourceMaterial.js +71 -0
  576. package/src/workspaces/workspace.sourceRecordPath.js +5 -0
  577. package/src/workspaces/workspace.sourceRecords.js +75 -0
  578. package/src/workspaces/workspace.store.js +3 -0
  579. package/src/workspaces/workspace.summary.js +116 -0
  580. 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');