@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,293 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { mkdtemp, mkdir, readFile, rm, symlink, writeFile } from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { loadNodePortableInput } from '@tiinex/core/tooling/portable/input/node.input.js';
|
|
6
|
+
import { runPortableCli } from '@tiinex/core/tooling/portable/adapters/cli/cli.run.js';
|
|
7
|
+
import { openPortableSession } from '@tiinex/core/tooling/portable/session/portable.session.js';
|
|
8
|
+
|
|
9
|
+
const root = await mkdtemp(path.join(os.tmpdir(), 'tiinex-portable-'));
|
|
10
|
+
try {
|
|
11
|
+
const nested = path.join(root, 'received');
|
|
12
|
+
await mkdir(nested, { recursive: true });
|
|
13
|
+
await writeFile(path.join(nested, 'artifact.md'), topicMarkdown(), 'utf8');
|
|
14
|
+
await writeFile(path.join(nested, 'asset.bin'), Buffer.from([1, 2, 3, 4]));
|
|
15
|
+
await writeFile(path.join(nested, 'preview.png'), Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]));
|
|
16
|
+
try { await symlink(path.join(nested, 'artifact.md'), path.join(nested, 'linked.md')); } catch {}
|
|
17
|
+
|
|
18
|
+
const directoryInput = await loadNodePortableInput(nested);
|
|
19
|
+
assert.equal(directoryInput.files.some((file) => file.path === 'artifact.md'), true);
|
|
20
|
+
assert.equal(directoryInput.files.some((file) => file.path === 'artifact.md' && file.locator?.kind === 'node-file' && file.locator.localPath === path.join(nested, 'artifact.md')), true);
|
|
21
|
+
assert.equal(directoryInput.files.some((file) => file.path === 'asset.bin' && file.kind === 'asset'), true);
|
|
22
|
+
assert.equal(directoryInput.files.some((file) => file.path === 'preview.png' && file.locator?.kind === 'node-file'), true);
|
|
23
|
+
assert.equal(directoryInput.files.some((file) => file.path === 'linked.md'), false);
|
|
24
|
+
|
|
25
|
+
const zipPath = path.join(root, 'received.zip');
|
|
26
|
+
await writeFile(zipPath, storedZip([
|
|
27
|
+
{ name: 'zip-artifact.md', data: Buffer.from(topicMarkdown(), 'utf8') },
|
|
28
|
+
{ name: 'assets/pixel.bin', data: Buffer.from([9, 8, 7]) }
|
|
29
|
+
]));
|
|
30
|
+
const zipInput = await loadNodePortableInput(zipPath);
|
|
31
|
+
assert.equal(zipInput.files.some((file) => file.path === 'zip-artifact.md' && typeof file.content === 'string'), true);
|
|
32
|
+
assert.equal(zipInput.files.some((file) => file.path === 'zip-artifact.md' && file.locator?.kind === 'node-zip-entry' && file.locator.archivePath === zipPath && file.locator.entryPath === 'zip-artifact.md'), true);
|
|
33
|
+
assert.equal(zipInput.files.some((file) => file.path === 'assets/pixel.bin' && file.kind === 'asset'), true);
|
|
34
|
+
assert.equal(zipInput.findings.some((finding) => finding.severity === 'error'), false);
|
|
35
|
+
|
|
36
|
+
const packageControlPath = path.join(root, 'package-control.zip');
|
|
37
|
+
const largePackageControl = JSON.stringify({ schema: 'tiinex.portable.large-package-control.fixture.v1', padding: 'x'.repeat(140 * 1024) });
|
|
38
|
+
await writeFile(packageControlPath, storedZip([{ name: 'tiinex.package/handoff-closure.json', data: Buffer.from(largePackageControl, 'utf8') }]));
|
|
39
|
+
const packageControlInput = await loadNodePortableInput(packageControlPath);
|
|
40
|
+
const hydratedPackageControl = packageControlInput.files.find((file) => file.path === 'tiinex.package/handoff-closure.json');
|
|
41
|
+
assert.equal(typeof hydratedPackageControl?.content, 'string', true, 'package control JSON above generic archive preview size must remain readable within portable maxTextBytes');
|
|
42
|
+
assert.equal(JSON.parse(hydratedPackageControl.content).schema, 'tiinex.portable.large-package-control.fixture.v1');
|
|
43
|
+
const boundedPackageControlInput = await loadNodePortableInput(packageControlPath, { maxTextBytes: 64 * 1024 });
|
|
44
|
+
assert.equal(typeof boundedPackageControlInput.files.find((file) => file.path === 'tiinex.package/handoff-closure.json')?.content, 'undefined');
|
|
45
|
+
assert.equal(boundedPackageControlInput.findings.some((finding) => finding.code === 'portable.node.zip-text-too-large'), true);
|
|
46
|
+
|
|
47
|
+
const output = [];
|
|
48
|
+
const errors = [];
|
|
49
|
+
const exitCode = await runPortableCli(['inspect', nested], {
|
|
50
|
+
log(value) { output.push(value); },
|
|
51
|
+
error(value) { errors.push(value); }
|
|
52
|
+
});
|
|
53
|
+
assert.equal(exitCode, 0);
|
|
54
|
+
assert.equal(errors.length, 0);
|
|
55
|
+
const cliResult = JSON.parse(output.at(-1));
|
|
56
|
+
assert.equal(cliResult.operation, 'inspect');
|
|
57
|
+
assert.equal(cliResult.records.length, 1);
|
|
58
|
+
|
|
59
|
+
const operationOutput = [];
|
|
60
|
+
assert.equal(await runPortableCli(['operations', '--compact'], { log(value) { operationOutput.push(value); }, error() {} }), 0);
|
|
61
|
+
const operations = JSON.parse(operationOutput[0]).operations;
|
|
62
|
+
assert.equal(operations.some((operation) => operation.name === 'make-writer-brief'), true);
|
|
63
|
+
assert.equal(operations.some((operation) => operation.name === 'schema-guide'), true);
|
|
64
|
+
assert.equal(operations.some((operation) => operation.name === 'search-lineage'), true);
|
|
65
|
+
assert.equal(operations.some((operation) => operation.name === 'create-checkpoint'), true);
|
|
66
|
+
assert.equal(operations.some((operation) => operation.name === 'build-runtime-package'), true);
|
|
67
|
+
|
|
68
|
+
assert.equal(operations.some((operation) => operation.name === 'describe-checkpoint-gate'), true);
|
|
69
|
+
assert.equal(operations.some((operation) => operation.name === 'qualify-checkpoint'), true);
|
|
70
|
+
const gateOutput = [];
|
|
71
|
+
assert.equal(await runPortableCli(['describe-checkpoint-gate', '--profile', 'portable'], { log(value) { gateOutput.push(value); }, error() {} }), 0);
|
|
72
|
+
const gateResult = JSON.parse(gateOutput[0]);
|
|
73
|
+
assert.equal(gateResult.profile, 'portable');
|
|
74
|
+
assert.equal(gateResult.gates.length, 2);
|
|
75
|
+
const qualificationInputPath = path.join(root, 'qualification-input.json');
|
|
76
|
+
await writeFile(qualificationInputPath, JSON.stringify({
|
|
77
|
+
profile: 'portable',
|
|
78
|
+
siteIdentity: { name: 'tiinex-site', version: '0.0.1-v1' },
|
|
79
|
+
portableIdentity: { sourceFingerprint: 'sha256:source', operationFingerprint: 'sha256:catalog' },
|
|
80
|
+
receipts: gateResult.gates.map((gate) => ({ schema: 'tiinex.portable.validation-receipt.v1', gateId: gate.id, command: gate.command, status: 'passed', exitCode: 0 })),
|
|
81
|
+
reproducibility: { dependencies: {}, lockfiles: ['package-lock.json'], installer: 'npm ci' },
|
|
82
|
+
continuity: { parityCheckpoint: 'v1' }
|
|
83
|
+
}), 'utf8');
|
|
84
|
+
const qualificationOutput = [];
|
|
85
|
+
assert.equal(await runPortableCli(['qualify-checkpoint', qualificationInputPath], { log(value) { qualificationOutput.push(value); }, error() {} }), 0);
|
|
86
|
+
assert.equal(JSON.parse(qualificationOutput[0]).status, 'qualified');
|
|
87
|
+
|
|
88
|
+
const searchOutput = [];
|
|
89
|
+
assert.equal(await runPortableCli(['search-lineage', nested, '--query', 'portable local'], { log(value) { searchOutput.push(value); }, error() {} }), 0);
|
|
90
|
+
assert.equal(JSON.parse(searchOutput[0]).matches.some((match) => match.path === 'artifact.md'), true);
|
|
91
|
+
|
|
92
|
+
const schemaDir = path.join(root, 'schemas');
|
|
93
|
+
await mkdir(schemaDir, { recursive: true });
|
|
94
|
+
await writeFile(path.join(schemaDir, 'tiinex.topic.v1.schema.md'), await readFile(new URL('../../../schemas/core/topic/tiinex.topic.v1.schema.md', import.meta.url), 'utf8'), 'utf8');
|
|
95
|
+
const guideOutput = [];
|
|
96
|
+
assert.equal(await runPortableCli(['schema-guide', schemaDir, '--schema', 'tiinex.topic.v1', '--task', 'create'], { log(value) { guideOutput.push(value); }, error() {} }), 0);
|
|
97
|
+
assert.equal(JSON.parse(guideOutput[0]).guide.schema, 'tiinex.llm.schema-guide.v1');
|
|
98
|
+
|
|
99
|
+
await writeFile(path.join(schemaDir, 'tiinex.evidence.v1.schema.md'), await readFile(new URL('../../../schemas/core/evidence/tiinex.evidence.v1.schema.md', import.meta.url), 'utf8'), 'utf8');
|
|
100
|
+
await writeFile(path.join(schemaDir, 'tiinex.preservation.v1.schema.md'), await readFile(new URL('../../../schemas/core/preservation/tiinex.preservation.v1.schema.md', import.meta.url), 'utf8'), 'utf8');
|
|
101
|
+
await writeFile(path.join(schemaDir, 'tiinex.root.v1.schema.md'), await readFile(new URL('../../../schemas/tiinex.root.v1.schema.md', import.meta.url), 'utf8'), 'utf8');
|
|
102
|
+
const hostPath = path.join(root, 'host.json');
|
|
103
|
+
await writeFile(hostPath, JSON.stringify({ tools: [
|
|
104
|
+
{ name: 'GitHub.search', description: 'Search repository files.' },
|
|
105
|
+
{ name: 'GitHub.fetch_file', description: 'Read repository files.' },
|
|
106
|
+
{ name: 'vision.open_image', description: 'Open image for multimodal analysis.' },
|
|
107
|
+
{ name: 'archive.extract', description: 'Extract zip archive entries.' }
|
|
108
|
+
] }), 'utf8');
|
|
109
|
+
const actionRequestPath = path.join(root, 'action-request.json');
|
|
110
|
+
await writeFile(actionRequestPath, JSON.stringify({ schemaId: 'tiinex.remote.v1', repository: 'Tiinex/docs', ref: 'master', searchQueries: ['tiinex.remote.v1.schema.md'], nextOperation: 'resolve-schema-material' }), 'utf8');
|
|
111
|
+
const actionOutput = [];
|
|
112
|
+
assert.equal(await runPortableCli(['plan-host-action', 'repository-schema-resolution', '--host', hostPath, '--request', actionRequestPath], { log(value) { actionOutput.push(value); }, error() {} }), 0);
|
|
113
|
+
const actionPlan = JSON.parse(actionOutput[0]);
|
|
114
|
+
assert.equal(actionPlan.status, 'ready');
|
|
115
|
+
assert.equal(actionPlan.steps[0].tool.name, 'GitHub.search');
|
|
116
|
+
assert.equal(actionPlan.steps[1].tool.name, 'GitHub.fetch_file');
|
|
117
|
+
|
|
118
|
+
const resolveOutput = [];
|
|
119
|
+
assert.equal(await runPortableCli(['resolve-schema-material', schemaDir, '--schema', 'tiinex.evidence.v1', '--host', hostPath], { log(value) { resolveOutput.push(value); }, error() {} }), 0);
|
|
120
|
+
assert.equal(JSON.parse(resolveOutput[0]).status, 'resolved');
|
|
121
|
+
|
|
122
|
+
const valuesPath = path.join(root, 'values.json');
|
|
123
|
+
await writeFile(valuesPath, JSON.stringify({
|
|
124
|
+
'Supported Claim Or Question': 'whether overflow was observed',
|
|
125
|
+
'Evidence Role': 'supports observation',
|
|
126
|
+
'Known Source': 'explicit local fixture',
|
|
127
|
+
'Preservation Basis': 'test fixture',
|
|
128
|
+
'Provenance Limits': 'no surrounding context',
|
|
129
|
+
'Material': 'Overflow was observed.',
|
|
130
|
+
'Material Kind': 'excerpt',
|
|
131
|
+
'Preservation State': 'readable markdown',
|
|
132
|
+
'Fidelity Notes': 'test representation',
|
|
133
|
+
'Known Losses': 'device details',
|
|
134
|
+
'Does Not Prove': 'cause or fix',
|
|
135
|
+
'Must Not Be Treated As': 'completion or consent'
|
|
136
|
+
}), 'utf8');
|
|
137
|
+
const parentPath = path.join(root, 'parent.json');
|
|
138
|
+
await writeFile(parentPath, JSON.stringify({ id: 'parent-record', path: 'parent.md', schemaId: 'tiinex.preservation.v1', boundary: 'portable local material; no GitHub provenance inferred' }), 'utf8');
|
|
139
|
+
const createOutput = [];
|
|
140
|
+
assert.equal(await runPortableCli(['create-local-draft', schemaDir, '--schema', 'tiinex.evidence.v1', '--values', valuesPath, '--parent', parentPath, '--title', 'CLI Evidence'], { log(value) { createOutput.push(value); }, error() {} }), 2, 'legacy readable-schema parent draft must remain materialized but semantic validation errors make the CLI nonzero');
|
|
141
|
+
const createdDraft = JSON.parse(createOutput[0]);
|
|
142
|
+
assert.equal(createdDraft.status, 'blocked', 'exact Evidence creation must fail closed when the supplied Parent authority is not coherent');
|
|
143
|
+
assert.equal(createdDraft.qualification.exactCreateToolingAvailable, true);
|
|
144
|
+
assert.equal(createdDraft.qualification.parentAuthorityQualification, 'invalid');
|
|
145
|
+
assert.equal(createdDraft.draft, null);
|
|
146
|
+
|
|
147
|
+
const packageValuesPath = path.join(root, 'package-topic-values.json');
|
|
148
|
+
await writeFile(packageValuesPath, JSON.stringify({
|
|
149
|
+
Summary: 'CLI package topic',
|
|
150
|
+
'Current Read': 'Portable package fixture.',
|
|
151
|
+
'Design Direction': 'Exercise package transport with a contract-valid local root.',
|
|
152
|
+
'Next Artifacts': 'None.'
|
|
153
|
+
}), 'utf8');
|
|
154
|
+
const packageDraftOutput = [];
|
|
155
|
+
assert.equal(await runPortableCli(['create-local-draft', schemaDir, '--schema', 'tiinex.topic.v1', '--values', packageValuesPath, '--title', 'CLI package topic'], { log(value) { packageDraftOutput.push(value); }, error() {} }), 0);
|
|
156
|
+
const packageDraft = JSON.parse(packageDraftOutput[0]);
|
|
157
|
+
assert.equal(packageDraft.status, 'created-clean');
|
|
158
|
+
const packageStaged = { ...packageDraft.draft, qualification: packageDraft.qualification, lifecycleStatus: 'draft', sourceMode: 'local-portable-staged' };
|
|
159
|
+
|
|
160
|
+
const sessionPath = path.join(root, 'session.json');
|
|
161
|
+
const staged = { ...packageDraft.draft, qualification: packageDraft.qualification, lifecycleStatus: 'draft', sourceMode: 'local-portable-staged' };
|
|
162
|
+
await writeFile(sessionPath, JSON.stringify(openPortableSession({ files: directoryInput.files, stagedArtifacts: [staged], currentFocus: staged.path }).snapshot()), 'utf8');
|
|
163
|
+
const checkpointOutput = [];
|
|
164
|
+
assert.equal(await runPortableCli(['create-checkpoint', sessionPath, '--created-at', '2026-07-23T04:00:00.000Z'], { log(value) { checkpointOutput.push(value); }, error() {} }), 0);
|
|
165
|
+
const checkpoint = JSON.parse(checkpointOutput[0]);
|
|
166
|
+
assert.equal(checkpoint.operation, 'create-checkpoint');
|
|
167
|
+
assert.equal(checkpoint.boundary.canonicalHandoffArtifact, false);
|
|
168
|
+
const checkpointPath = path.join(root, 'checkpoint.json');
|
|
169
|
+
await writeFile(checkpointPath, JSON.stringify({ schema: checkpoint.resultSchema, version: checkpoint.version, checkpointId: checkpoint.checkpointId, createdAt: checkpoint.createdAt, status: checkpoint.status, summary: checkpoint.summary, session: checkpoint.session, integrity: checkpoint.integrity, boundary: checkpoint.boundary, findings: checkpoint.findings, findingSummary: checkpoint.findingSummary }), 'utf8');
|
|
170
|
+
const restoreCheckpointOutput = [];
|
|
171
|
+
assert.equal(await runPortableCli(['restore-checkpoint', checkpointPath], { log(value) { restoreCheckpointOutput.push(value); }, error() {} }), 0);
|
|
172
|
+
assert.equal(JSON.parse(restoreCheckpointOutput[0]).status, 'restored');
|
|
173
|
+
|
|
174
|
+
const stagedPath = path.join(root, 'staged.json');
|
|
175
|
+
await writeFile(stagedPath, JSON.stringify([packageStaged]), 'utf8');
|
|
176
|
+
const packageOutput = [];
|
|
177
|
+
assert.equal(await runPortableCli(['build-runtime-package', '--staged', stagedPath, '--title', 'CLI package'], { log(value) { packageOutput.push(value); }, error() {} }), 0);
|
|
178
|
+
const runtimePackage = JSON.parse(packageOutput[0]);
|
|
179
|
+
assert.equal(runtimePackage.operation, 'build-runtime-package');
|
|
180
|
+
assert.equal(runtimePackage.qualification.canonicalPackageSchemaLocked, false);
|
|
181
|
+
const bundlePath = path.join(root, 'bundle.json');
|
|
182
|
+
await writeFile(bundlePath, JSON.stringify(runtimePackage.bundle), 'utf8');
|
|
183
|
+
const packageInspectionOutput = [];
|
|
184
|
+
assert.equal(await runPortableCli(['inspect-runtime-package', bundlePath], { log(value) { packageInspectionOutput.push(value); }, error() {} }), 0);
|
|
185
|
+
assert.equal(JSON.parse(packageInspectionOutput[0]).status, 'valid');
|
|
186
|
+
const packageZipPath = path.join(root, 'runtime-package.zip');
|
|
187
|
+
const packageWriteOutput = [];
|
|
188
|
+
assert.equal(await runPortableCli(['build-runtime-package', '--staged', stagedPath, '--output', packageZipPath], { log(value) { packageWriteOutput.push(value); }, error() {} }), 0);
|
|
189
|
+
assert.equal(JSON.parse(packageWriteOutput[0]).writeReceipt.status, 'written');
|
|
190
|
+
const packageZipInput = await loadNodePortableInput(packageZipPath);
|
|
191
|
+
assert.equal(packageZipInput.files.some((file) => file.path === 'tiinex.package/manifest.json'), true);
|
|
192
|
+
const rehydrateOutput = [];
|
|
193
|
+
assert.equal(await runPortableCli(['rehydrate-runtime-package', packageZipPath], { log(value) { rehydrateOutput.push(value); }, error() {} }), 0);
|
|
194
|
+
assert.equal(JSON.parse(rehydrateOutput[0]).status, 'rehydrated');
|
|
195
|
+
const serializedRoundTripOutput = [];
|
|
196
|
+
assert.equal(await runPortableCli(['roundtrip-runtime-package', packageZipPath], { log(value) { serializedRoundTripOutput.push(value); }, error() {} }), 0);
|
|
197
|
+
assert.equal(JSON.parse(serializedRoundTripOutput[0]).comparison.status, 'match');
|
|
198
|
+
|
|
199
|
+
const assetOutput = [];
|
|
200
|
+
assert.equal(await runPortableCli(['inspect-assets', nested], { log(value) { assetOutput.push(value); }, error() {} }), 0);
|
|
201
|
+
assert.equal(JSON.parse(assetOutput[0]).counts.images, 1);
|
|
202
|
+
const assetPrepareOutput = [];
|
|
203
|
+
assert.equal(await runPortableCli(['prepare-asset-analysis', nested, '--asset', 'preview.png', '--host', hostPath], { log(value) { assetPrepareOutput.push(value); }, error() {} }), 0);
|
|
204
|
+
assert.equal(JSON.parse(assetPrepareOutput[0]).status, 'host-action-ready');
|
|
205
|
+
} finally {
|
|
206
|
+
await rm(root, { recursive: true, force: true });
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
console.log('✓ portable Node file/directory/zip input and CLI adapter passed');
|
|
210
|
+
|
|
211
|
+
function topicMarkdown() {
|
|
212
|
+
return `# Continuity Context
|
|
213
|
+
|
|
214
|
+
- Envelope Schema: [tiinex.root.v1](tiinex.root.v1.schema.md)
|
|
215
|
+
- Current
|
|
216
|
+
- Current Schema: [tiinex.topic.v1](tiinex.topic.v1.schema.md)
|
|
217
|
+
- Created At: 2026-07-22 00:00:00
|
|
218
|
+
- Summary: Node input test
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
# Node Input Test
|
|
223
|
+
|
|
224
|
+
## Content
|
|
225
|
+
|
|
226
|
+
Portable local material.
|
|
227
|
+
`;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function storedZip(entries) {
|
|
231
|
+
const localParts = [];
|
|
232
|
+
const centralParts = [];
|
|
233
|
+
let offset = 0;
|
|
234
|
+
for (const entry of entries) {
|
|
235
|
+
const name = Buffer.from(entry.name, 'utf8');
|
|
236
|
+
const data = Buffer.from(entry.data);
|
|
237
|
+
const crc = crc32(data);
|
|
238
|
+
const local = Buffer.alloc(30);
|
|
239
|
+
local.writeUInt32LE(0x04034b50, 0);
|
|
240
|
+
local.writeUInt16LE(20, 4);
|
|
241
|
+
local.writeUInt16LE(0x0800, 6);
|
|
242
|
+
local.writeUInt16LE(0, 8);
|
|
243
|
+
local.writeUInt16LE(0, 10);
|
|
244
|
+
local.writeUInt16LE(0, 12);
|
|
245
|
+
local.writeUInt32LE(crc, 14);
|
|
246
|
+
local.writeUInt32LE(data.length, 18);
|
|
247
|
+
local.writeUInt32LE(data.length, 22);
|
|
248
|
+
local.writeUInt16LE(name.length, 26);
|
|
249
|
+
local.writeUInt16LE(0, 28);
|
|
250
|
+
localParts.push(local, name, data);
|
|
251
|
+
|
|
252
|
+
const central = Buffer.alloc(46);
|
|
253
|
+
central.writeUInt32LE(0x02014b50, 0);
|
|
254
|
+
central.writeUInt16LE(20, 4);
|
|
255
|
+
central.writeUInt16LE(20, 6);
|
|
256
|
+
central.writeUInt16LE(0x0800, 8);
|
|
257
|
+
central.writeUInt16LE(0, 10);
|
|
258
|
+
central.writeUInt16LE(0, 12);
|
|
259
|
+
central.writeUInt16LE(0, 14);
|
|
260
|
+
central.writeUInt32LE(crc, 16);
|
|
261
|
+
central.writeUInt32LE(data.length, 20);
|
|
262
|
+
central.writeUInt32LE(data.length, 24);
|
|
263
|
+
central.writeUInt16LE(name.length, 28);
|
|
264
|
+
central.writeUInt16LE(0, 30);
|
|
265
|
+
central.writeUInt16LE(0, 32);
|
|
266
|
+
central.writeUInt16LE(0, 34);
|
|
267
|
+
central.writeUInt16LE(0, 36);
|
|
268
|
+
central.writeUInt32LE(0, 38);
|
|
269
|
+
central.writeUInt32LE(offset, 42);
|
|
270
|
+
centralParts.push(central, name);
|
|
271
|
+
offset += local.length + name.length + data.length;
|
|
272
|
+
}
|
|
273
|
+
const centralDirectory = Buffer.concat(centralParts);
|
|
274
|
+
const end = Buffer.alloc(22);
|
|
275
|
+
end.writeUInt32LE(0x06054b50, 0);
|
|
276
|
+
end.writeUInt16LE(0, 4);
|
|
277
|
+
end.writeUInt16LE(0, 6);
|
|
278
|
+
end.writeUInt16LE(entries.length, 8);
|
|
279
|
+
end.writeUInt16LE(entries.length, 10);
|
|
280
|
+
end.writeUInt32LE(centralDirectory.length, 12);
|
|
281
|
+
end.writeUInt32LE(offset, 16);
|
|
282
|
+
end.writeUInt16LE(0, 20);
|
|
283
|
+
return Buffer.concat([...localParts, centralDirectory, end]);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function crc32(buffer) {
|
|
287
|
+
let crc = 0xffffffff;
|
|
288
|
+
for (const byte of buffer) {
|
|
289
|
+
crc ^= byte;
|
|
290
|
+
for (let i = 0; i < 8; i += 1) crc = (crc >>> 1) ^ (0xedb88320 & -(crc & 1));
|
|
291
|
+
}
|
|
292
|
+
return (crc ^ 0xffffffff) >>> 0;
|
|
293
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { mkdtemp, mkdir, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { createRecordFromMarkdown } from '@tiinex/core/artifacts/artifact.record.js';
|
|
6
|
+
import { sealC14nV2Self, validatedC14nV2PrimarySelfDigest } from '@tiinex/core/integrity/integrity.c14nV2.js';
|
|
7
|
+
import { C14N_V2_VALIDATOR_TARGET } from '@tiinex/core/integrity/integrity.methodReference.js';
|
|
8
|
+
import { projectPortableLifecycleReadiness } from '@tiinex/core/tooling/portable/lifecycle/lifecycle.readiness.js';
|
|
9
|
+
import { runPortableOperation } from '@tiinex/core/tooling/portable/operation.catalog.js';
|
|
10
|
+
import { runPortableCli } from '@tiinex/core/tooling/portable/adapters/cli/cli.run.js';
|
|
11
|
+
|
|
12
|
+
const CONTROL = 'fixture/control.trace.md';
|
|
13
|
+
const CHILD = 'fixture/child.trace.md';
|
|
14
|
+
const RETEST = 'fixture/retest.trace.md';
|
|
15
|
+
const CLOSURE = 'fixture/closure.trace.md';
|
|
16
|
+
const REDUCTION = 'fixture/reduction.trace.md';
|
|
17
|
+
const AUTHORITY = Object.freeze({ criteriaOwner: Object.freeze({ state: 'qualified', role: 'Reviewer', basis: 'qualified fixture criteria-owner authority' }) });
|
|
18
|
+
|
|
19
|
+
const control = artifactTask(CONTROL, 'Controlling Task');
|
|
20
|
+
const child = artifactTask(CHILD, 'Required Child Task', { parent: control });
|
|
21
|
+
const retestArtifact = artifactValidation(RETEST);
|
|
22
|
+
const closureArtifact = artifactDecision(CLOSURE);
|
|
23
|
+
const reductionArtifact = artifactReduction(REDUCTION);
|
|
24
|
+
const records = Object.freeze([control.record, child.record, retestArtifact.record, closureArtifact.record, reductionArtifact.record]);
|
|
25
|
+
|
|
26
|
+
function project(facts = {}, extra = {}) {
|
|
27
|
+
return projectPortableLifecycleReadiness({ records, controllingTask: CONTROL, facts: { authority: AUTHORITY, ...facts }, ...extra });
|
|
28
|
+
}
|
|
29
|
+
function rep(overrides = {}) {
|
|
30
|
+
return { obligation: CHILD, representative: CHILD, state: 'resolved', currentness: 'current', qualification: 'qualified', retestInputState: 'available', basis: 'qualified current representative fact', ...overrides };
|
|
31
|
+
}
|
|
32
|
+
function retest(state = 'passed', overrides = {}) {
|
|
33
|
+
return { artifact: RETEST, state, currentness: 'current', qualification: 'qualified', target: CONTROL, criteriaCoverage: 'complete', methodState: 'qualified', authorityRole: 'Reviewer', authorityState: 'qualified', authorityBasis: 'qualified Reviewer authority', basis: 'qualified exact re-test outcome', ...overrides };
|
|
34
|
+
}
|
|
35
|
+
function closure(overrides = {}) {
|
|
36
|
+
return { artifact: CLOSURE, state: 'closed', explicit: true, currentness: 'current', qualification: 'qualified', target: CONTROL, authorityRole: 'Reviewer', authorityState: 'qualified', authorityBasis: 'qualified Reviewer closure authority', passBasisArtifact: RETEST, basis: 'qualified explicit closure decision', ...overrides };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
const result = project({ representatives: [rep({ state: 'active' })] });
|
|
41
|
+
assert.equal(result.controllingTask.state, 'qualified');
|
|
42
|
+
assert.equal(result.currentRepresentatives.length, 1, 'qualified direct Task Parent continuity must create the required child obligation');
|
|
43
|
+
assert.equal(result.readiness.state, 'not-ready-for-retest');
|
|
44
|
+
assert(result.blockers.some((item) => item.code === 'required-work-current'));
|
|
45
|
+
}
|
|
46
|
+
console.log('✓ failed/incomplete criterion expansion plus active required descendant remains not-ready-for-retest');
|
|
47
|
+
|
|
48
|
+
{
|
|
49
|
+
const result = project({ representatives: [rep()] });
|
|
50
|
+
assert.equal(result.readiness.state, 'ready-for-retest');
|
|
51
|
+
assert.equal(result.retest.state, 'not-observed');
|
|
52
|
+
assert.equal(result.closure.state, 'open');
|
|
53
|
+
assert.equal(result.nextAction.kind, 'invoke-authorized-retest');
|
|
54
|
+
}
|
|
55
|
+
console.log('✓ child convergence without parent re-test is ready-for-retest, not passed or closed');
|
|
56
|
+
|
|
57
|
+
{
|
|
58
|
+
const result = project({ representatives: [rep()], retests: [retest('passed')] });
|
|
59
|
+
assert.equal(result.retest.state, 'passed');
|
|
60
|
+
assert.equal(result.closure.state, 'open');
|
|
61
|
+
assert.equal(result.readiness.state, 'ready-for-retest');
|
|
62
|
+
assert.equal(result.nextAction.kind, 'obtain-explicit-authoritative-closure');
|
|
63
|
+
}
|
|
64
|
+
console.log('✓ authoritative pass remains distinct from explicit closure');
|
|
65
|
+
|
|
66
|
+
{
|
|
67
|
+
const result = project({ representatives: [rep()], retests: [retest('passed')], closures: [closure()] });
|
|
68
|
+
assert.equal(result.retest.state, 'passed');
|
|
69
|
+
assert.equal(result.closure.state, 'closed');
|
|
70
|
+
assert.equal(result.readiness.state, 'not-applicable');
|
|
71
|
+
assert.equal(result.nextAction.kind, 'none-unless-authoritatively-reopened');
|
|
72
|
+
}
|
|
73
|
+
console.log('✓ explicit authoritative closure makes readiness not-applicable');
|
|
74
|
+
|
|
75
|
+
{
|
|
76
|
+
const result = project({ representatives: [rep({ state: 'active' })], retests: [retest('failed')] });
|
|
77
|
+
assert.equal(result.retest.state, 'failed');
|
|
78
|
+
assert.equal(result.closure.state, 'open');
|
|
79
|
+
assert.equal(result.readiness.state, 'not-ready-for-retest');
|
|
80
|
+
assert.equal(result.nextAction.kind, 'address-failed-criteria-with-bounded-work');
|
|
81
|
+
}
|
|
82
|
+
console.log('✓ failed re-test followed by bounded child work remains not-ready and open');
|
|
83
|
+
|
|
84
|
+
{
|
|
85
|
+
const missing = project({ representatives: [] });
|
|
86
|
+
assert.equal(missing.readiness.state, 'unresolved');
|
|
87
|
+
assert(missing.missingEvidence.some((item) => item.code === 'current-representative-missing'));
|
|
88
|
+
const ambiguous = project({ representatives: [rep(), rep({ representative: REDUCTION, carryForwardState: 'sufficient', lossState: 'none', validationState: 'qualified' })] });
|
|
89
|
+
assert.equal(ambiguous.readiness.state, 'unresolved');
|
|
90
|
+
assert(ambiguous.ambiguities.some((item) => item.code === 'current-representative-ambiguous'));
|
|
91
|
+
}
|
|
92
|
+
console.log('✓ missing or ambiguous current representative fails closed as unresolved');
|
|
93
|
+
|
|
94
|
+
{
|
|
95
|
+
const result = project({ representatives: [rep({ currentness: 'historical', state: 'active', basis: 'qualified historical fact' }), rep({ state: 'resolved' })] });
|
|
96
|
+
assert.equal(result.currentRepresentatives.length, 1);
|
|
97
|
+
assert.equal(result.currentRepresentatives[0].state, 'resolved');
|
|
98
|
+
assert.equal(result.readiness.state, 'ready-for-retest');
|
|
99
|
+
}
|
|
100
|
+
console.log('✓ qualified current evidence supersedes stale historical nonterminal evidence');
|
|
101
|
+
|
|
102
|
+
{
|
|
103
|
+
const result = project({ representatives: [rep({ representative: REDUCTION, carryForwardState: 'sufficient', lossState: 'none', validationState: 'qualified' })] });
|
|
104
|
+
assert.equal(result.readiness.state, 'ready-for-retest');
|
|
105
|
+
assert.equal(result.currentRepresentatives[0].reduction.isReduction, true);
|
|
106
|
+
assert.equal(result.currentRepresentatives[0].reduction.completionProof, false);
|
|
107
|
+
assert.equal(result.retest.state, 'not-observed');
|
|
108
|
+
assert.equal(result.closure.state, 'open');
|
|
109
|
+
}
|
|
110
|
+
console.log('✓ qualified Reduction can preserve re-test inputs but is never completion proof');
|
|
111
|
+
|
|
112
|
+
{
|
|
113
|
+
const result = project({ representatives: [rep({ representative: REDUCTION, carryForwardState: 'partial', lossState: 'unresolved', validationState: 'qualified' })] });
|
|
114
|
+
assert.equal(result.readiness.state, 'unresolved');
|
|
115
|
+
assert(result.ambiguities.some((item) => item.code === 'reduction-loss-unresolved'));
|
|
116
|
+
}
|
|
117
|
+
console.log('✓ Reduction with material unresolved loss stays unresolved rather than false-green');
|
|
118
|
+
|
|
119
|
+
{
|
|
120
|
+
const result = project({ representatives: [rep()], retests: [retest('passed', { authorityRole: 'OtherRole' })] });
|
|
121
|
+
assert.equal(result.retest.state, 'unresolved');
|
|
122
|
+
assert.equal(result.readiness.state, 'unresolved');
|
|
123
|
+
assert(result.ambiguities.some((item) => item.code === 'retest-outcome-unqualified'));
|
|
124
|
+
}
|
|
125
|
+
console.log('✓ explicit re-test authority mismatch cannot become passed');
|
|
126
|
+
|
|
127
|
+
{
|
|
128
|
+
const result = project({ representatives: [rep()], retests: [retest('passed', { currentness: 'unresolved' })] });
|
|
129
|
+
assert.equal(result.retest.state, 'unresolved');
|
|
130
|
+
assert.equal(result.readiness.state, 'unresolved');
|
|
131
|
+
}
|
|
132
|
+
console.log('✓ unresolved re-test currentness remains unresolved');
|
|
133
|
+
|
|
134
|
+
{
|
|
135
|
+
const operation = await runPortableOperation('project-lifecycle-readiness', { records, controllingTask: CONTROL, facts: { authority: AUTHORITY, representatives: [rep()] } });
|
|
136
|
+
assert.equal(operation.operation, 'project-lifecycle-readiness');
|
|
137
|
+
assert.equal(operation.readiness.state, 'ready-for-retest');
|
|
138
|
+
assert.deepEqual(operation.boundary.sharedConsumers, ['CLI', 'LLM', 'Viewer', 'VS Code']);
|
|
139
|
+
assert.equal(operation.boundary.canonicalSchemaVocabularyChanged, false);
|
|
140
|
+
}
|
|
141
|
+
console.log('✓ shared operation catalog exposes one adapter-neutral normalized lifecycle projection');
|
|
142
|
+
|
|
143
|
+
{
|
|
144
|
+
const root = await mkdtemp(path.join(os.tmpdir(), 'tiinex-lifecycle-cli-'));
|
|
145
|
+
try {
|
|
146
|
+
await mkdir(path.join(root, 'fixture'), { recursive: true });
|
|
147
|
+
for (const item of [control, child, retestArtifact, closureArtifact, reductionArtifact]) await writeFile(path.join(root, item.path), `${item.markdown}\n`, 'utf8');
|
|
148
|
+
const factsPath = path.join(root, 'facts.json');
|
|
149
|
+
await writeFile(factsPath, `${JSON.stringify({ authority: AUTHORITY, representatives: [rep()] }, null, 2)}\n`, 'utf8');
|
|
150
|
+
const lines = [];
|
|
151
|
+
const io = { log: (value) => lines.push(value), error: (value) => lines.push(value) };
|
|
152
|
+
const code = await runPortableCli(['project-lifecycle-readiness', root, '--controlling-task', CONTROL, '--facts', factsPath], io);
|
|
153
|
+
assert.equal(code, 0, lines.join('\n'));
|
|
154
|
+
const output = JSON.parse(lines.at(-1));
|
|
155
|
+
assert.equal(output.readiness.state, 'ready-for-retest');
|
|
156
|
+
assert.equal(output.retest.state, 'not-observed');
|
|
157
|
+
assert.equal(output.closure.state, 'open');
|
|
158
|
+
} finally { await rm(root, { recursive: true, force: true }); }
|
|
159
|
+
}
|
|
160
|
+
console.log('✓ CLI consumes the same lifecycle operation result without inventing adapter-local semantics');
|
|
161
|
+
|
|
162
|
+
function artifactTask(filePath, title, { parent = null } = {}) {
|
|
163
|
+
const parentBlock = parent ? `- Parent\n - Parent Schema: tiinex.task.v1\n - Created At: 2026-09-06 00:00:00\n - Trace: [Parent](${path.basename(parent.path)})\n - Origin:\n - [relative](${path.basename(parent.path)})\n` : '';
|
|
164
|
+
const parentIntegrity = parent ? `- [sha256-base64url-c14n-v2](${C14N_V2_VALIDATOR_TARGET})\n - Towards: [Parent](${path.basename(parent.path)})\n - Value: ${parent.digest}\n\n` : '';
|
|
165
|
+
return artifact(filePath, 'tiinex.task.v1', title, `## Objective\n\nExercise lifecycle readiness semantics.\n\n## Done Criteria\n\n- the exact governing criteria are satisfied only by authorized re-test and closure evidence\n\n## Scope\n\n- synthetic neutral regression\n\n## Dependencies\n\n- none`, parentBlock, parentIntegrity);
|
|
166
|
+
}
|
|
167
|
+
function artifactValidation(filePath) { return artifact(filePath, 'tiinex.validation.report.v1', 'Validation Report Fixture', `## Report Scope\n\n- Scope: exact controlling Task\n- Targets: fixture/control.trace.md\n\n## Validation Methods\n\n- Methods Used: synthetic exact assertion\n- Method Boundaries: fixture only\n\n## Findings Summary\n\n- Summary: normalized fact supplies outcome semantics\n- Overall State: evidence only without normalized authority fact\n\n## Finding List\n\n- Findings: none\n\n## Run Boundary\n\n- Run Context: permanent component regression\n- What Was Not Checked: external systems\n\n## Interpretation Limits\n\n- Does Not Prove: closure or authority by report existence\n- Must Not Hide: unresolved scope, currentness, criteria, or authority`); }
|
|
168
|
+
function artifactDecision(filePath) { return artifact(filePath, 'tiinex.decision.v1', 'Closure Decision Fixture', `## Decision\n\n- State: accepted\n- Subject: exact controlling Task closure\n- Decision: normalized fact may qualify this artifact as explicit closure only with matching authority and pass basis\n\n## Basis\n\n- synthetic exact closure evidence\n\n## Consequences\n\n- no implicit closure from convergence or pass alone`); }
|
|
169
|
+
function artifactReduction(filePath) { return artifact(filePath, 'tiinex.reduction.v1', 'Reduction Fixture', `## Source Context\n\n- Source: qualified child-work context\n\n## Carry-Forward State\n\n- normalized fact decides whether required re-test inputs are sufficiently carried\n\n## Loss And Uncertainty\n\n- normalized fact exposes material loss state\n\n## Validation\n\n- reduction existence alone never proves completion`); }
|
|
170
|
+
function artifact(filePath, schemaId, title, body, parentBlock = '', parentIntegrity = '') {
|
|
171
|
+
const unsigned = `# Continuity Context\n\n- Envelope Schema: tiinex.root.v1\n${parentBlock}- Current\n - Current Schema: ${schemaId}\n - Created At: 2026-09-06 00:01:00\n - Authors: Fixture\n - Why: Exercise adapter-neutral lifecycle readiness semantics.\n - Summary: ${title}.\n - Status: local\n\n---\n\n# ${title}\n\n${body}\n\n---\n\n# Continuity Integrity\n\n${parentIntegrity}- [sha256-base64url-c14n-v2](${C14N_V2_VALIDATOR_TARGET})\n - Towards: self\n - Value: pending\n`;
|
|
172
|
+
const sealed = sealC14nV2Self(unsigned);
|
|
173
|
+
assert.equal(sealed.state, 'sealed');
|
|
174
|
+
const markdown = sealed.markdown;
|
|
175
|
+
const digest = validatedC14nV2PrimarySelfDigest(markdown);
|
|
176
|
+
assert.equal(digest.state, 'verified');
|
|
177
|
+
const record = Object.freeze({ ...createRecordFromMarkdown(markdown, { path: filePath, sourceMode: 'local-test' }), id: filePath, path: filePath });
|
|
178
|
+
return Object.freeze({ path: filePath, markdown, digest: digest.value, record });
|
|
179
|
+
}
|