@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,453 @@
|
|
|
1
|
+
import { TRANSITION_DEFINITION_READ_MODEL_SCHEMA_ID } from './transition.definitionRegistry.js';
|
|
2
|
+
import { CANONICAL_TRANSITION_DEFINITION_SCHEMA_ID } from './transition.legacyShorthand.js';
|
|
3
|
+
import {
|
|
4
|
+
roleParticipantClassification,
|
|
5
|
+
participantClassificationUsable,
|
|
6
|
+
schemaRestrictionUnresolved
|
|
7
|
+
} from './transition.availabilitySemantics.js';
|
|
8
|
+
|
|
9
|
+
export const TRANSITION_RESULT_SEMANTICS_PLAN_SCHEMA_ID = 'tiinex.site.transition-result-semantics-plan.v1';
|
|
10
|
+
|
|
11
|
+
export function buildCanonicalTransitionResultPlan({ definition } = {}) {
|
|
12
|
+
if (!isCanonicalDefinitionReadModel(definition)) return blockedPlan(definition, 'definition-not-canonical-read-model');
|
|
13
|
+
if (definition.canonicalReadQualified !== true) return blockedPlan(definition, 'canonical-read-not-qualified');
|
|
14
|
+
|
|
15
|
+
const inputRoles = activeDeclarations(definition.inputRoles);
|
|
16
|
+
const outputRoleDeclarations = activeDeclarations(definition.outputRoles);
|
|
17
|
+
const destinations = activeDeclarations(definition.destinationBindings);
|
|
18
|
+
const roleNames = new Set([...inputRoles, ...outputRoleDeclarations].map((item) => String(item.name || '')));
|
|
19
|
+
const outputNames = new Set(outputRoleDeclarations.map((item) => String(item.name || '')));
|
|
20
|
+
const destinationNames = new Set(destinations.map((item) => String(item.name || '')));
|
|
21
|
+
|
|
22
|
+
const projectedOutputRoles = outputRoleDeclarations.map(projectOutputRole);
|
|
23
|
+
const lifecycleEffects = activeDeclarations(definition.lifecycleEffects).map((effect) => projectLifecycleEffect(effect, roleNames));
|
|
24
|
+
const parentEffects = activeDeclarations(definition.parentEffects).map((effect) => projectParentEffect(effect, roleNames, outputNames));
|
|
25
|
+
const relationEffects = activeDeclarations(definition.relationEffects).map((effect) => projectRelationEffect(effect, roleNames));
|
|
26
|
+
const outputPlacements = activeDeclarations(definition.outputPlacements).map((placement) => projectOutputPlacement(placement, roleNames, outputNames, destinationNames));
|
|
27
|
+
const outputRoles = projectedOutputRoles.map((role) => withLifecycleCoverage(role, lifecycleEffects));
|
|
28
|
+
const destinationBindings = destinations
|
|
29
|
+
.map(projectDestinationBinding)
|
|
30
|
+
.map((binding) => withDestinationPlacementCoverage(binding, outputPlacements));
|
|
31
|
+
const authoringGuidance = projectAuthoringGuidance(definition);
|
|
32
|
+
|
|
33
|
+
const unresolvedReasons = collectUnresolvedReasons({
|
|
34
|
+
outputRoles,
|
|
35
|
+
destinationBindings,
|
|
36
|
+
lifecycleEffects,
|
|
37
|
+
parentEffects,
|
|
38
|
+
relationEffects,
|
|
39
|
+
outputPlacements
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return Object.freeze({
|
|
43
|
+
schema: TRANSITION_RESULT_SEMANTICS_PLAN_SCHEMA_ID,
|
|
44
|
+
definition: definitionIdentity(definition),
|
|
45
|
+
readOnly: true,
|
|
46
|
+
mutation: false,
|
|
47
|
+
networkFetch: false,
|
|
48
|
+
executable: false,
|
|
49
|
+
qualification: unresolvedReasons.length ? 'unresolved' : 'qualified',
|
|
50
|
+
reasons: Object.freeze(unresolvedReasons),
|
|
51
|
+
outputRoles: Object.freeze(outputRoles),
|
|
52
|
+
lifecycleEffects: Object.freeze(lifecycleEffects),
|
|
53
|
+
parentEffects: Object.freeze(parentEffects),
|
|
54
|
+
relationEffects: Object.freeze(relationEffects),
|
|
55
|
+
destinationBindings: Object.freeze(destinationBindings),
|
|
56
|
+
outputPlacements: Object.freeze(outputPlacements),
|
|
57
|
+
authoringGuidance,
|
|
58
|
+
boundary: Object.freeze({
|
|
59
|
+
participantBinding: false,
|
|
60
|
+
conditionEvaluation: false,
|
|
61
|
+
concreteMemberMapping: false,
|
|
62
|
+
generationResolution: false,
|
|
63
|
+
pathResolution: false,
|
|
64
|
+
materialization: false,
|
|
65
|
+
parentMutation: false,
|
|
66
|
+
relationMaterialization: false,
|
|
67
|
+
execution: false
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function projectOutputRole(role = {}) {
|
|
73
|
+
const fields = role.fields || {};
|
|
74
|
+
const participantClassification = roleParticipantClassification(role);
|
|
75
|
+
const schemaConstraint = schemaToken(fields['Schema Constraint']);
|
|
76
|
+
const generationBinding = token(fields['Generation Binding']);
|
|
77
|
+
const classificationResolved = participantClassificationUsable(participantClassification);
|
|
78
|
+
const schemaRestrictionQualification = participantClassification.schemaConstraint?.qualification || (schemaConstraint ? 'unresolved' : 'absent');
|
|
79
|
+
const generation = generationBinding === 'target-schema'
|
|
80
|
+
? Object.freeze({ declared: generationBinding, authority: 'target-schema', qualification: 'not-evaluated', executable: false })
|
|
81
|
+
: generationBinding
|
|
82
|
+
? Object.freeze({ declared: generationBinding, authority: 'explicit-reference', qualification: 'not-evaluated', executable: false })
|
|
83
|
+
: Object.freeze({ declared: '', authority: 'none-prescribed', qualification: 'absent', executable: false });
|
|
84
|
+
return Object.freeze({
|
|
85
|
+
name: String(role.name || ''),
|
|
86
|
+
meaning: token(fields.Meaning),
|
|
87
|
+
minimumCount: cardinality(fields['Minimum Count'], false),
|
|
88
|
+
maximumCount: cardinality(fields['Maximum Count'], true),
|
|
89
|
+
targetKind: participantClassification.declared,
|
|
90
|
+
effectiveParticipantKind: classificationResolved ? participantClassification.resolved : '',
|
|
91
|
+
participantClassification,
|
|
92
|
+
schemaConstraint,
|
|
93
|
+
schemaConstraintQualification: schemaRestrictionQualification,
|
|
94
|
+
generationBinding,
|
|
95
|
+
generation,
|
|
96
|
+
selectionNotes: token(fields['Selection Notes']),
|
|
97
|
+
qualification: !classificationResolved || schemaRestrictionUnresolved(schemaConstraint, schemaRestrictionQualification)
|
|
98
|
+
? 'unresolved'
|
|
99
|
+
: 'qualified',
|
|
100
|
+
executable: false
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function projectLifecycleEffect(effect = {}, roleNames) {
|
|
105
|
+
const fields = effect.fields || {};
|
|
106
|
+
const targetBinding = bindingReference(fields['Target Binding'], roleNames, 'participant-role', true);
|
|
107
|
+
const resultBinding = bindingReference(fields['Result Binding'], roleNames, 'participant-role', false);
|
|
108
|
+
const effectLabel = token(fields.Effect);
|
|
109
|
+
const logicalContinuity = token(fields['Logical Continuity']);
|
|
110
|
+
const effectMeaning = token(fields['Effect Meaning']);
|
|
111
|
+
const preserveWhy = token(fields['Preserve Why']);
|
|
112
|
+
const mapping = memberMapping(fields);
|
|
113
|
+
const participation = effectParticipation(fields);
|
|
114
|
+
const reasons = [];
|
|
115
|
+
if (participation.state === 'unresolved') reasons.push('condition-unresolved');
|
|
116
|
+
if (targetBinding.qualification === 'unresolved') reasons.push('target-binding-unresolved');
|
|
117
|
+
if (resultBinding.qualification === 'unresolved') reasons.push('result-binding-unresolved');
|
|
118
|
+
if (effectLabel === 'unknown') reasons.push('effect-unresolved');
|
|
119
|
+
if (logicalContinuity === 'unknown') reasons.push('logical-continuity-unresolved');
|
|
120
|
+
if (preserveWhy === 'unknown') reasons.push('preserve-why-unresolved');
|
|
121
|
+
if (effectLabel === 'custom' && !effectMeaning) reasons.push('effect-meaning-required');
|
|
122
|
+
reasons.push(...mapping.semanticQualification.reasons.map((reason) => `member-mapping-${reason}`));
|
|
123
|
+
return Object.freeze({
|
|
124
|
+
name: String(effect.name || ''),
|
|
125
|
+
targetBinding,
|
|
126
|
+
effect: effectLabel,
|
|
127
|
+
resultBinding,
|
|
128
|
+
logicalContinuity,
|
|
129
|
+
effectMeaning,
|
|
130
|
+
requiredMaterializationOperation: token(fields['Required Materialization Operation']),
|
|
131
|
+
preserveWhy,
|
|
132
|
+
memberMapping: mapping,
|
|
133
|
+
participation,
|
|
134
|
+
semanticQualification: semanticQualification(reasons),
|
|
135
|
+
notes: token(fields.Notes),
|
|
136
|
+
executable: false,
|
|
137
|
+
command: null
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function projectParentEffect(effect = {}, roleNames, outputNames) {
|
|
142
|
+
const fields = effect.fields || {};
|
|
143
|
+
const outputBinding = bindingReference(fields['Output Binding'], outputNames, 'output-role', true);
|
|
144
|
+
const effectLabel = token(fields.Effect);
|
|
145
|
+
const parentBinding = bindingReference(fields['Parent Binding'], roleNames, 'participant-role', false);
|
|
146
|
+
const mapping = memberMapping(fields);
|
|
147
|
+
const participation = effectParticipation(fields);
|
|
148
|
+
const reasons = [];
|
|
149
|
+
if (participation.state === 'unresolved') reasons.push('condition-unresolved');
|
|
150
|
+
if (outputBinding.qualification === 'unresolved') reasons.push('output-binding-unresolved');
|
|
151
|
+
if (parentBinding.qualification === 'unresolved') reasons.push('parent-binding-unresolved');
|
|
152
|
+
if (effectLabel === 'unknown') reasons.push('effect-unresolved');
|
|
153
|
+
if (['set', 'replace'].includes(effectLabel) && parentBinding.qualification !== 'resolved') {
|
|
154
|
+
reasons.push('parent-binding-required');
|
|
155
|
+
}
|
|
156
|
+
reasons.push(...mapping.semanticQualification.reasons.map((reason) => `member-mapping-${reason}`));
|
|
157
|
+
return Object.freeze({
|
|
158
|
+
name: String(effect.name || ''),
|
|
159
|
+
outputBinding,
|
|
160
|
+
effect: effectLabel,
|
|
161
|
+
parentBinding,
|
|
162
|
+
memberMapping: mapping,
|
|
163
|
+
participation,
|
|
164
|
+
semanticQualification: semanticQualification(reasons),
|
|
165
|
+
notes: token(fields.Notes),
|
|
166
|
+
actualParentAssigned: false,
|
|
167
|
+
executable: false
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function projectRelationEffect(effect = {}, roleNames) {
|
|
172
|
+
const fields = effect.fields || {};
|
|
173
|
+
const predicateVocabulary = token(fields['Predicate Vocabulary']);
|
|
174
|
+
const predicateAuthority = token(fields['Predicate Authority']);
|
|
175
|
+
const predicateScope = predicateAuthority
|
|
176
|
+
? 'declared-authority'
|
|
177
|
+
: predicateVocabulary
|
|
178
|
+
? 'declared-vocabulary'
|
|
179
|
+
: 'local-transition-definition';
|
|
180
|
+
const subjectBinding = bindingReference(fields['Subject Binding'], roleNames, 'participant-role', true);
|
|
181
|
+
const objectBinding = bindingReference(fields['Object Binding'], roleNames, 'participant-role', true);
|
|
182
|
+
const effectLabel = token(fields.Effect);
|
|
183
|
+
const mapping = memberMapping(fields);
|
|
184
|
+
const participation = effectParticipation(fields);
|
|
185
|
+
const reasons = [];
|
|
186
|
+
if (participation.state === 'unresolved') reasons.push('condition-unresolved');
|
|
187
|
+
if (subjectBinding.qualification === 'unresolved') reasons.push('subject-binding-unresolved');
|
|
188
|
+
if (objectBinding.qualification === 'unresolved') reasons.push('object-binding-unresolved');
|
|
189
|
+
if (effectLabel === 'unknown') reasons.push('effect-unresolved');
|
|
190
|
+
reasons.push(...mapping.semanticQualification.reasons.map((reason) => `member-mapping-${reason}`));
|
|
191
|
+
return Object.freeze({
|
|
192
|
+
name: String(effect.name || ''),
|
|
193
|
+
effect: effectLabel,
|
|
194
|
+
subjectBinding,
|
|
195
|
+
predicateIdentifier: token(fields['Predicate Identifier']),
|
|
196
|
+
predicateMeaning: token(fields['Predicate Meaning']),
|
|
197
|
+
objectBinding,
|
|
198
|
+
directionality: token(fields.Directionality),
|
|
199
|
+
predicateLabel: token(fields['Predicate Label']),
|
|
200
|
+
predicateVocabulary,
|
|
201
|
+
predicateAuthority,
|
|
202
|
+
predicateScope,
|
|
203
|
+
portablePredicateIdentityClaimed: Boolean(predicateAuthority || predicateVocabulary),
|
|
204
|
+
inversePredicateIdentifier: token(fields['Inverse Predicate Identifier']),
|
|
205
|
+
memberMapping: mapping,
|
|
206
|
+
participation,
|
|
207
|
+
semanticQualification: semanticQualification(reasons),
|
|
208
|
+
notes: token(fields.Notes),
|
|
209
|
+
relationMaterialized: false,
|
|
210
|
+
executable: false
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function projectDestinationBinding(binding = {}) {
|
|
215
|
+
const fields = binding.fields || {};
|
|
216
|
+
const required = token(fields.Required);
|
|
217
|
+
return Object.freeze({
|
|
218
|
+
name: String(binding.name || ''),
|
|
219
|
+
fields: Object.freeze({ ...fields }),
|
|
220
|
+
meaning: token(fields.Meaning),
|
|
221
|
+
required,
|
|
222
|
+
requiredQualification: Object.freeze({
|
|
223
|
+
state: required === 'yes' ? 'required' : required === 'no' || !required ? 'not-required' : 'unresolved'
|
|
224
|
+
}),
|
|
225
|
+
invocationInputRequired: required === 'yes',
|
|
226
|
+
executable: false
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function projectOutputPlacement(placement = {}, roleNames, outputNames, destinationNames) {
|
|
231
|
+
const fields = placement.fields || {};
|
|
232
|
+
const outputBinding = bindingReference(fields['Output Binding'], outputNames, 'output-role', true);
|
|
233
|
+
const destinationBinding = bindingReference(fields['Destination Binding'], destinationNames, 'destination-binding', false);
|
|
234
|
+
const relativeToBinding = bindingReference(fields['Relative To Binding'], roleNames, 'participant-role', false);
|
|
235
|
+
const placementIntent = token(fields['Placement Intent']);
|
|
236
|
+
const namingAuthority = token(fields['Naming Authority']);
|
|
237
|
+
const namingAuthorityReference = token(fields['Naming Authority Reference']);
|
|
238
|
+
const namingQualification = namingAuthorityQualification(namingAuthority, namingAuthorityReference);
|
|
239
|
+
const explicitOverrideAllowed = token(fields['Explicit Override Allowed']);
|
|
240
|
+
const reasons = [];
|
|
241
|
+
if (outputBinding.qualification === 'unresolved') reasons.push('output-binding-unresolved');
|
|
242
|
+
if (destinationBinding.qualification === 'unresolved') reasons.push('destination-binding-unresolved');
|
|
243
|
+
if (relativeToBinding.qualification === 'unresolved') reasons.push('relative-to-binding-unresolved');
|
|
244
|
+
if (placementIntent === 'unknown') reasons.push('intent-unresolved');
|
|
245
|
+
if (namingQualification.state === 'unresolved') reasons.push(namingQualification.reason || 'naming-unresolved');
|
|
246
|
+
if (explicitOverrideAllowed === 'unknown') reasons.push('explicit-override-unresolved');
|
|
247
|
+
return Object.freeze({
|
|
248
|
+
name: String(placement.name || ''),
|
|
249
|
+
outputBinding,
|
|
250
|
+
destinationBinding,
|
|
251
|
+
placementIntent,
|
|
252
|
+
namingAuthority,
|
|
253
|
+
namingAuthorityReference,
|
|
254
|
+
namingQualification,
|
|
255
|
+
relativeToBinding,
|
|
256
|
+
relativePlacementMeaning: token(fields['Relative Placement Meaning']),
|
|
257
|
+
explicitOverrideAllowed,
|
|
258
|
+
semanticQualification: semanticQualification(reasons),
|
|
259
|
+
notes: token(fields.Notes),
|
|
260
|
+
concretePath: null,
|
|
261
|
+
pathQualification: 'not-evaluated',
|
|
262
|
+
materializationCommand: null,
|
|
263
|
+
executable: false
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function withLifecycleCoverage(role = {}, lifecycleEffects = []) {
|
|
268
|
+
const matchingEffects = lifecycleEffects.filter((effect) =>
|
|
269
|
+
effect.targetBinding?.resolvedName === role.name || effect.resultBinding?.resolvedName === role.name);
|
|
270
|
+
const active = matchingEffects.filter((effect) => effect.participation?.state === 'active');
|
|
271
|
+
const unresolved = matchingEffects.filter((effect) => effect.participation?.state === 'unresolved');
|
|
272
|
+
const state = active.length ? 'present' : unresolved.length ? 'unresolved' : 'missing';
|
|
273
|
+
return Object.freeze({
|
|
274
|
+
...role,
|
|
275
|
+
lifecycleCoverage: Object.freeze({
|
|
276
|
+
state,
|
|
277
|
+
effectNames: Object.freeze(matchingEffects.map((effect) => effect.name).sort()),
|
|
278
|
+
activeEffectNames: Object.freeze(active.map((effect) => effect.name).sort()),
|
|
279
|
+
unresolvedEffectNames: Object.freeze(unresolved.map((effect) => effect.name).sort())
|
|
280
|
+
})
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function withDestinationPlacementCoverage(binding = {}, placements = []) {
|
|
285
|
+
const placementNames = placements
|
|
286
|
+
.filter((placement) => placement.destinationBinding?.resolvedName === binding.name)
|
|
287
|
+
.map((placement) => placement.name)
|
|
288
|
+
.sort();
|
|
289
|
+
return Object.freeze({
|
|
290
|
+
...binding,
|
|
291
|
+
placementCoverage: Object.freeze({
|
|
292
|
+
state: placementNames.length ? 'present' : 'missing',
|
|
293
|
+
placementNames: Object.freeze(placementNames)
|
|
294
|
+
})
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function namingAuthorityQualification(authority = '', reference = '') {
|
|
299
|
+
if (!authority) return Object.freeze({ state: 'absent', reason: '' });
|
|
300
|
+
if (authority === 'unknown') return Object.freeze({ state: 'unresolved', reason: 'naming-authority-unresolved' });
|
|
301
|
+
if (authority === 'external-authority' && !reference) {
|
|
302
|
+
return Object.freeze({ state: 'unresolved', reason: 'naming-authority-reference-required' });
|
|
303
|
+
}
|
|
304
|
+
return Object.freeze({ state: 'not-evaluated', reason: '' });
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function projectAuthoringGuidance(definition = {}) {
|
|
308
|
+
const group = definition.ordinaryProjection?.byGroup?.['Authoring Bindings'] || {};
|
|
309
|
+
const values = group.values || {};
|
|
310
|
+
return Object.freeze({
|
|
311
|
+
interactionUnit: token(values['Interaction Unit']),
|
|
312
|
+
schemaModule: token(values['Schema Module']),
|
|
313
|
+
presentationSurface: token(values['Presentation Surface']),
|
|
314
|
+
authoringNotes: token(values['Authoring Notes']),
|
|
315
|
+
qualification: token(group.qualification) || 'unresolved',
|
|
316
|
+
guidanceOnly: true,
|
|
317
|
+
generationAuthority: false,
|
|
318
|
+
executionAuthority: false
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function effectParticipation(fields = {}) {
|
|
323
|
+
const condition = token(fields.Condition);
|
|
324
|
+
const conditionReference = token(fields['Condition Reference']);
|
|
325
|
+
return Object.freeze({
|
|
326
|
+
condition,
|
|
327
|
+
conditionReference,
|
|
328
|
+
state: condition || conditionReference ? 'unresolved' : 'active',
|
|
329
|
+
reason: condition || conditionReference ? 'effect-condition-not-evaluated' : 'no-condition-prescribed'
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function memberMapping(fields = {}) {
|
|
334
|
+
const declared = token(fields['Member Mapping']);
|
|
335
|
+
const mappingKey = token(fields['Mapping Key']);
|
|
336
|
+
const mappingMeaning = token(fields['Mapping Meaning']);
|
|
337
|
+
const reasons = [];
|
|
338
|
+
if (declared === 'unknown') reasons.push('unresolved');
|
|
339
|
+
if (declared === 'custom' && !mappingMeaning) reasons.push('meaning-required');
|
|
340
|
+
if (declared === 'by-key' && !mappingKey) reasons.push('key-required');
|
|
341
|
+
return Object.freeze({
|
|
342
|
+
declared,
|
|
343
|
+
mappingKey,
|
|
344
|
+
mappingMeaning,
|
|
345
|
+
semanticQualification: semanticQualification(reasons),
|
|
346
|
+
concreteQualification: declared ? 'not-evaluated' : 'not-required',
|
|
347
|
+
concreteAssociations: Object.freeze([]),
|
|
348
|
+
positionalInference: false
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function bindingReference(value, allowedNames, namespace, required) {
|
|
353
|
+
const declared = token(value);
|
|
354
|
+
if (!declared) return Object.freeze({ declared: '', namespace, qualification: required ? 'unresolved' : 'absent', resolvedName: '' });
|
|
355
|
+
return Object.freeze({
|
|
356
|
+
declared,
|
|
357
|
+
namespace,
|
|
358
|
+
qualification: allowedNames.has(declared) ? 'resolved' : 'unresolved',
|
|
359
|
+
resolvedName: allowedNames.has(declared) ? declared : ''
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function collectUnresolvedReasons(plan = {}) {
|
|
364
|
+
const reasons = [];
|
|
365
|
+
for (const role of plan.outputRoles || []) {
|
|
366
|
+
if (role.qualification !== 'qualified') reasons.push(`output-role:${role.name}:unresolved`);
|
|
367
|
+
if (role.minimumCount.kind === 'unknown' || role.maximumCount.kind === 'unknown') reasons.push(`output-role:${role.name}:cardinality-unresolved`);
|
|
368
|
+
if (role.lifecycleCoverage?.state === 'missing') reasons.push(`output-role:${role.name}:lifecycle-coverage-missing`);
|
|
369
|
+
if (role.lifecycleCoverage?.state === 'unresolved') reasons.push(`output-role:${role.name}:lifecycle-coverage-unresolved`);
|
|
370
|
+
}
|
|
371
|
+
for (const destination of plan.destinationBindings || []) {
|
|
372
|
+
if (destination.requiredQualification.state === 'unresolved') reasons.push(`destination:${destination.name}:requiredness-unresolved`);
|
|
373
|
+
if (destination.requiredQualification.state === 'required' && destination.placementCoverage?.state !== 'present') {
|
|
374
|
+
reasons.push(`destination:${destination.name}:required-placement-missing`);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
for (const [groupName, effects] of [['lifecycle', plan.lifecycleEffects], ['parent', plan.parentEffects], ['relation', plan.relationEffects]]) {
|
|
378
|
+
for (const effect of effects || []) {
|
|
379
|
+
for (const reason of effect.semanticQualification?.reasons || []) reasons.push(`${groupName}:${effect.name}:${reason}`);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
for (const placement of plan.outputPlacements || []) {
|
|
383
|
+
for (const reason of placement.semanticQualification?.reasons || []) reasons.push(`placement:${placement.name}:${reason}`);
|
|
384
|
+
}
|
|
385
|
+
return [...new Set(reasons)].sort();
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
function semanticQualification(reasons = []) {
|
|
389
|
+
const unique = [...new Set(reasons.filter(Boolean))].sort();
|
|
390
|
+
return Object.freeze({
|
|
391
|
+
state: unique.length ? 'unresolved' : 'qualified',
|
|
392
|
+
reasons: Object.freeze(unique)
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
function bindingKeysFor(groupName) {
|
|
397
|
+
if (groupName === 'lifecycle') return ['targetBinding', 'resultBinding'];
|
|
398
|
+
if (groupName === 'parent') return ['outputBinding', 'parentBinding'];
|
|
399
|
+
return ['subjectBinding', 'objectBinding'];
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function activeDeclarations(items = []) {
|
|
403
|
+
const list = Array.isArray(items) ? items : [];
|
|
404
|
+
if (list.length === 1 && token(list[0]?.name).toLowerCase() === 'none') return [];
|
|
405
|
+
return list.filter((item) => token(item?.name).toLowerCase() !== 'none');
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function cardinality(value, maximum) {
|
|
409
|
+
const raw = token(value);
|
|
410
|
+
if (raw === 'unknown') return Object.freeze({ raw, kind: 'unknown', value: null });
|
|
411
|
+
if (maximum && raw === 'unbounded') return Object.freeze({ raw, kind: 'unbounded', value: null });
|
|
412
|
+
if (/^(0|[1-9]\d*)$/.test(raw)) return Object.freeze({ raw, kind: 'numeric', value: Number(raw) });
|
|
413
|
+
return Object.freeze({ raw, kind: raw ? 'invalid' : 'absent', value: null });
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
function definitionIdentity(definition = {}) {
|
|
417
|
+
return Object.freeze({
|
|
418
|
+
canonicalIdentifier: String(definition.transitionIdentity?.['Canonical Identifier'] || ''),
|
|
419
|
+
name: String(definition.transitionIdentity?.Name || ''),
|
|
420
|
+
version: String(definition.transitionIdentity?.Version || ''),
|
|
421
|
+
registryIdentity: String(definition.artifact?.registryIdentity || ''),
|
|
422
|
+
artifactId: String(definition.artifact?.id || '')
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
function blockedPlan(definition, reason) {
|
|
427
|
+
return Object.freeze({
|
|
428
|
+
schema: TRANSITION_RESULT_SEMANTICS_PLAN_SCHEMA_ID,
|
|
429
|
+
definition: definitionIdentity(definition),
|
|
430
|
+
readOnly: true,
|
|
431
|
+
mutation: false,
|
|
432
|
+
networkFetch: false,
|
|
433
|
+
executable: false,
|
|
434
|
+
qualification: 'blocked',
|
|
435
|
+
reasons: Object.freeze([reason]),
|
|
436
|
+
outputRoles: Object.freeze([]),
|
|
437
|
+
lifecycleEffects: Object.freeze([]),
|
|
438
|
+
parentEffects: Object.freeze([]),
|
|
439
|
+
relationEffects: Object.freeze([]),
|
|
440
|
+
destinationBindings: Object.freeze([]),
|
|
441
|
+
outputPlacements: Object.freeze([]),
|
|
442
|
+
authoringGuidance: Object.freeze({ guidanceOnly: true, generationAuthority: false, executionAuthority: false }),
|
|
443
|
+
boundary: Object.freeze({ execution: false })
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function isCanonicalDefinitionReadModel(definition = {}) {
|
|
448
|
+
return definition?.schema === TRANSITION_DEFINITION_READ_MODEL_SCHEMA_ID
|
|
449
|
+
&& definition?.artifact?.schemaId === CANONICAL_TRANSITION_DEFINITION_SCHEMA_ID;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
function schemaToken(value = '') { return token(value).replace(/^\[([^\]]+)\]\([^)]+\)$/, '$1'); }
|
|
453
|
+
function token(value = '') { return String(value || '').trim(); }
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { createContinuationDraft, createReferenceDraft } from '@tiinex/core/transitions/record.transitions.js';
|
|
3
|
+
import { validateTransitionDraft } from '@tiinex/core/transitions/transition.validate.js';
|
|
4
|
+
|
|
5
|
+
const localParent = {
|
|
6
|
+
id: 'local:workspace:notes/parent.md',
|
|
7
|
+
title: 'Local parent',
|
|
8
|
+
summary: 'Local summary',
|
|
9
|
+
path: 'notes/parent.md',
|
|
10
|
+
kind: 'tiinex.topic.v1',
|
|
11
|
+
schemaId: 'tiinex.topic.v1',
|
|
12
|
+
markdown: '# Local parent',
|
|
13
|
+
sourceMode: 'local-files',
|
|
14
|
+
source: { adapterId: 'local', kind: 'local-session' }
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const localDraft = createContinuationDraft(localParent, { id: 'tiinex.topic.v1', label: 'Topic' }, {}, { clock: () => '2026-07-21T02:00:00.000Z' });
|
|
18
|
+
assert.equal(localDraft.validation.schema, 'tiinex.transition.validation.v1');
|
|
19
|
+
assert.equal(localDraft.validation.ok, true, 'local continuation should validate');
|
|
20
|
+
assert.equal(localDraft.validation.parsed.parentTrace, 'record:local:workspace:notes/parent.md');
|
|
21
|
+
assert.equal(localDraft.validation.parsed.parentOrigin, 'notes/parent.md');
|
|
22
|
+
assert.match(localDraft.validation.parsed.parentBoundary, /no GitHub provenance inferred/i);
|
|
23
|
+
assert(!localDraft.validation.findings.some((finding) => finding.severity === 'error'), 'local continuation has no validation errors');
|
|
24
|
+
|
|
25
|
+
const githubParent = {
|
|
26
|
+
id: 'source:github:tiinex/docs:topics/parent.md',
|
|
27
|
+
title: 'GitHub parent',
|
|
28
|
+
summary: 'GitHub summary',
|
|
29
|
+
path: 'topics/parent.md',
|
|
30
|
+
kind: 'tiinex.topic.v1',
|
|
31
|
+
schemaId: 'tiinex.topic.v1',
|
|
32
|
+
markdown: '# GitHub parent',
|
|
33
|
+
sourceMode: 'source-backed',
|
|
34
|
+
source: { adapterId: 'github', kind: 'github-tree', sourceKind: 'github.repo', repo: 'Tiinex/docs', ref: 'master' }
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const githubReference = createReferenceDraft(githubParent, {}, { clock: () => '2026-07-21T02:00:00.000Z' });
|
|
38
|
+
assert.equal(githubReference.validation.ok, true, 'github parent reference should validate as a local draft with source-backed parent boundary');
|
|
39
|
+
assert.match(githubReference.validation.parsed.parentBoundary, /source-backed github material/i);
|
|
40
|
+
assert.equal(githubReference.sourceMode, 'local-reference', 'transition result must stay local even when parent is source-backed');
|
|
41
|
+
assert.equal(githubReference.source?.adapterId, undefined, 'transition draft must not inherit GitHub source object');
|
|
42
|
+
|
|
43
|
+
const tampered = { ...localDraft, markdown: localDraft.markdown.replace(/# Continuity Integrity[\s\S]*$/, ''), hasIntegrity: false };
|
|
44
|
+
const tamperedValidation = validateTransitionDraft(tampered, localParent);
|
|
45
|
+
assert.equal(tamperedValidation.ok, false, 'missing integrity must fail transition validation');
|
|
46
|
+
assert(tamperedValidation.findings.some((finding) => finding.code === 'transition.integrity.required'), 'missing integrity has transition finding');
|
|
47
|
+
|
|
48
|
+
const wrongTrace = { ...localDraft, markdown: localDraft.markdown.replace('Trace: record:local:workspace:notes/parent.md', 'Trace: record:somewhere-else') };
|
|
49
|
+
const wrongTraceValidation = validateTransitionDraft(wrongTrace, localParent);
|
|
50
|
+
assert.equal(wrongTraceValidation.ok, false, 'trace mismatch must fail transition validation');
|
|
51
|
+
assert(wrongTraceValidation.findings.some((finding) => finding.code === 'transition.parent.trace.mismatch'), 'trace mismatch has transition finding');
|
|
52
|
+
|
|
53
|
+
const leakedBoundary = { ...localDraft, markdown: localDraft.markdown.replace('Boundary: browser-local session material; no GitHub provenance inferred', 'Boundary: source-backed github material') };
|
|
54
|
+
const leakValidation = validateTransitionDraft(leakedBoundary, localParent);
|
|
55
|
+
assert.equal(leakValidation.ok, false, 'local parent must not be promoted to GitHub provenance');
|
|
56
|
+
assert(leakValidation.findings.some((finding) => finding.code === 'transition.parent.boundary.local-github-leak'), 'boundary leak has transition finding');
|
|
57
|
+
|
|
58
|
+
console.log('transition.validate: ok');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function ArtifactCard(model) { return model; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function SchemaCard(model) { return model; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function SourceCard(model) { return model; }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
(function attachDialogPresenter(global) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
function renderAddMaterialDialog(workspace, ctx) {
|
|
5
|
+
return `<div class="tx-dialog-backdrop" role="presentation"><section class="tx-dialog tx-workspace-action-dialog tx-local-material-dialog" role="dialog" aria-modal="true" aria-labelledby="add-material-title"><button class="tx-dialog-close" type="button" data-dialog-close aria-label="Close">${ctx.icon('close')}</button><div class="tx-mini-label">Local material</div><h2 id="add-material-title">Add local Markdown</h2><p>Add browser-local Markdown text to <strong>${ctx.escapeHtml(workspace?.name || 'this workspace')}</strong>. It stays local/session and does not infer GitHub provenance.</p><form id="add-material-form" data-workspace-id="${ctx.escapeHtml(workspace?.id || '')}"><label class="tx-field"><span>Title</span><input name="recordTitle" autocomplete="off" maxlength="96" required placeholder="Example: Local note or pasted Markdown"></label><label class="tx-field"><span>Markdown or summary</span><textarea name="recordSummary" rows="6" maxlength="280" placeholder="# Heading or short summary"></textarea></label><div class="tx-badges">${ctx.badge('local/session')}${ctx.badge('not GitHub')}${ctx.badge('hash restore')}</div><p class="tx-form-error" data-form-error aria-live="polite"></p><button class="tx-button tx-primary tx-dialog-primary" type="submit">${ctx.icon('load')} Add local Markdown</button></form></section></div>`;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function renderContinueDialog(workspace, ctx) {
|
|
9
|
+
const title = `${workspace?.name || 'Workspace'} continuation`;
|
|
10
|
+
return `<div class="tx-dialog-backdrop" role="presentation"><section class="tx-dialog tx-workspace-action-dialog" role="dialog" aria-modal="true" aria-labelledby="continue-title"><button class="tx-dialog-close" type="button" data-dialog-close aria-label="Close">${ctx.icon('close')}</button><div class="tx-mini-label">Continue</div><h2 id="continue-title">Create continuation leaf</h2><p>Create a browser-local continuation placeholder from <strong>${ctx.escapeHtml(workspace?.name || 'this workspace')}</strong>. Source boundaries remain local until material is explicitly exported or published.</p><form id="continue-form" data-workspace-id="${ctx.escapeHtml(workspace?.id || '')}"><label class="tx-field"><span>Title</span><input name="recordTitle" autocomplete="off" maxlength="96" required value="${ctx.escapeHtml(title)}"></label><label class="tx-field"><span>Summary</span><textarea name="recordSummary" rows="4" maxlength="280">Continuation leaf drafted in Tiinex Viewer.</textarea></label><div class="tx-badges">${ctx.badge('draft')}${ctx.badge('child of workspace')}${ctx.badge('local/session')}</div><p class="tx-form-error" data-form-error aria-live="polite"></p><button class="tx-button tx-primary tx-dialog-primary" type="submit">${ctx.icon('lineage')} Create continuation</button></form></section></div>`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function renderOpenWorkspaceDialog(workspace, ctx) {
|
|
14
|
+
const count = Array.isArray(workspace?.records) ? workspace.records.length : 0;
|
|
15
|
+
const sourceBoundary = workspace?.source?.boundary || 'browser-local session state; no source files or GitHub provenance inferred';
|
|
16
|
+
return `<div class="tx-dialog-backdrop" role="presentation"><section class="tx-dialog tx-workspace-summary-dialog" role="dialog" aria-modal="true" aria-labelledby="open-workspace-title"><button class="tx-dialog-close" type="button" data-dialog-close aria-label="Close">${ctx.icon('close')}</button><div class="tx-mini-label">Workspace</div><h2 id="open-workspace-title">${ctx.escapeHtml(workspace?.name || 'Workspace')}</h2><p>Current browser-local workspace. Opening this summary does not change source truth or fetch remote material.</p><div class="tx-action-summary"><div><span>Records</span><strong>${count}</strong></div><div><span>Boundary</span><strong>local/session</strong></div><div><span>GitHub</span><strong>not guessed</strong></div></div><p class="tx-form-note">${ctx.escapeHtml(sourceBoundary)}</p></section></div>`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function renderCommandInfoDialog(command, ctx) {
|
|
20
|
+
return `<div class="tx-dialog-backdrop" role="presentation"><section class="tx-dialog" role="dialog" aria-modal="true" aria-labelledby="command-info-title"><button class="tx-dialog-close" type="button" data-dialog-close aria-label="Close">${ctx.icon('close')}</button><div class="tx-mini-label">Command</div><h2 id="command-info-title">${ctx.escapeHtml(command.action || 'Command')}</h2><p>This command is not available for this local/session record yet. It is hidden from the primary happy path until the matching source-bound use-case exists.</p><div class="tx-badges">${ctx.badge('not source destructive')}${ctx.badge('deferred use-case')}</div></section></div>`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
global.TiinexDialogPresenter = { renderAddMaterialDialog, renderContinueDialog, renderOpenWorkspaceDialog, renderCommandInfoDialog };
|
|
24
|
+
})(typeof window !== 'undefined' ? window : globalThis);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function DegradedNotice(message) { return { kind: 'degraded', message }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function EmptyState(message) { return { kind: 'empty', message }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function ValidationNotice(message) { return { kind: 'validation', message }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function FormRenderer(spec) { return spec; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function MarkdownField(field) { return field; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function SelectField(field) { return field; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function SourcePickerField(field) { return field; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function TextField(field) { return field; }
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
(function attachTiinexIconPaths(global) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const iconPaths = Object.freeze({
|
|
5
|
+
previous: '<path d="M15 6l-6 6 6 6"/>',
|
|
6
|
+
next: '<path d="M9 6l6 6-6 6"/>',
|
|
7
|
+
// circle + icon for Create (visually closer to the legacy header)
|
|
8
|
+
create: '<circle cx="12" cy="12" r="9"/><path d="M12 8v8M8 12h8"/>',
|
|
9
|
+
multiverse: '<path d="M5 7h14M5 12h14M5 17h14"/>',
|
|
10
|
+
display: '<path d="M5 7h14M5 12h14M5 17h14"/>',
|
|
11
|
+
source: '<path d="M12 4l7 4-7 4-7-4 7-4z"/><path d="M5 12l7 4 7-4M5 16l7 4 7-4"/>',
|
|
12
|
+
audit: '<path d="M5 13l4 4L19 7"/>',
|
|
13
|
+
external: '<path d="M8 16L16 8M10 8h6v6"/>',
|
|
14
|
+
close: '<path d="M7 7l10 10M17 7L7 17"/>',
|
|
15
|
+
share: '<path d="M8 12h8M12 8l4 4-4 4"/>',
|
|
16
|
+
open: '<path d="M4 8h7l2 3h7v8H4z"/>',
|
|
17
|
+
merge: '<path d="M6 6v4a4 4 0 004 4h8"/><path d="M14 10l4 4-4 4"/>',
|
|
18
|
+
lineage: '<path d="M7 7h4v4H7zM13 13h4v4h-4z"/><path d="M11 9h2a2 2 0 012 2v2"/>',
|
|
19
|
+
help: '<path d="M9 9a3 3 0 116 2c-2 1-3 2-3 4"/><path d="M12 19h.01"/>',
|
|
20
|
+
load: '<path d="M12 4v10M8 10l4 4 4-4"/><path d="M5 20h14"/>',
|
|
21
|
+
preview: '<path d="M4 6h16v12H4z"/><path d="M8 10h8M8 14h5"/>',
|
|
22
|
+
database: '<ellipse cx="12" cy="5" rx="7" ry="3"/><path d="M5 5v6c0 1.7 3.1 3 7 3s7-1.3 7-3V5"/><path d="M5 11v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6"/>',
|
|
23
|
+
file: '<path d="M7 3h7l3 3v15H7z"/><path d="M14 3v4h4M9 12h6M9 16h6"/>',
|
|
24
|
+
seedling: '<path d="M12 20v-7"/><path d="M12 13c-4 0-6-2-6-5 4 0 6 2 6 5z"/><path d="M12 13c4 0 6-2 6-5-4 0-6 2-6 5z"/>',
|
|
25
|
+
pen: '<path d="M4 20l4-1 10-10-3-3L5 16z"/><path d="M13 6l3 3"/>',
|
|
26
|
+
shareNodes: '<circle cx="7" cy="12" r="2"/><circle cx="17" cy="7" r="2"/><circle cx="17" cy="17" r="2"/><path d="M9 11l6-3M9 13l6 3"/>',
|
|
27
|
+
scale: '<path d="M12 4v16M5 7h14"/><path d="M7 7l-3 6h6zM17 7l-3 6h6z"/>',
|
|
28
|
+
document: '<path d="M7 3h7l4 4v14H7z"/><path d="M14 3v5h5M9 13h6M9 17h6"/>',
|
|
29
|
+
download: '<path d="M12 4v10M8 10l4 4 4-4"/><path d="M5 20h14"/>',
|
|
30
|
+
folder: '<path d="M3 7h7l2 3h9v9H3z"/>',
|
|
31
|
+
github: '<path d="M12 3a9 9 0 00-3 17c.5.1.7-.2.7-.5v-2c-3 .7-3.6-1.2-3.6-1.2-.5-1.1-1.1-1.4-1.1-1.4-.9-.6.1-.6.1-.6 1 0 1.5 1 1.5 1 .9 1.5 2.4 1.1 3 .8.1-.7.4-1.1.7-1.3-2.4-.3-5-1.2-5-5.4 0-1.2.4-2.1 1-2.9-.1-.3-.4-1.4.1-2.8 0 0 .8-.3 2.9 1.1.8-.2 1.7-.3 2.6-.3s1.8.1 2.6.3c2.1-1.4 2.9-1.1 2.9-1.1.5 1.4.2 2.5.1 2.8.6.8 1 1.7 1 2.9 0 4.2-2.6 5.1-5 5.4.4.3.8 1 .8 2v2.7c0 .3.2.6.8.5A9 9 0 0012 3z"/>',
|
|
32
|
+
link: '<path d="M10 13a5 5 0 007 0l2-2a5 5 0 00-7-7l-1 1"/><path d="M14 11a5 5 0 00-7 0l-2 2a5 5 0 007 7l1-1"/>',
|
|
33
|
+
spinner: '<path d="M12 3a9 9 0 019 9"/><path d="M21 12a9 9 0 01-9 9" opacity=".35"/><path d="M12 21a9 9 0 01-9-9" opacity=".35"/><path d="M3 12a9 9 0 019-9" opacity=".35"/>'
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
global.TiinexIconPaths = iconPaths;
|
|
37
|
+
})(typeof window !== 'undefined' ? window : globalThis);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function Panel(children = []) { return { layout: 'panel', children }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function ResponsiveFrame(children = []) { return { layout: 'responsive', children }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function SplitView(children = []) { return { layout: 'split', children }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function Stack(children = []) { return { layout: 'stack', children }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function DetailPanel(model) { return model; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function LineagePanel(model) { return model; }
|