@tearleads/client-sdk 0.1.63 → 0.1.65
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/client/organizations/organizationAccessRestoration.js +1 -1
- package/data/containers/shared/mutationAcknowledgement.js +1 -1
- package/data/containers/shared/mutationAcknowledgement.js.map +1 -1
- package/data/documents/blob/shared/projection.js +4 -4
- package/data/documents/blob/shared/projection.js.map +1 -1
- package/data/documents/shared/containerKek/containerKekCurrency.d.ts +22 -0
- package/data/documents/shared/containerKek/containerKekEntryVerification.js +15 -0
- package/data/documents/shared/containerKek/containerKekLogFetch.d.ts +18 -0
- package/data/documents/shared/containerKek/containerKekLogFetch.js +76 -0
- package/data/documents/shared/containerKek/containerKekPath.js +265 -0
- package/data/documents/shared/containerKek/containerKekPath.js.map +1 -0
- package/data/documents/shared/containerKek/containerKekPathHistory.d.ts +61 -0
- package/data/documents/shared/containerKek/containerKekPathHistory.js +223 -0
- package/data/documents/shared/containerKek/containerKekPathHistory.js.map +1 -0
- package/data/documents/shared/containerKek/containerKekPathVerification.d.ts +15 -0
- package/data/documents/shared/containerKek/containerKekPathVerification.js +23 -0
- package/data/documents/shared/containerKek/containerKekPathVerification.js.map +1 -0
- package/data/documents/shared/containerKek/containerKekWrapping.js +61 -0
- package/data/documents/shared/containerKek/containerKekWrapping.js.map +1 -0
- package/data/documents/shared/containerKek/keyringLogWalk.d.ts +45 -0
- package/data/documents/shared/containerKek/keyringLogWalk.js +204 -0
- package/data/documents/shared/containerKek/keyringRebuild.d.ts +60 -0
- package/data/documents/shared/containerKek/keyringRebuild.js +242 -0
- package/data/documents/shared/containerKek/keyringRebuild.js.map +1 -0
- package/data/documents/shared/crypto.js +2 -2
- package/data/documents/shared/crypto.js.map +1 -1
- package/data/documents/shared/events.js +1 -1
- package/data/documents/shared/projection/index.d.ts +25 -0
- package/data/documents/shared/projection/index.js +132 -0
- package/data/documents/shared/projection/index.js.map +1 -0
- package/data/documents/shared/projection/projectionContentKeys.d.ts +90 -0
- package/data/documents/shared/projection/projectionContentKeys.js +262 -0
- package/data/documents/shared/projection/projectionContentKeys.js.map +1 -0
- package/data/documents/shared/projection/projectionTargets.d.ts +38 -0
- package/data/documents/shared/projection/projectionTargets.js +164 -0
- package/data/documents/shared/projection/projectionTargets.js.map +1 -0
- package/data/documents/shared/responses.d.ts +1 -1
- package/data/documents/shared/responses.js +1 -1
- package/data/documents/shared/responses.js.map +1 -1
- package/data/documents/shared/sync/documentSyncUpdateDecryption.js +238 -0
- package/data/documents/shared/sync/documentSyncUpdateDecryption.js.map +1 -0
- package/data/documents/shared/sync/documentSyncUpdateIsolation.d.ts +55 -0
- package/data/documents/shared/sync/documentSyncUpdateIsolation.js +298 -0
- package/data/documents/shared/sync/documentSyncUpdateIsolation.js.map +1 -0
- package/data/documents/shared/sync/mutationAcknowledgement.js +10 -0
- package/data/documents/shared/sync/mutationAcknowledgement.js.map +1 -0
- package/data/documents/shared/sync/pullContinuation.js +53 -0
- package/data/documents/shared/sync/syncPagination.d.ts +20 -0
- package/data/documents/shared/sync/syncPagination.js +109 -0
- package/data/documents/shared/sync/syncPagination.js.map +1 -0
- package/data/documents/shared/sync/syncResponseAuthorization.js +63 -0
- package/data/documents/shared/sync/syncResponseAuthorization.js.map +1 -0
- package/data/documents/shared/sync/syncResponses.d.ts +11 -0
- package/data/documents/shared/sync/syncResponses.js +285 -0
- package/data/documents/shared/sync/syncResponses.js.map +1 -0
- package/data/documents/shared/sync/syncSubmitFailure.d.ts +9 -0
- package/data/documents/shared/types.d.ts +3 -3
- package/data/documents/shared/types.js.map +1 -1
- package/data/keyingProjectionVerification/checkpoints/accessManifestCheckpointEnforcement.js +61 -0
- package/data/keyingProjectionVerification/checkpoints/accessManifestCheckpointEnforcement.js.map +1 -0
- package/data/keyingProjectionVerification/checkpoints/bundleVerification.js +61 -0
- package/data/keyingProjectionVerification/checkpoints/bundleVerification.js.map +1 -0
- package/data/keyingProjectionVerification/checkpoints/checkpointContext.d.ts +45 -0
- package/data/keyingProjectionVerification/checkpoints/checkpointContext.js +120 -0
- package/data/keyingProjectionVerification/checkpoints/checkpointContext.js.map +1 -0
- package/data/keyingProjectionVerification/checkpoints/manifestCheckpointVerification.js +64 -0
- package/data/keyingProjectionVerification/checkpoints/manifestCheckpointVerification.js.map +1 -0
- package/data/keyingProjectionVerification/container/containerAncestorCitations.js +164 -0
- package/data/keyingProjectionVerification/container/containerAncestorCitations.js.map +1 -0
- package/data/keyingProjectionVerification/container/containerCreateManifest.js +28 -0
- package/data/keyingProjectionVerification/container/containerDestinationVerification.js +51 -0
- package/data/keyingProjectionVerification/container/containerDestinationVerification.js.map +1 -0
- package/data/keyingProjectionVerification/container/containerManifestVerification.js +285 -0
- package/data/keyingProjectionVerification/container/containerManifestVerification.js.map +1 -0
- package/data/keyingProjectionVerification/container/containerPathVerification.js +51 -0
- package/data/keyingProjectionVerification/container/containerPathVerification.js.map +1 -0
- package/data/keyingProjectionVerification/container/containerProjectionVerification.d.ts +25 -0
- package/data/keyingProjectionVerification/container/containerProjectionVerification.js +254 -0
- package/data/keyingProjectionVerification/container/containerProjectionVerification.js.map +1 -0
- package/data/keyingProjectionVerification/document/documentDependencyPaths.d.ts +17 -0
- package/data/keyingProjectionVerification/document/documentDependencyPaths.js +70 -0
- package/data/keyingProjectionVerification/document/documentDependencyPaths.js.map +1 -0
- package/data/keyingProjectionVerification/document/documentManifestPolicies.js +32 -0
- package/data/keyingProjectionVerification/document/documentManifestPolicies.js.map +1 -0
- package/data/keyingProjectionVerification/document/documentManifestPredecessor.js +12 -0
- package/data/keyingProjectionVerification/document/documentManifestVerification.js +135 -0
- package/data/keyingProjectionVerification/document/documentManifestVerification.js.map +1 -0
- package/data/keyingProjectionVerification/document/documentProjectionVerification.d.ts +24 -0
- package/data/keyingProjectionVerification/document/documentProjectionVerification.js +172 -0
- package/data/keyingProjectionVerification/document/documentProjectionVerification.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeCheckpointCurrency.js +100 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeCheckpointCurrency.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeCheckpointEnforcement.js +8 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeCheckpointEnforcement.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeDocumentChainVerification.js +177 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeDocumentChainVerification.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgePolicyCheckpoints.js +17 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgePolicyCheckpoints.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgePolicyCurrency.js +55 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgePolicyCurrency.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgePrincipalEvidence.js +116 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgePrincipalEvidence.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeProofVerification.d.ts +34 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeProofVerification.js +208 -0
- package/data/keyingProjectionVerification/documentPurge/documentPurgeProofVerification.js.map +1 -0
- package/data/keyingProjectionVerification/index.d.ts +4 -4
- package/data/keyingProjectionVerification/index.js +4 -4
- package/data/keyingProjectionVerification/index.js.map +1 -1
- package/data/keyingProjectionVerification/principalPolicy/mergeProjectionPolicyEvidence.js +45 -0
- package/data/keyingProjectionVerification/principalPolicy/mergeProjectionPolicyEvidence.js.map +1 -0
- package/data/keyingProjectionVerification/principalPolicy/organizationFounderBinding.js +41 -0
- package/data/keyingProjectionVerification/principalPolicy/organizationFounderBinding.js.map +1 -0
- package/data/keyingProjectionVerification/principalPolicy/principalPolicyCache.js +76 -0
- package/data/keyingProjectionVerification/principalPolicy/principalPolicyCache.js.map +1 -0
- package/data/keyingProjectionVerification/principalPolicy/principalPolicyVerification.js +252 -0
- package/data/keyingProjectionVerification/principalPolicy/principalPolicyVerification.js.map +1 -0
- package/data/keyingProjectionVerification/principalPolicy/projectionAuthorizationEvidence.js +63 -0
- package/data/keyingProjectionVerification/principalPolicy/projectionAuthorizationEvidence.js.map +1 -0
- package/data/keyingProjectionVerification/principalPolicy/projectionPolicyEvidence.js +23 -0
- package/data/keyingProjectionVerification/principalPolicy/projectionPolicyEvidence.js.map +1 -0
- package/data/keyingProjectionVerification/principalPolicy/resolvedPrincipalPolicy.js +72 -0
- package/data/keyingProjectionVerification/principalPolicy/resolvedPrincipalPolicy.js.map +1 -0
- package/data/persistence/container-contents/containerContentsPersistence.js +3 -3
- package/data/persistence/container-contents/containerContentsPersistence.js.map +1 -1
- package/data/persistence/container-contents/containerContentsPersistenceTypes.d.ts +2 -2
- package/data/persistence/container-contents/containerContentsPersistenceTypes.js.map +1 -1
- package/data/persistence/container-contents/containerCreateIntentSettlement.js +1 -1
- package/data/persistence/container-contents/containerDeletionPersistence.js +2 -2
- package/data/persistence/container-contents/containerDocumentReassignment.js +2 -2
- package/data/persistence/container-contents/containerDocumentReassignment.js.map +1 -1
- package/data/persistence/container-contents/containerHydrationPersistence.js +3 -3
- package/data/persistence/container-contents/containerHydrationPersistence.js.map +1 -1
- package/data/persistence/container-contents/containerIntentPersistence.js +1 -1
- package/data/persistence/container-contents/containerMetadataMutationPersistence.js +5 -5
- package/data/persistence/container-contents/containerMetadataMutationPersistence.js.map +1 -1
- package/data/persistence/container-contents/containerMetadataPullContinuationPersistence.js +1 -1
- package/data/persistence/container-contents/containerMetadataRows.js +3 -3
- package/data/persistence/container-contents/containerMetadataRows.js.map +1 -1
- package/data/persistence/container-contents/containerMoveAbandonPersistence.js +1 -1
- package/data/persistence/container-contents/containerMoveIntentRows.js +1 -1
- package/data/persistence/container-contents/containerPendingUpdatePersistence.js +3 -3
- package/data/persistence/container-contents/containerPendingUpdatePersistence.js.map +1 -1
- package/data/persistence/container-contents/containerRebindPersistence.js +1 -1
- package/data/persistence/container-contents/containerReconcilePersistence.js +2 -2
- package/data/persistence/container-contents/containerRecoveryPersistence.js +1 -1
- package/data/persistence/container-contents/containerRemovalWork.js +3 -3
- package/data/persistence/container-contents/containerRemovalWork.js.map +1 -1
- package/data/persistence/container-contents/containerStructuralRepair.js +1 -1
- package/data/persistence/container-contents/documentLinkRemovalRepair.js +2 -2
- package/data/persistence/container-contents/documentLinkRemovalRepair.js.map +1 -1
- package/data/persistence/container-contents/documentMoveIntentPersistence.js +2 -2
- package/data/persistence/container-contents/documentMoveIntentPersistence.js.map +1 -1
- package/data/persistence/container-contents/documentPlacementIntentEnqueue.js +2 -2
- package/data/persistence/container-contents/documentPlacementIntentEnqueue.js.map +1 -1
- package/data/persistence/container-contents/documentPurgePlacement.js +1 -1
- package/data/persistence/container-contents/dormantContainerMetadata.js +1 -1
- package/data/persistence/container-contents/dormantMetadataSweep.js +1 -1
- package/data/persistence/container-contents/pendingContainerCreate.js +1 -1
- package/data/persistence/container-contents/supersededContainerBindings.js +1 -1
- package/data/persistence/containers/containerPersistence.js +1 -1
- package/data/persistence/containers/containerSyncWatermarkPersistence.js +1 -1
- package/data/persistence/containers/documentContainerProjectionPersistence.js +1 -1
- package/data/persistence/containers/documentPlacement.js +1 -1
- package/data/persistence/documents/containerDocumentTombstoneHoldsPersistence.js +1 -1
- package/data/persistence/documents/documentDiscoveryEvidencePersistence.js +3 -3
- package/data/persistence/documents/documentDiscoveryEvidencePersistence.js.map +1 -1
- package/data/persistence/documents/documentDiscoveryReset.js +1 -1
- package/data/persistence/documents/documentDiscoveryReset.js.map +1 -1
- package/data/persistence/documents/documentsPersistence.js +3 -3
- package/data/persistence/documents/documentsPersistence.js.map +1 -1
- package/data/persistence/documents/internal/attachmentStagingPersistence.js +1 -1
- package/data/persistence/documents/internal/containerDocumentTombstoneHolds.js +1 -1
- package/data/persistence/documents/internal/containerDocumentTombstones.js +1 -1
- package/data/persistence/documents/internal/createDocumentWithHistoryCheckpoint.js +2 -2
- package/data/persistence/documents/internal/createDocumentWithHistoryCheckpoint.js.map +1 -1
- package/data/persistence/documents/internal/discardDocument.js +3 -3
- package/data/persistence/documents/internal/discardDocument.js.map +1 -1
- package/data/persistence/documents/internal/documentDeletionPersistence.js +4 -4
- package/data/persistence/documents/internal/documentDeletionPersistence.js.map +1 -1
- package/data/persistence/documents/internal/documentMutationPersistence.js +5 -5
- package/data/persistence/documents/internal/documentMutationPersistence.js.map +1 -1
- package/data/persistence/documents/internal/documentProjectionRows.js +1 -1
- package/data/persistence/documents/internal/documentPullContinuationPersistence.js +1 -1
- package/data/persistence/documents/internal/documentRows.js +2 -2
- package/data/persistence/documents/internal/documentRows.js.map +1 -1
- package/data/persistence/documents/internal/documentSummaryQueries.js +1 -1
- package/data/persistence/documents/internal/ensureDocumentsSchema.js +2 -2
- package/data/persistence/documents/internal/hydratedAttachmentPersistence.js +1 -1
- package/data/persistence/documents/internal/orphanSideRows.js +2 -2
- package/data/persistence/documents/internal/orphanSideRows.js.map +1 -1
- package/data/persistence/documents/internal/pendingCreateAdoption.js +1 -1
- package/data/persistence/documents/internal/rowQueryPersistence.js +2 -2
- package/data/persistence/documents/internal/syncQueuePersistence.js +3 -3
- package/data/persistence/documents/internal/syncQueuePersistence.js.map +1 -1
- package/data/persistence/documents/types.d.ts +3 -3
- package/data/persistence/documents/types.js.map +1 -1
- package/data/persistence/keyingCheckpoints/documentPurgeCheckpointPersistence.d.ts +10 -0
- package/data/persistence/keyingCheckpoints/documentPurgeCheckpointPersistence.js +43 -0
- package/data/persistence/keyingCheckpoints/documentPurgeCheckpointPersistence.js.map +1 -0
- package/data/persistence/keyingCheckpoints/keyingCheckpointAdvancePersistence.js +222 -0
- package/data/persistence/keyingCheckpoints/keyingCheckpointAdvancePersistence.js.map +1 -0
- package/data/persistence/keyingCheckpoints/keyingCheckpointEvidence.js +32 -0
- package/data/persistence/keyingCheckpoints/keyingCheckpointPersistence.js +133 -0
- package/data/persistence/keyingCheckpoints/keyingCheckpointPersistence.js.map +1 -0
- package/data/persistence/keyingCheckpoints/locallyAcknowledgedCheckpointPersistence.d.ts +53 -0
- package/data/persistence/keyingCheckpoints/locallyAcknowledgedCheckpointPersistence.js +167 -0
- package/data/persistence/keyingCheckpoints/locallyAcknowledgedCheckpointPersistence.js.map +1 -0
- package/data/persistence/keyingCheckpoints/organizationReplacementCheckpointPersistence.js +72 -0
- package/data/persistence/keyingCheckpoints/organizationReplacementCheckpointPersistence.js.map +1 -0
- package/data/persistence/keyingCheckpoints/principalAuthorizationCheckpoints.js +29 -0
- package/data/persistence/keyingCheckpoints/principalAuthorizationCheckpoints.js.map +1 -0
- package/data/persistence/organizationFounderPersistence.js +2 -2
- package/data/persistence/organizationFounderPersistence.js.map +1 -1
- package/data/persistence/organizations/organizationAccessRevocationPersistence.js +3 -3
- package/data/persistence/organizations/organizationAccessRevocationPersistence.js.map +1 -1
- package/data/persistence/organizations/organizationDataUsagePersistence.js +2 -2
- package/data/persistence/organizations/organizationDataUsagePersistence.js.map +1 -1
- package/data/persistence/organizations/organizationGroupNamePersistence.js +2 -2
- package/data/persistence/organizations/organizationGroupNamePersistence.js.map +1 -1
- package/data/persistence/organizations/organizationPresentationDenialPersistence.js +2 -2
- package/data/persistence/organizations/organizationPresentationDenialPersistence.js.map +1 -1
- package/data/persistence/organizations/organizationProfileDocumentPointers.js +2 -2
- package/data/persistence/organizations/organizationProfileDocumentPointers.js.map +1 -1
- package/data/persistence/organizations/organizationProvisioningAttemptPersistence.js +1 -1
- package/data/persistence/organizations/organizationProvisioningAttemptPersistence.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelGrantPersistence.js +1 -1
- package/data/persistence/organizations/organizationReadModelGrantPersistence.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelMemberLoad.js +1 -1
- package/data/persistence/organizations/organizationReadModelMemberLoad.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelMembershipPersistence.js +1 -1
- package/data/persistence/organizations/organizationReadModelMembershipPersistence.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelPersistence.js +3 -3
- package/data/persistence/organizations/organizationReadModelPersistence.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelProjection.js +1 -1
- package/data/persistence/organizations/organizationReadModelProjection.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelPurge.js +3 -3
- package/data/persistence/organizations/organizationReadModelPurge.js.map +1 -1
- package/data/persistence/principalCurrentAcknowledgementPersistence.d.ts +3 -3
- package/data/persistence/principalCurrentAcknowledgementPersistence.js +10 -10
- package/data/persistence/principalCurrentAcknowledgementPersistence.js.map +1 -1
- package/data/persistence/principalHistory/principalHistoryEvidencePersistence.d.ts +32 -0
- package/data/persistence/principalHistory/principalHistoryEvidencePersistence.js +92 -0
- package/data/persistence/principalHistory/principalHistoryEvidencePersistence.js.map +1 -0
- package/data/persistence/principalHistory/principalHistoryIncompleteRetention.js +26 -0
- package/data/persistence/principalHistory/principalHistoryIncompleteRetention.js.map +1 -0
- package/data/persistence/principalHistory/principalHistoryNodeRetention.js +201 -0
- package/data/persistence/principalHistory/principalHistoryNodeRetention.js.map +1 -0
- package/data/persistence/principalHistory/principalHistoryPrefixPersistence.d.ts +29 -0
- package/data/persistence/principalHistory/principalHistoryPrefixPersistence.js +102 -0
- package/data/persistence/principalHistory/principalHistoryPrefixPersistence.js.map +1 -0
- package/data/persistence/principalHistory/principalHistoryRootOwnership.js +71 -0
- package/data/persistence/principalHistory/principalHistoryRootOwnership.js.map +1 -0
- package/data/persistence/principalHistory/principalHistoryStagePersistence.d.ts +15 -0
- package/data/persistence/principalHistory/principalHistoryStagePersistence.js +96 -0
- package/data/persistence/principalHistory/principalHistoryStagePersistence.js.map +1 -0
- package/data/persistence/principalHistory/principalHistoryStageRetention.js +45 -0
- package/data/persistence/principalHistory/principalHistoryStageRetention.js.map +1 -0
- package/data/persistence/principalHistory/principalHistoryUnpublishedRetention.js +64 -0
- package/data/persistence/principalHistory/principalHistoryUnpublishedRetention.js.map +1 -0
- package/data/persistence/principalKeys/principalGrantRetirementPersistence.d.ts +9 -0
- package/data/persistence/principalKeys/principalGrantRetirementPersistence.js +43 -0
- package/data/persistence/principalKeys/principalGrantRetirementPersistence.js.map +1 -0
- package/data/persistence/principalKeys/principalKeyEnvelopeArchivePersistence.js +63 -0
- package/data/persistence/principalKeys/principalKeyEnvelopeArchivePersistence.js.map +1 -0
- package/data/persistence/principalKeys/principalKeyEnvelopeCandidates.js +87 -0
- package/data/persistence/principalKeys/principalKeyEnvelopeCandidates.js.map +1 -0
- package/data/persistence/principalMutationJournalPersistence.d.ts +1 -1
- package/data/persistence/principalMutationJournalPersistence.js +1 -1
- package/data/persistence/principalMutationJournalPersistence.js.map +1 -1
- package/data/persistence/principalPolicy/principalPolicyBundleIntegrity.js +49 -0
- package/data/persistence/principalPolicy/principalPolicyBundleIntegrity.js.map +1 -0
- package/data/persistence/principalPolicy/principalPolicyCheckpointSelection.js +26 -0
- package/data/persistence/principalPolicy/principalPolicyCheckpointSelection.js.map +1 -0
- package/data/persistence/principalPolicy/principalPolicyOrganizationPersistence.js +42 -0
- package/data/persistence/principalPolicy/principalPolicyOrganizationPersistence.js.map +1 -0
- package/data/persistence/principalPolicy/principalPolicyPersistence.js +279 -0
- package/data/persistence/principalPolicy/principalPolicyPersistence.js.map +1 -0
- package/data/persistence/principalPolicy/principalPolicyReferenceCheckpoint.js +27 -0
- package/data/persistence/principalPolicy/principalPolicyReferenceCheckpoint.js.map +1 -0
- package/data/persistence/principalPolicy/principalPolicyReferenceIndexPersistence.js +115 -0
- package/data/persistence/principalPolicy/principalPolicyReferenceIndexPersistence.js.map +1 -0
- package/data/persistence/principalPolicy/principalPolicyReferencePersistence.js +215 -0
- package/data/persistence/principalPolicy/principalPolicyReferencePersistence.js.map +1 -0
- package/data/persistence/principalPolicy/verifiedPrincipalPolicyBundle.js +33 -0
- package/data/persistence/principalPolicy/verifiedPrincipalPolicyBundle.js.map +1 -0
- package/data/persistence/principalPolicy/verifiedPrincipalPolicyCurrent.js +56 -0
- package/data/persistence/principalPolicy/verifiedPrincipalPolicyCurrent.js.map +1 -0
- package/data/persistence/principalPolicy/verifiedPrincipalPolicyRetentionPersistence.js +18 -0
- package/data/persistence/principalPolicy/verifiedPrincipalPolicyRetentionPersistence.js.map +1 -0
- package/data/persistence/securityIncidentPersistence.js +1 -1
- package/data/persistence/securityIncidentPersistence.js.map +1 -1
- package/data/persistence/trustedUserIdentityPinPersistence.js +1 -1
- package/data/persistence/verifiedManifestBundlePersistence.d.ts +1 -1
- package/data/persistence/verifiedManifestBundlePersistence.js +4 -4
- package/data/persistence/verifiedManifestBundlePersistence.js.map +1 -1
- package/data/principals/organizationGroupRoles.js +2 -2
- package/data/principals/organizationGroupRoles.js.map +1 -1
- package/data/principals/principalHistoryPrefixProtection.js.map +1 -1
- package/data/principals/principalHistoryStageProtection.js.map +1 -1
- package/data/principals/principalPolicyCrypto.js +1 -1
- package/data/principals/principalPolicyCrypto.js.map +1 -1
- package/data/sqlite/documentPersistence/documentHistoryPersistence.d.ts +86 -0
- package/data/sqlite/documentPersistence/documentHistoryPersistence.js +304 -0
- package/data/sqlite/documentPersistence/documentHistoryPersistence.js.map +1 -0
- package/data/sqlite/documentPersistence/documentOrphanBlobReclaims.js +6 -0
- package/data/sqlite/documentPersistence/documentOrphanBlobReclaims.js.map +1 -0
- package/data/sqlite/documentPersistence/documentPendingUpdatePersistence.d.ts +103 -0
- package/data/sqlite/documentPersistence/documentPendingUpdatePersistence.js +243 -0
- package/data/sqlite/documentPersistence/documentPendingUpdatePersistence.js.map +1 -0
- package/data/sqlite/documentPersistence/documentPersistenceTypes.d.ts +79 -0
- package/data/sqlite/documentPersistence/documentPersistenceTypes.js.map +1 -0
- package/data/sqlite/documentPersistence/documentRecordPersistence.d.ts +275 -0
- package/data/sqlite/documentPersistence/documentRecordPersistence.js +103 -0
- package/data/sqlite/documentPersistence/documentRecordPersistence.js.map +1 -0
- package/data/sqlite/documentPersistence/documentSyncFailurePersistence.d.ts +39 -0
- package/data/sqlite/documentPersistence/documentSyncFailurePersistence.js +81 -0
- package/data/sqlite/documentPersistence/documentSyncFailurePersistence.js.map +1 -0
- package/data/sqlite/documentPersistence/index.d.ts +22 -0
- package/data/sqlite/documentPersistence/index.js +35 -0
- package/data/sqlite/documentPersistence/index.js.map +1 -0
- package/data/sqlite/schema/containerSchema.d.ts +1193 -0
- package/data/sqlite/schema/containerSchema.js +103 -0
- package/data/sqlite/schema/containerSchema.js.map +1 -0
- package/data/sqlite/schema/index.d.ts +8055 -0
- package/data/sqlite/schema/index.js +525 -0
- package/data/sqlite/schema/index.js.map +1 -0
- package/data/sqlite/schema/organizationDataUsageSchema.js +34 -0
- package/data/sqlite/schema/organizationDataUsageSchema.js.map +1 -0
- package/data/sqlite/schema/organizationProvisioningAttemptSchema.js +23 -0
- package/data/sqlite/schema/organizationProvisioningAttemptSchema.js.map +1 -0
- package/data/sqlite/schema/organizationReadModelTableRegistry.d.ts +1332 -0
- package/data/sqlite/schema/organizationReadModelTableRegistry.js +31 -0
- package/data/sqlite/schema/organizationReadModelTableRegistry.js.map +1 -0
- package/data/sqlite/schema/principalHistoryEvidenceSchema.d.ts +308 -0
- package/data/sqlite/schema/principalHistoryEvidenceSchema.js +48 -0
- package/data/sqlite/schema/principalHistoryEvidenceSchema.js.map +1 -0
- package/data/sqlite/schema/principalHistoryNodeRetentionSchema.js +30 -0
- package/data/sqlite/schema/principalHistoryNodeRetentionSchema.js.map +1 -0
- package/data/sqlite/schema/principalHistoryRetentionSchema.js +25 -0
- package/data/sqlite/schema/principalHistoryRetentionSchema.js.map +1 -0
- package/data/sqlite/schema/principalHistoryStageSchema.d.ts +161 -0
- package/data/sqlite/schema/principalHistoryStageSchema.js +34 -0
- package/data/sqlite/schema/principalHistoryStageSchema.js.map +1 -0
- package/data/sqlite/schema/principalMutationJournalSchema.d.ts +85 -0
- package/data/sqlite/schema/principalMutationJournalSchema.js +13 -0
- package/data/sqlite/schema/principalMutationJournalSchema.js.map +1 -0
- package/data/sqlite/schema/principalPolicySchema.js +72 -0
- package/data/sqlite/schema/principalPolicySchema.js.map +1 -0
- package/data/sqlite/schema/securityIncidentSchema.d.ts +224 -0
- package/data/sqlite/schema/securityIncidentSchema.js +28 -0
- package/data/sqlite/schema/securityIncidentSchema.js.map +1 -0
- package/data/sqlite/schema/verifiedManifestBundleSchema.d.ts +174 -0
- package/data/sqlite/schema/verifiedManifestBundleSchema.js +36 -0
- package/data/sqlite/schema/verifiedManifestBundleSchema.js.map +1 -0
- package/data/sqlite/sqlitePersistenceRuntime.d.ts +1 -1
- package/data/sqlite/sqlitePersistenceRuntime.js +1 -1
- package/package.json +1 -1
- package/sqlite/index.d.ts +1 -1
- package/sqlite/index.js +1 -1
- package/stores/container-contents/accessRestorationSweep.js +1 -1
- package/stores/container-contents/accessRestorationSweep.js.map +1 -1
- package/stores/container-contents/containerContentsStore.d.ts +1 -1
- package/stores/container-contents/containerContentsStore.js +12 -12
- package/stores/container-contents/containerContentsStore.js.map +1 -1
- package/stores/container-contents/containerState/containerStateMap.js.map +1 -0
- package/stores/container-contents/containerState/containerStatePersistence.js +57 -0
- package/stores/container-contents/containerState/containerStatePersistence.js.map +1 -0
- package/stores/container-contents/containerState/missingContainerState.js +10 -0
- package/stores/container-contents/containerState/missingContainerState.js.map +1 -0
- package/stores/container-contents/containerState/missingSyncedContainerState.js.map +1 -0
- package/stores/container-contents/containerState/reconcilableContainer.d.ts +48 -0
- package/stores/container-contents/containerState/reconcilableContainer.js.map +1 -0
- package/stores/container-contents/documentWork/documentRecovery.js +114 -0
- package/stores/container-contents/documentWork/documentRecovery.js.map +1 -0
- package/stores/container-contents/documentWork/documentRotation.js +13 -0
- package/stores/container-contents/documentWork/documentRotation.js.map +1 -0
- package/stores/container-contents/documentWork/index.js +29 -0
- package/stores/container-contents/documentWork/index.js.map +1 -0
- package/stores/container-contents/hydration/backgroundHydration.js +32 -0
- package/stores/container-contents/hydration/backgroundHydration.js.map +1 -0
- package/stores/container-contents/hydration/remoteHydrationRequest.js +245 -0
- package/stores/container-contents/hydration/remoteHydrationRequest.js.map +1 -0
- package/stores/container-contents/hydration/startupHydration.js +110 -0
- package/stores/container-contents/hydration/startupHydration.js.map +1 -0
- package/stores/container-contents/index.d.ts +3 -3
- package/stores/container-contents/index.js +2 -2
- package/stores/container-contents/index.js.map +1 -1
- package/stores/container-contents/localRefresh.js +2 -2
- package/stores/container-contents/localRefresh.js.map +1 -1
- package/stores/container-contents/operations/containerPurgeCore.js +98 -0
- package/stores/container-contents/operations/containerPurgeCore.js.map +1 -0
- package/stores/container-contents/operations/emptyTrashOperation.js.map +1 -0
- package/stores/container-contents/operations/groupRewrapOperation.js +52 -0
- package/stores/container-contents/operations/groupRewrapOperation.js.map +1 -0
- package/stores/container-contents/operations/index.js +301 -0
- package/stores/container-contents/operations/index.js.map +1 -0
- package/stores/container-contents/operations/purgeContainerOperation.js.map +1 -0
- package/stores/container-contents/operations/reportShareFailure.js +44 -0
- package/stores/container-contents/operations/reportShareFailure.js.map +1 -0
- package/stores/container-contents/operations/setContainerIconOperation.js +47 -0
- package/stores/container-contents/operations/setContainerIconOperation.js.map +1 -0
- package/stores/container-contents/operations/shareOperations.js +90 -0
- package/stores/container-contents/operations/shareOperations.js.map +1 -0
- package/stores/container-contents/remoteEvents/remoteBackedContainerState.js.map +1 -0
- package/stores/container-contents/remoteEvents/remoteContainerIngestion.js +59 -0
- package/stores/container-contents/remoteEvents/remoteContainerIngestion.js.map +1 -0
- package/stores/container-contents/remoteEvents/remoteEventProjectionInvalidation.js +36 -0
- package/stores/container-contents/remoteEvents/remoteEventProjectionInvalidation.js.map +1 -0
- package/stores/container-contents/remoteEvents/remoteEventSync.js +38 -0
- package/stores/container-contents/remoteEvents/remoteEventSync.js.map +1 -0
- package/stores/container-contents/remoteWrites/remoteWriteGuards.js +54 -0
- package/stores/container-contents/remoteWrites/remoteWriteGuards.js.map +1 -0
- package/stores/container-contents/remoteWrites/remoteWriteQueue.js +51 -0
- package/stores/container-contents/remoteWrites/remoteWriteQueue.js.map +1 -0
- package/stores/container-contents/remoteWrites/writeGeneration.js.map +1 -0
- package/stores/container-contents/state.d.ts +1 -1
- package/stores/container-contents/state.js +2 -2
- package/stores/container-contents/state.js.map +1 -1
- package/stores/container-contents/syncAgent/index.d.ts +8 -0
- package/stores/container-contents/syncAgent/index.js +241 -0
- package/stores/container-contents/syncAgent/index.js.map +1 -0
- package/stores/container-contents/syncAgent/metadataSyncSignal.js +37 -0
- package/stores/container-contents/syncAgent/metadataSyncSignal.js.map +1 -0
- package/stores/container-contents/syncAgent/syncAgentTypes.d.ts +81 -0
- package/stores/container-contents/syncAgent/syncAgentTypes.js.map +1 -0
- package/stores/container-contents/syncAgent/syncLaneIteration.js +237 -0
- package/stores/container-contents/syncAgent/syncLaneIteration.js.map +1 -0
- package/stores/container-contents/systemContainers/existingSystemContainer.js +58 -0
- package/stores/container-contents/systemContainers/existingSystemContainer.js.map +1 -0
- package/stores/container-contents/systemContainers/organizationMetadataSystemContainer.js +44 -0
- package/stores/container-contents/systemContainers/organizationMetadataSystemContainer.js.map +1 -0
- package/stores/container-contents/systemContainers/systemContainerHydration.js +30 -0
- package/stores/container-contents/systemContainers/systemContainerHydration.js.map +1 -0
- package/stores/container-contents/systemContainers/systemContainerIcon.js +42 -0
- package/stores/container-contents/systemContainers/systemContainerIcon.js.map +1 -0
- package/stores/container-contents/systemContainers/systemContainerLookup.js.map +1 -0
- package/stores/container-contents/systemContainers/systemContainerPostCreate.js +109 -0
- package/stores/container-contents/systemContainers/systemContainerPostCreate.js.map +1 -0
- package/stores/container-contents/systemContainers/systemContainerPromotion.js +49 -0
- package/stores/container-contents/systemContainers/systemContainerPromotion.js.map +1 -0
- package/stores/container-contents/types.d.ts +2 -2
- package/stores/container-contents/types.js.map +1 -1
- package/stores/documents/documentStore/attachmentUpload/attachmentSourceUpload.js +39 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentSourceUpload.js.map +1 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentStaging.js +84 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentStaging.js.map +1 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentUploadAttempt.js +97 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentUploadAttempt.js.map +1 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentUploadLane.js +49 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentUploadLane.js.map +1 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentUploadResume.js +95 -0
- package/stores/documents/documentStore/attachmentUpload/attachmentUploadResume.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentDetachState.js +54 -0
- package/stores/documents/documentStore/attachments/attachmentDetachState.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentHydration.js +90 -0
- package/stores/documents/documentStore/attachments/attachmentHydration.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentHydrationCommit.js +53 -0
- package/stores/documents/documentStore/attachments/attachmentHydrationCommit.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentIntents.js +39 -0
- package/stores/documents/documentStore/attachments/attachmentIntents.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentMutationPersistence.js +37 -0
- package/stores/documents/documentStore/attachments/attachmentMutationPersistence.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentPersistFollowup.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentPersistence.js +106 -0
- package/stores/documents/documentStore/attachments/attachmentPersistence.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentRemoval.js +136 -0
- package/stores/documents/documentStore/attachments/attachmentRemoval.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentSnapshot.js.map +1 -0
- package/stores/documents/documentStore/attachments/attachmentWriteGeneration.js +32 -0
- package/stores/documents/documentStore/attachments/attachmentWriteGeneration.js.map +1 -0
- package/stores/documents/documentStore/attachments/index.js +241 -0
- package/stores/documents/documentStore/attachments/index.js.map +1 -0
- package/stores/documents/documentStore/history/documentHistoryCompaction.js +67 -0
- package/stores/documents/documentStore/history/documentHistoryCompaction.js.map +1 -0
- package/stores/documents/documentStore/history/durableDocumentReload.js +79 -0
- package/stores/documents/documentStore/history/durableDocumentReload.js.map +1 -0
- package/stores/documents/documentStore/history/historyRebuild.js +75 -0
- package/stores/documents/documentStore/history/historyRebuild.js.map +1 -0
- package/stores/documents/documentStore/index.d.ts +8 -0
- package/stores/documents/documentStore/index.js +215 -0
- package/stores/documents/documentStore/index.js.map +1 -0
- package/stores/documents/documentStore/initialization/deferredInitialUpdate.js +116 -0
- package/stores/documents/documentStore/initialization/deferredInitialUpdate.js.map +1 -0
- package/stores/documents/documentStore/initialization/index.js +330 -0
- package/stores/documents/documentStore/initialization/index.js.map +1 -0
- package/stores/documents/documentStore/initialization/initializationAttachments.js +9 -0
- package/stores/documents/documentStore/initialization/initializationAttachments.js.map +1 -0
- package/stores/documents/documentStore/initialization/initializationHistory.js +33 -0
- package/stores/documents/documentStore/initialization/initializationHistory.js.map +1 -0
- package/stores/documents/documentStore/initialization/initializationRecovery.js +107 -0
- package/stores/documents/documentStore/initialization/initializationRecovery.js.map +1 -0
- package/stores/documents/documentStore/mutationIdentityRevalidation.js.map +1 -1
- package/stores/documents/documentStore/mutations.js +2 -2
- package/stores/documents/documentStore/mutations.js.map +1 -1
- package/stores/documents/documentStore/pendingUpdateRefusal.js +1 -1
- package/stores/documents/documentStore/pendingUpdateRefusal.js.map +1 -1
- package/stores/documents/documentStore/persistence.js +3 -3
- package/stores/documents/documentStore/persistence.js.map +1 -1
- package/stores/documents/documentStore/rotation/index.js +307 -0
- package/stores/documents/documentStore/rotation/index.js.map +1 -0
- package/stores/documents/documentStore/rotation/rotationProvenance.js +52 -0
- package/stores/documents/documentStore/rotation/rotationProvenance.js.map +1 -0
- package/stores/documents/documentStore/rotation/rotationSettlement.js +222 -0
- package/stores/documents/documentStore/rotation/rotationSettlement.js.map +1 -0
- package/stores/documents/documentStore/rows.js +2 -2
- package/stores/documents/documentStore/rows.js.map +1 -1
- package/stores/documents/documentStore/state.js +1 -1
- package/stores/documents/documentStore/state.js.map +1 -1
- package/stores/documents/documentStore/sync/index.js +299 -0
- package/stores/documents/documentStore/sync/index.js.map +1 -0
- package/stores/documents/documentStore/sync/pullContinuationInvalidation.js +61 -0
- package/stores/documents/documentStore/sync/pullContinuationInvalidation.js.map +1 -0
- package/stores/documents/documentStore/sync/remoteRevalidationTelemetry.js +15 -0
- package/stores/documents/documentStore/sync/remoteRevalidationTelemetry.js.map +1 -0
- package/stores/documents/documentStore/sync/remoteWork.js.map +1 -0
- package/stores/documents/documentStore/sync/syncAcceptedUpdateIds.js.map +1 -0
- package/stores/documents/documentStore/sync/syncAttachmentSettlement.js +72 -0
- package/stores/documents/documentStore/sync/syncAttachmentSettlement.js.map +1 -0
- package/stores/documents/documentStore/sync/syncAttachments.js +323 -0
- package/stores/documents/documentStore/sync/syncAttachments.js.map +1 -0
- package/stores/documents/documentStore/sync/syncDetachedAttachments.js +129 -0
- package/stores/documents/documentStore/sync/syncDetachedAttachments.js.map +1 -0
- package/stores/documents/documentStore/sync/syncFinalize.js +204 -0
- package/stores/documents/documentStore/sync/syncFinalize.js.map +1 -0
- package/stores/documents/documentStore/sync/syncGeneration.js.map +1 -0
- package/stores/documents/documentStore/sync/syncOutgoingCoverage.js +96 -0
- package/stores/documents/documentStore/sync/syncOutgoingCoverage.js.map +1 -0
- package/stores/documents/documentStore/sync/syncRemoteSignals.js +67 -0
- package/stores/documents/documentStore/sync/syncRemoteSignals.js.map +1 -0
- package/stores/documents/documentStore/sync/syncRequest.js +157 -0
- package/stores/documents/documentStore/sync/syncRequest.js.map +1 -0
- package/stores/documents/documentStore/sync/syncShared.js +211 -0
- package/stores/documents/documentStore/sync/syncShared.js.map +1 -0
- package/stores/documents/documentStore/sync/syncUpdateImport.js +62 -0
- package/stores/documents/documentStore/sync/syncUpdateImport.js.map +1 -0
- package/stores/documents/documentStore/sync/versionCoverage.js +45 -0
- package/stores/documents/index.d.ts +1 -1
- package/stores/documents/index.js +1 -1
- package/stores/local-projection/localProjectionStore.d.ts +1 -1
- package/stores/local-projection/localProjectionStore.js +1 -1
- package/stores/local-projection/localProjectionStore.js.map +1 -1
- package/stores/local-projection/registry.d.ts +1 -1
- package/stores/local-projection/types.d.ts +1 -1
- package/workflows/blobs/detach.js +1 -1
- package/workflows/blobs/hydration/decrypt.js +2 -2
- package/workflows/blobs/hydration/decrypt.js.map +1 -1
- package/workflows/blobs/upload/index.js +1 -1
- package/workflows/blobs/verification/retainedAttachmentVerification.js +1 -1
- package/workflows/blobs/verification/writerProjection.js +1 -1
- package/workflows/container-contents/container-state/create/createAdoption.js +193 -0
- package/workflows/container-contents/container-state/create/createAdoption.js.map +1 -0
- package/workflows/container-contents/container-state/create/createChild.js +217 -0
- package/workflows/container-contents/container-state/create/createChild.js.map +1 -0
- package/workflows/container-contents/container-state/create/createIntentDepth.js +36 -0
- package/workflows/container-contents/container-state/create/createIntentDepth.js.map +1 -0
- package/workflows/container-contents/container-state/create/createIntentSettlement.js.map +1 -0
- package/workflows/container-contents/container-state/create/createIntentSync.js +354 -0
- package/workflows/container-contents/container-state/create/createIntentSync.js.map +1 -0
- package/workflows/container-contents/container-state/create/createTerminalFailure.js +19 -0
- package/workflows/container-contents/container-state/create/createTerminalFailure.js.map +1 -0
- package/workflows/container-contents/container-state/create/createWithMetadata.js +270 -0
- package/workflows/container-contents/container-state/create/createWithMetadata.js.map +1 -0
- package/workflows/container-contents/container-state/create/createWithMetadataPlan.js +68 -0
- package/workflows/container-contents/container-state/create/createWithMetadataPlan.js.map +1 -0
- package/workflows/container-contents/container-state/purge/localPurgeScope.js +49 -0
- package/workflows/container-contents/container-state/purge/localPurgeScope.js.map +1 -0
- package/workflows/container-contents/container-state/purge/purgeTree.js +298 -0
- package/workflows/container-contents/container-state/purge/purgeTree.js.map +1 -0
- package/workflows/container-contents/container-state/purge/purgeTreeCollection.js.map +1 -0
- package/workflows/container-contents/container-state/purge/purgeTreeContainerDeletion.js +75 -0
- package/workflows/container-contents/container-state/purge/purgeTreeContainerDeletion.js.map +1 -0
- package/workflows/container-contents/container-state/purge/purgeTreeScope.js +175 -0
- package/workflows/container-contents/container-state/purge/purgeTreeScope.js.map +1 -0
- package/workflows/container-contents/container-state/purge/readLocalPurgeScope.js +18 -0
- package/workflows/container-contents/container-state/purge/readLocalPurgeScope.js.map +1 -0
- package/workflows/container-contents/container-state/remote.js +2 -2
- package/workflows/container-contents/container-state/remote.js.map +1 -1
- package/workflows/container-contents/container-state/share/groupGrantVerification.js +71 -0
- package/workflows/container-contents/container-state/share/groupGrantVerification.js.map +1 -0
- package/workflows/container-contents/container-state/share/groupShareEpoch.js +16 -0
- package/workflows/container-contents/container-state/share/groupShareEpoch.js.map +1 -0
- package/workflows/container-contents/container-state/share/index.js +283 -0
- package/workflows/container-contents/container-state/share/index.js.map +1 -0
- package/workflows/container-contents/container-state/share/sharePersistence.js +136 -0
- package/workflows/container-contents/container-state/share/sharePersistence.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryApply.js +1 -1
- package/workflows/container-contents/documentDiscovery/documentDiscoveryApply.js.map +1 -1
- package/workflows/container-contents/documentDiscovery/index.js +1 -1
- package/workflows/container-contents/documentDiscovery/index.js.map +1 -1
- package/workflows/container-contents/documentLinks/index.js +1 -1
- package/workflows/container-contents/documentMove/documentMoveVanishedRefresh.js +1 -1
- package/workflows/container-contents/documentPriming/documentHydrationProbe.js +1 -1
- package/workflows/container-contents/documentPriming/index.js +1 -1
- package/workflows/container-contents/documentQueries/index.js +1 -1
- package/workflows/container-contents/documentQueries/sql.js +1 -1
- package/workflows/container-contents/info/blobInfo.js +1 -1
- package/workflows/container-contents/info/containerInfo.js +1 -1
- package/workflows/container-contents/info/documentInfo.js +1 -1
- package/workflows/container-contents/metadata/index.js +1 -1
- package/workflows/container-contents/metadata/index.js.map +1 -1
- package/workflows/container-contents/metadata/metadataEvents.d.ts +1 -1
- package/workflows/container-contents/metadata/metadataIncomingUpdateIsolation.js +2 -2
- package/workflows/container-contents/metadata/metadataIncomingUpdateIsolation.js.map +1 -1
- package/workflows/container-contents/metadata/metadataMutationPreparation.js +1 -1
- package/workflows/container-contents/metadata/metadataMutationPreparation.js.map +1 -1
- package/workflows/container-contents/metadata/metadataPullContinuationInvalidation.js +1 -1
- package/workflows/container-contents/metadata/metadataPullContinuationInvalidation.js.map +1 -1
- package/workflows/container-contents/metadata/metadataRemoteSync.d.ts +1 -1
- package/workflows/container-contents/metadata/metadataSyncErrors.js +2 -2
- package/workflows/container-contents/metadata/metadataSyncErrors.js.map +1 -1
- package/workflows/container-contents/metadata/metadataSyncSettlement.d.ts +1 -1
- package/workflows/container-contents/metadata/metadataSyncSettlement.js.map +1 -1
- package/workflows/container-contents/metadata/metadataTypes.d.ts +1 -1
- package/workflows/container-contents/metadata/metadataTypes.js.map +1 -1
- package/workflows/container-contents/pendingWrites/index.js +2 -2
- package/workflows/container-contents/pendingWrites/sources.js +1 -1
- package/workflows/container-contents/remoteHydration/destination/destinationPrefetch.js.map +1 -0
- package/workflows/container-contents/remoteHydration/destination/destinationRoleCache.js.map +1 -0
- package/workflows/container-contents/remoteHydration/destination/destinationRootReload.js +10 -0
- package/workflows/container-contents/remoteHydration/destination/destinationRootReload.js.map +1 -0
- package/workflows/container-contents/remoteHydration/destination/replacementBinding.js +75 -0
- package/workflows/container-contents/remoteHydration/destination/replacementBinding.js.map +1 -0
- package/workflows/container-contents/remoteHydration/destination/verifiedDestination.js +296 -0
- package/workflows/container-contents/remoteHydration/destination/verifiedDestination.js.map +1 -0
- package/workflows/container-contents/remoteHydration/index.js +4 -4
- package/workflows/container-contents/remoteHydration/index.js.map +1 -1
- package/workflows/container-contents/remoteHydration/lanes/childIndex.js.map +1 -0
- package/workflows/container-contents/remoteHydration/lanes/laneFetchMarkers.js +21 -0
- package/workflows/container-contents/remoteHydration/lanes/laneFetchMarkers.js.map +1 -0
- package/workflows/container-contents/remoteHydration/lanes/parentLaneFetch.js +61 -0
- package/workflows/container-contents/remoteHydration/lanes/parentLaneFetch.js.map +1 -0
- package/workflows/container-contents/remoteHydration/lanes/parentLaneQueue.js.map +1 -0
- package/workflows/container-contents/remoteHydration/principalPolicyCache.js +1 -1
- package/workflows/container-contents/remoteHydration/principalPolicyCache.js.map +1 -1
- package/workflows/container-contents/remoteHydration/reattachMetadata.js.map +1 -1
- package/workflows/container-contents/remoteHydration/reconciliation.js +2 -2
- package/workflows/container-contents/remoteHydration/reconciliation.js.map +1 -1
- package/workflows/container-contents/remoteHydration/remoteContainers/containerStateFingerprint.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/insertRemoteContainer.js +135 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/insertRemoteContainer.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerPageHydration.js +244 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerPageHydration.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerState.js +263 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerState.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerTimestamps.js.map +1 -0
- package/workflows/container-contents/remoteHydration/tombstoneApplication.js +2 -2
- package/workflows/container-contents/remoteHydration/tombstoneApplication.js.map +1 -1
- package/workflows/container-contents/tombstones/documentTombstoneEvidence.js +2 -2
- package/workflows/container-contents/tombstones/documentTombstoneEvidence.js.map +1 -1
- package/workflows/containers/child/create/createProjection.d.ts +6 -0
- package/workflows/containers/child/create/createProjection.js +43 -0
- package/workflows/containers/child/create/createProjection.js.map +1 -0
- package/workflows/containers/child/create/createSubmission.d.ts +56 -0
- package/workflows/containers/child/create/createSubmission.js +43 -0
- package/workflows/containers/child/create/createSubmission.js.map +1 -0
- package/workflows/containers/child/create/index.d.ts +24 -0
- package/workflows/containers/child/create/index.js +335 -0
- package/workflows/containers/child/create/index.js.map +1 -0
- package/workflows/containers/child/move/index.d.ts +23 -0
- package/workflows/containers/child/move/index.js +268 -0
- package/workflows/containers/child/move/index.js.map +1 -0
- package/workflows/containers/child/move/moveArtifacts.js +102 -0
- package/workflows/containers/child/move/moveArtifacts.js.map +1 -0
- package/workflows/containers/child/move/moveRotation.js +88 -0
- package/workflows/containers/child/move/moveRotation.js.map +1 -0
- package/workflows/containers/child/move/moveWraps.js +49 -0
- package/workflows/containers/child/move/moveWraps.js.map +1 -0
- package/workflows/containers/child/mutationSubmit.js +1 -1
- package/workflows/containers/child/mutationSubmit.js.map +1 -1
- package/workflows/containers/child/recite.js +2 -2
- package/workflows/containers/child/recite.js.map +1 -1
- package/workflows/containers/child/rekey/carriedDescendantRekeys.js +126 -0
- package/workflows/containers/child/rekey/carriedDescendantRekeys.js.map +1 -0
- package/workflows/containers/child/rekey/index.d.ts +32 -0
- package/workflows/containers/child/rekey/index.js +227 -0
- package/workflows/containers/child/rekey/index.js.map +1 -0
- package/workflows/containers/child/rekey/keyringOverrideLineage.d.ts +22 -0
- package/workflows/containers/child/rekey/keyringOverrideLineage.js +39 -0
- package/workflows/containers/child/rekey/rekeyProjection.d.ts +46 -0
- package/workflows/containers/child/rekey/rekeyProjection.js +151 -0
- package/workflows/containers/child/rekey/rekeyProjection.js.map +1 -0
- package/workflows/containers/child/rekey/rekeyRemote.d.ts +24 -0
- package/workflows/containers/child/rekey/rekeyRemote.js +64 -0
- package/workflows/containers/child/rekey/rekeyRemote.js.map +1 -0
- package/workflows/containers/child/revoke.js +5 -5
- package/workflows/containers/child/revoke.js.map +1 -1
- package/workflows/containers/child/rotation/replacementPrincipalPolicyReferences.js +19 -0
- package/workflows/containers/child/rotation/replacementPrincipalPolicyReferences.js.map +1 -0
- package/workflows/containers/child/rotation/rotationContext.js +64 -0
- package/workflows/containers/child/rotation/rotationContext.js.map +1 -0
- package/workflows/containers/child/rotation/rotationPrincipalPolicies.js +19 -0
- package/workflows/containers/child/rotation/rotationPrincipalPolicies.js.map +1 -0
- package/workflows/containers/child/rotation/rotationWraps.js +85 -0
- package/workflows/containers/child/rotation/rotationWraps.js.map +1 -0
- package/workflows/containers/child/share/currentShareGrantMutation.js +82 -0
- package/workflows/containers/child/share/currentShareGrantMutation.js.map +1 -0
- package/workflows/containers/child/share/currentSharePrincipalPolicy.js +83 -0
- package/workflows/containers/child/share/currentSharePrincipalPolicy.js.map +1 -0
- package/workflows/containers/child/share/index.d.ts +65 -0
- package/workflows/containers/child/share/index.js +256 -0
- package/workflows/containers/child/share/index.js.map +1 -0
- package/workflows/containers/child/share/runtimeCurrentGroupShare.js +79 -0
- package/workflows/containers/child/share/runtimeCurrentGroupShare.js.map +1 -0
- package/workflows/containers/child/share/shareAncestorRepair.js +95 -0
- package/workflows/containers/child/share/shareAncestorRepair.js.map +1 -0
- package/workflows/containers/child/share/shareMaterialization.d.ts +25 -0
- package/workflows/containers/child/share/shareMaterialization.js +164 -0
- package/workflows/containers/child/share/shareMaterialization.js.map +1 -0
- package/workflows/containers/child/share/sharePlanCore.d.ts +82 -0
- package/workflows/containers/child/share/sharePlanCore.js +191 -0
- package/workflows/containers/child/share/sharePlanCore.js.map +1 -0
- package/workflows/containers/child/share/sharePrincipalPolicy.d.ts +51 -0
- package/workflows/containers/child/share/sharePrincipalPolicy.js +194 -0
- package/workflows/containers/child/share/sharePrincipalPolicy.js.map +1 -0
- package/workflows/containers/child/share/shareProjection.js.map +1 -0
- package/workflows/containers/index.d.ts +13 -13
- package/workflows/containers/index.js +12 -12
- package/workflows/containers/index.js.map +1 -1
- package/workflows/containers/writeRefusal.js +1 -1
- package/workflows/containers/writeRefusal.js.map +1 -1
- package/workflows/documents/create/createAdoption.js +1 -1
- package/workflows/documents/create/createResponse.js +2 -2
- package/workflows/documents/create/createResponse.js.map +1 -1
- package/workflows/documents/create/index.js +1 -1
- package/workflows/documents/documentMutationCommit.d.ts +1 -1
- package/workflows/documents/documentMutationPreparation.d.ts +1 -1
- package/workflows/documents/documentMutationPreparation.js +1 -1
- package/workflows/documents/documentMutationPreparation.js.map +1 -1
- package/workflows/documents/index.d.ts +5 -5
- package/workflows/documents/index.js +5 -5
- package/workflows/documents/index.js.map +1 -1
- package/workflows/documents/linkSet/index.js +2 -2
- package/workflows/documents/linkSet/index.js.map +1 -1
- package/workflows/documents/linkSet/linkSetAuthority.js +2 -2
- package/workflows/documents/linkSet/linkSetAuthority.js.map +1 -1
- package/workflows/documents/linkSet/linkSetBlobRewraps.js +2 -2
- package/workflows/documents/linkSet/linkSetBlobRewraps.js.map +1 -1
- package/workflows/documents/linkSet/linkSetProjectionSeed.js +2 -2
- package/workflows/documents/linkSet/linkSetProjectionSeed.js.map +1 -1
- package/workflows/documents/linkSet/linkSetRemote.js +1 -1
- package/workflows/documents/linkSet/linkSetRemote.js.map +1 -1
- package/workflows/documents/purge/index.js +2 -2
- package/workflows/documents/purge/index.js.map +1 -1
- package/workflows/documents/sync/index.js +2 -2
- package/workflows/documents/sync/index.js.map +1 -1
- package/workflows/documents/sync/initialSync.js +1 -1
- package/workflows/documents/sync/readOnlyProjectionFailure.js +1 -1
- package/workflows/documents/sync/readOnlyProjectionFailure.js.map +1 -1
- package/workflows/documents/sync/readOnlySync.d.ts +3 -3
- package/workflows/documents/sync/readOnlySync.js +1 -1
- package/workflows/documents/sync/readOnlySync.js.map +1 -1
- package/workflows/documents/sync/reportDocumentSyncQuarantine.js.map +1 -1
- package/workflows/documents/sync/syncAttemptPlanning.js +2 -2
- package/workflows/documents/sync/syncAttemptPlanning.js.map +1 -1
- package/workflows/documents/sync/syncAttemptState.d.ts +2 -2
- package/workflows/documents/sync/syncAttemptState.js.map +1 -1
- package/workflows/documents/sync/syncResponseResult.js +2 -2
- package/workflows/documents/sync/syncResponseResult.js.map +1 -1
- package/workflows/documents/syncFailures/index.js +1 -1
- package/workflows/documents/syncFailures/index.js.map +1 -1
- package/workflows/documents/syncFailures/syncAbandon.js.map +1 -1
- package/workflows/documents/syncFailures/syncFailureClassification.js +1 -1
- package/workflows/documents/syncFailures/syncFailureClassification.js.map +1 -1
- package/workflows/documents/syncPlan/syncContentKeys.d.ts +1 -1
- package/workflows/documents/syncPlan/syncContentKeys.js +3 -3
- package/workflows/documents/syncPlan/syncContentKeys.js.map +1 -1
- package/workflows/documents/syncPlan/syncPlanMaterial.js +2 -2
- package/workflows/documents/syncPlan/syncPlanMaterial.js.map +1 -1
- package/workflows/documents/syncRekeys/syncAutomaticContainerRekeys.js +4 -4
- package/workflows/documents/syncRekeys/syncAutomaticContainerRekeys.js.map +1 -1
- package/workflows/documents/syncRekeys/syncContainerRekeyPreparation.js +1 -1
- package/workflows/documents/syncRekeys/syncRecoveryRekey.d.ts +1 -1
- package/workflows/documents/syncRekeys/syncRecoveryRekey.js +1 -1
- package/workflows/organizations/currentOrganizationAuthority.js +2 -2
- package/workflows/organizations/currentOrganizationAuthority.js.map +1 -1
- package/workflows/organizations/groupMetadata/groupMetadataAccess.js +1 -1
- package/workflows/organizations/groupMetadata/groupMetadataAccess.js.map +1 -1
- package/workflows/organizations/groupMetadata/groupMetadataContainerAuthority.js +1 -1
- package/workflows/organizations/groupMetadata/groupMetadataContainerAuthority.js.map +1 -1
- package/workflows/organizations/groupNames/currentOrganizationGroupNames.js +1 -1
- package/workflows/organizations/groupNames/currentOrganizationGroupNames.js.map +1 -1
- package/workflows/organizations/groupNames/groupNameUniqueness.js +3 -3
- package/workflows/organizations/groupNames/groupNameUniqueness.js.map +1 -1
- package/workflows/organizations/groupNames/organizationGroupNamePolicies.js +2 -2
- package/workflows/organizations/groupNames/organizationGroupNamePolicies.js.map +1 -1
- package/workflows/organizations/groupPolicy/currentGroupPolicyMutationContext.js +1 -1
- package/workflows/organizations/groupPolicy/currentGroupPolicyMutationContext.js.map +1 -1
- package/workflows/organizations/groupPolicy/groupPolicyMutationContext.js +2 -2
- package/workflows/organizations/groupPolicy/groupPolicyMutationContext.js.map +1 -1
- package/workflows/organizations/groupPolicy/groupPolicyMutationEvidence.js +1 -1
- package/workflows/organizations/groupPolicy/groupPolicyMutationEvidence.js.map +1 -1
- package/workflows/organizations/groupPolicy/groupPolicyVerification.js +1 -1
- package/workflows/organizations/groupPolicy/groupPolicyVerification.js.map +1 -1
- package/workflows/organizations/groups/createCurrentOrganizationGroup.js +1 -1
- package/workflows/organizations/groups/createCurrentOrganizationGroup.js.map +1 -1
- package/workflows/organizations/groups/deleteOrganizationGroup.js +1 -1
- package/workflows/organizations/groups/deleteOrganizationGroup.js.map +1 -1
- package/workflows/organizations/groups/organizationGroupDirectory.js +1 -1
- package/workflows/organizations/groups/organizationGroupDirectory.js.map +1 -1
- package/workflows/organizations/principalMutations/runtimeCurrentOrganizationMutation.js +1 -1
- package/workflows/organizations/principalMutations/runtimeCurrentOrganizationMutation.js.map +1 -1
- package/workflows/organizations/provisioning/organizationReplacementVerification.js +1 -1
- package/workflows/organizations/provisioning/organizationReplacementVerification.js.map +1 -1
- package/workflows/organizations/readModel/listLocalOrganizations.js +1 -1
- package/workflows/organizations/readModel/localReadModelDetails.js +1 -1
- package/workflows/organizations/readModel/localReadModelDetails.js.map +1 -1
- package/workflows/organizations/rematerialization/precedingPrincipalRematerialization.js +1 -1
- package/workflows/organizations/rematerialization/precedingPrincipalRematerialization.js.map +1 -1
- package/workflows/organizations/rematerialization/principalContainerRematerialization.js +5 -5
- package/workflows/organizations/rematerialization/principalContainerRematerialization.js.map +1 -1
- package/workflows/organizations/rematerialization/principalContainerRematerializationPlanning.js +1 -1
- package/workflows/organizations/rematerialization/principalContainerRematerializationPlanning.js.map +1 -1
- package/workflows/organizations/rematerialization/principalContainerRematerializationTargets.js +1 -1
- package/workflows/organizations/rematerialization/principalContainerRematerializationTargets.js.map +1 -1
- package/workflows/principals/acknowledgements/acknowledgedPrincipalCurrents.js +1 -1
- package/workflows/principals/acknowledgements/acknowledgedPrincipalCurrents.js.map +1 -1
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.d.ts +1 -1
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.js +1 -1
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.js.map +1 -1
- package/workflows/principals/acknowledgements/initialPrincipalCurrentPublication.js +1 -1
- package/workflows/principals/acknowledgements/initialPrincipalCurrentPublication.js.map +1 -1
- package/workflows/principals/acknowledgements/reconcileAcknowledgedPrincipalCurrent.js +2 -2
- package/workflows/principals/acknowledgements/reconcileAcknowledgedPrincipalCurrent.js.map +1 -1
- package/workflows/principals/externalAdminPolicy.js +2 -2
- package/workflows/principals/externalAdminPolicy.js.map +1 -1
- package/workflows/principals/historyRecovery/loadRecoveredPrincipalHistoryPage.js +2 -2
- package/workflows/principals/historyRecovery/loadRecoveredPrincipalHistoryPage.js.map +1 -1
- package/workflows/principals/historyRecovery/principalHistoryRecoveryPrefix.js +1 -1
- package/workflows/principals/historyRecovery/principalHistoryRecoveryPrefix.js.map +1 -1
- package/workflows/principals/historyRecovery/principalHistoryRecoveryReferences.js +1 -1
- package/workflows/principals/historyRecovery/principalHistoryRecoveryReferences.js.map +1 -1
- package/workflows/principals/historyRecovery/principalHistoryRecoveryStage.js +1 -1
- package/workflows/principals/historyRecovery/principalHistoryRecoveryStage.js.map +1 -1
- package/workflows/principals/historyRecovery/recoverPrincipalPolicyHistory.js +3 -3
- package/workflows/principals/historyRecovery/recoverPrincipalPolicyHistory.js.map +1 -1
- package/workflows/principals/policyCache/index.js +4 -4
- package/workflows/principals/policyCache/index.js.map +1 -1
- package/workflows/principals/policyCache/principalPolicyCacheAdvance.js +1 -1
- package/workflows/principals/policyCache/principalPolicyCacheAdvance.js.map +1 -1
- package/workflows/principals/policyCache/principalPolicyOrganizationScope.js +3 -3
- package/workflows/principals/policyCache/principalPolicyOrganizationScope.js.map +1 -1
- package/workflows/principals/policyRepair.js +1 -1
- package/workflows/principals/policyRepair.js.map +1 -1
- package/workflows/principals/publicHistory/publicPrincipalHistoryAuthority.js.map +1 -1
- package/workflows/principals/publicHistory/publicPrincipalHistoryPage.js +2 -2
- package/workflows/principals/publicHistory/publicPrincipalHistoryPage.js.map +1 -1
- package/workflows/principals/publicHistory/publicPrincipalHistoryProgress.js +3 -3
- package/workflows/principals/publicHistory/publicPrincipalHistoryProgress.js.map +1 -1
- package/workflows/principals/publicHistory/publicPrincipalHistoryTypes.d.ts +2 -2
- package/workflows/principals/publicHistory/publicPrincipalHistoryTypes.js.map +1 -1
- package/workflows/principals/publicHistory/publicProjectionPrincipal.js +1 -1
- package/workflows/principals/publicHistory/publicProjectionPrincipal.js.map +1 -1
- package/workflows/principals/publicHistory/recoverPublicPrincipalHistory.js +1 -1
- package/workflows/principals/publicHistory/recoverPublicPrincipalHistory.js.map +1 -1
- package/workflows/principals/publicHistory/selectPublicPrincipalHistory.js +1 -1
- package/workflows/principals/publicHistory/selectPublicPrincipalHistory.js.map +1 -1
- package/workflows/principals/recoveryOperation/principalRecoveryDirectory.js +1 -1
- package/workflows/principals/recoveryOperation/principalRecoveryDirectory.js.map +1 -1
- package/workflows/principals/recoveryOperation/principalRecoveryMemoValidity.js +1 -1
- package/workflows/principals/recoveryOperation/principalRecoveryMemoValidity.js.map +1 -1
- package/workflows/registration/organizationProvisioningArtifacts.d.ts +1 -1
- package/workflows/registration/persistRegistrationBootstrap.d.ts +2 -2
- package/workflows/registration/persistRegistrationBootstrap.js +2 -2
- package/workflows/registration/persistRegistrationBootstrap.js.map +1 -1
- package/workflows/registration/provisioningAcknowledgement.js +1 -1
- package/workflows/registration/provisioningAcknowledgement.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.js +1 -1
- package/workflows/registration/registrationPrincipalPolicyPersistence.js +1 -1
- package/workflows/registration/registrationPrincipalPolicyPersistence.js.map +1 -1
- package/workflows/sync/remoteReset.js +7 -7
- package/workflows/sync/remoteReset.js.map +1 -1
- package/workflows/sync/remoteResetAttachments.js +1 -1
- package/workflows/sync/remoteResetCursorScope.js +1 -1
- package/workflows/sync/remoteResetPlans.js +1 -1
- package/workflows/sync/remoteResetPrincipalScope.js +5 -5
- package/workflows/sync/remoteResetPrincipalScope.js.map +1 -1
- package/workflows/sync/remoteResetScope.js +1 -1
- package/data/documents/shared/containerKekCurrency.d.ts +0 -22
- package/data/documents/shared/containerKekEntryVerification.js +0 -15
- package/data/documents/shared/containerKekLogFetch.d.ts +0 -18
- package/data/documents/shared/containerKekLogFetch.js +0 -76
- package/data/documents/shared/containerKekPath.js +0 -265
- package/data/documents/shared/containerKekPath.js.map +0 -1
- package/data/documents/shared/containerKekPathHistory.d.ts +0 -61
- package/data/documents/shared/containerKekPathHistory.js +0 -223
- package/data/documents/shared/containerKekPathHistory.js.map +0 -1
- package/data/documents/shared/containerKekPathVerification.d.ts +0 -15
- package/data/documents/shared/containerKekPathVerification.js +0 -23
- package/data/documents/shared/containerKekPathVerification.js.map +0 -1
- package/data/documents/shared/containerKekWrapping.js +0 -61
- package/data/documents/shared/containerKekWrapping.js.map +0 -1
- package/data/documents/shared/documentSyncUpdateDecryption.js +0 -238
- package/data/documents/shared/documentSyncUpdateDecryption.js.map +0 -1
- package/data/documents/shared/documentSyncUpdateIsolation.d.ts +0 -55
- package/data/documents/shared/documentSyncUpdateIsolation.js +0 -298
- package/data/documents/shared/documentSyncUpdateIsolation.js.map +0 -1
- package/data/documents/shared/keyringLogWalk.d.ts +0 -45
- package/data/documents/shared/keyringLogWalk.js +0 -204
- package/data/documents/shared/keyringRebuild.d.ts +0 -60
- package/data/documents/shared/keyringRebuild.js +0 -242
- package/data/documents/shared/keyringRebuild.js.map +0 -1
- package/data/documents/shared/mutationAcknowledgement.js +0 -10
- package/data/documents/shared/mutationAcknowledgement.js.map +0 -1
- package/data/documents/shared/projection.d.ts +0 -25
- package/data/documents/shared/projection.js +0 -132
- package/data/documents/shared/projection.js.map +0 -1
- package/data/documents/shared/projectionContentKeys.d.ts +0 -90
- package/data/documents/shared/projectionContentKeys.js +0 -262
- package/data/documents/shared/projectionContentKeys.js.map +0 -1
- package/data/documents/shared/projectionTargets.d.ts +0 -38
- package/data/documents/shared/projectionTargets.js +0 -164
- package/data/documents/shared/projectionTargets.js.map +0 -1
- package/data/documents/shared/pullContinuation.js +0 -53
- package/data/documents/shared/syncPagination.d.ts +0 -20
- package/data/documents/shared/syncPagination.js +0 -109
- package/data/documents/shared/syncPagination.js.map +0 -1
- package/data/documents/shared/syncResponseAuthorization.js +0 -63
- package/data/documents/shared/syncResponseAuthorization.js.map +0 -1
- package/data/documents/shared/syncResponses.d.ts +0 -11
- package/data/documents/shared/syncResponses.js +0 -285
- package/data/documents/shared/syncResponses.js.map +0 -1
- package/data/documents/shared/syncSubmitFailure.d.ts +0 -9
- package/data/keyingProjectionVerification/accessManifestCheckpointEnforcement.js +0 -61
- package/data/keyingProjectionVerification/accessManifestCheckpointEnforcement.js.map +0 -1
- package/data/keyingProjectionVerification/bundleVerification.js +0 -61
- package/data/keyingProjectionVerification/bundleVerification.js.map +0 -1
- package/data/keyingProjectionVerification/checkpointContext.d.ts +0 -45
- package/data/keyingProjectionVerification/checkpointContext.js +0 -120
- package/data/keyingProjectionVerification/checkpointContext.js.map +0 -1
- package/data/keyingProjectionVerification/containerAncestorCitations.js +0 -164
- package/data/keyingProjectionVerification/containerAncestorCitations.js.map +0 -1
- package/data/keyingProjectionVerification/containerCreateManifest.js +0 -28
- package/data/keyingProjectionVerification/containerDestinationVerification.js +0 -51
- package/data/keyingProjectionVerification/containerDestinationVerification.js.map +0 -1
- package/data/keyingProjectionVerification/containerManifestVerification.js +0 -285
- package/data/keyingProjectionVerification/containerManifestVerification.js.map +0 -1
- package/data/keyingProjectionVerification/containerPathVerification.js +0 -51
- package/data/keyingProjectionVerification/containerPathVerification.js.map +0 -1
- package/data/keyingProjectionVerification/containerProjectionVerification.d.ts +0 -25
- package/data/keyingProjectionVerification/containerProjectionVerification.js +0 -254
- package/data/keyingProjectionVerification/containerProjectionVerification.js.map +0 -1
- package/data/keyingProjectionVerification/documentDependencyPaths.d.ts +0 -17
- package/data/keyingProjectionVerification/documentDependencyPaths.js +0 -70
- package/data/keyingProjectionVerification/documentDependencyPaths.js.map +0 -1
- package/data/keyingProjectionVerification/documentManifestPolicies.js +0 -32
- package/data/keyingProjectionVerification/documentManifestPolicies.js.map +0 -1
- package/data/keyingProjectionVerification/documentManifestPredecessor.js +0 -12
- package/data/keyingProjectionVerification/documentManifestVerification.js +0 -135
- package/data/keyingProjectionVerification/documentManifestVerification.js.map +0 -1
- package/data/keyingProjectionVerification/documentProjectionVerification.d.ts +0 -24
- package/data/keyingProjectionVerification/documentProjectionVerification.js +0 -172
- package/data/keyingProjectionVerification/documentProjectionVerification.js.map +0 -1
- package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js +0 -100
- package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js.map +0 -1
- package/data/keyingProjectionVerification/documentPurgeCheckpointEnforcement.js +0 -8
- package/data/keyingProjectionVerification/documentPurgeCheckpointEnforcement.js.map +0 -1
- package/data/keyingProjectionVerification/documentPurgeDocumentChainVerification.js +0 -177
- package/data/keyingProjectionVerification/documentPurgeDocumentChainVerification.js.map +0 -1
- package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js +0 -17
- package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js.map +0 -1
- package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js +0 -55
- package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js.map +0 -1
- package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js +0 -116
- package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js.map +0 -1
- package/data/keyingProjectionVerification/documentPurgeProofVerification.d.ts +0 -34
- package/data/keyingProjectionVerification/documentPurgeProofVerification.js +0 -208
- package/data/keyingProjectionVerification/documentPurgeProofVerification.js.map +0 -1
- package/data/keyingProjectionVerification/manifestCheckpointVerification.js +0 -64
- package/data/keyingProjectionVerification/manifestCheckpointVerification.js.map +0 -1
- package/data/keyingProjectionVerification/mergeProjectionPolicyEvidence.js +0 -45
- package/data/keyingProjectionVerification/mergeProjectionPolicyEvidence.js.map +0 -1
- package/data/keyingProjectionVerification/organizationFounderBinding.js +0 -41
- package/data/keyingProjectionVerification/organizationFounderBinding.js.map +0 -1
- package/data/keyingProjectionVerification/principalPolicyCache.js +0 -76
- package/data/keyingProjectionVerification/principalPolicyCache.js.map +0 -1
- package/data/keyingProjectionVerification/principalPolicyVerification.js +0 -252
- package/data/keyingProjectionVerification/principalPolicyVerification.js.map +0 -1
- package/data/keyingProjectionVerification/projectionAuthorizationEvidence.js +0 -63
- package/data/keyingProjectionVerification/projectionAuthorizationEvidence.js.map +0 -1
- package/data/keyingProjectionVerification/projectionPolicyEvidence.js +0 -23
- package/data/keyingProjectionVerification/projectionPolicyEvidence.js.map +0 -1
- package/data/keyingProjectionVerification/resolvedPrincipalPolicy.js +0 -72
- package/data/keyingProjectionVerification/resolvedPrincipalPolicy.js.map +0 -1
- package/data/persistence/documentPurgeCheckpointPersistence.d.ts +0 -10
- package/data/persistence/documentPurgeCheckpointPersistence.js +0 -43
- package/data/persistence/documentPurgeCheckpointPersistence.js.map +0 -1
- package/data/persistence/keyingCheckpointAdvancePersistence.js +0 -222
- package/data/persistence/keyingCheckpointAdvancePersistence.js.map +0 -1
- package/data/persistence/keyingCheckpointEvidence.js +0 -32
- package/data/persistence/keyingCheckpointPersistence.js +0 -133
- package/data/persistence/keyingCheckpointPersistence.js.map +0 -1
- package/data/persistence/locallyAcknowledgedCheckpointPersistence.d.ts +0 -53
- package/data/persistence/locallyAcknowledgedCheckpointPersistence.js +0 -167
- package/data/persistence/locallyAcknowledgedCheckpointPersistence.js.map +0 -1
- package/data/persistence/organizationReplacementCheckpointPersistence.js +0 -72
- package/data/persistence/organizationReplacementCheckpointPersistence.js.map +0 -1
- package/data/persistence/principalAuthorizationCheckpoints.js +0 -29
- package/data/persistence/principalAuthorizationCheckpoints.js.map +0 -1
- package/data/persistence/principalGrantRetirementPersistence.d.ts +0 -9
- package/data/persistence/principalGrantRetirementPersistence.js +0 -43
- package/data/persistence/principalGrantRetirementPersistence.js.map +0 -1
- package/data/persistence/principalHistoryEvidencePersistence.d.ts +0 -32
- package/data/persistence/principalHistoryEvidencePersistence.js +0 -92
- package/data/persistence/principalHistoryEvidencePersistence.js.map +0 -1
- package/data/persistence/principalHistoryIncompleteRetention.js +0 -26
- package/data/persistence/principalHistoryIncompleteRetention.js.map +0 -1
- package/data/persistence/principalHistoryNodeRetention.js +0 -201
- package/data/persistence/principalHistoryNodeRetention.js.map +0 -1
- package/data/persistence/principalHistoryPrefixPersistence.d.ts +0 -29
- package/data/persistence/principalHistoryPrefixPersistence.js +0 -102
- package/data/persistence/principalHistoryPrefixPersistence.js.map +0 -1
- package/data/persistence/principalHistoryRootOwnership.js +0 -71
- package/data/persistence/principalHistoryRootOwnership.js.map +0 -1
- package/data/persistence/principalHistoryStagePersistence.d.ts +0 -15
- package/data/persistence/principalHistoryStagePersistence.js +0 -96
- package/data/persistence/principalHistoryStagePersistence.js.map +0 -1
- package/data/persistence/principalHistoryStageRetention.js +0 -45
- package/data/persistence/principalHistoryStageRetention.js.map +0 -1
- package/data/persistence/principalHistoryUnpublishedRetention.js +0 -64
- package/data/persistence/principalHistoryUnpublishedRetention.js.map +0 -1
- package/data/persistence/principalKeyEnvelopeArchivePersistence.js +0 -63
- package/data/persistence/principalKeyEnvelopeArchivePersistence.js.map +0 -1
- package/data/persistence/principalKeyEnvelopeCandidates.js +0 -87
- package/data/persistence/principalKeyEnvelopeCandidates.js.map +0 -1
- package/data/persistence/principalPolicyBundleIntegrity.js +0 -49
- package/data/persistence/principalPolicyBundleIntegrity.js.map +0 -1
- package/data/persistence/principalPolicyCheckpointSelection.js +0 -26
- package/data/persistence/principalPolicyCheckpointSelection.js.map +0 -1
- package/data/persistence/principalPolicyOrganizationPersistence.js +0 -42
- package/data/persistence/principalPolicyOrganizationPersistence.js.map +0 -1
- package/data/persistence/principalPolicyPersistence.js +0 -279
- package/data/persistence/principalPolicyPersistence.js.map +0 -1
- package/data/persistence/principalPolicyReferenceCheckpoint.js +0 -27
- package/data/persistence/principalPolicyReferenceCheckpoint.js.map +0 -1
- package/data/persistence/principalPolicyReferenceIndexPersistence.js +0 -115
- package/data/persistence/principalPolicyReferenceIndexPersistence.js.map +0 -1
- package/data/persistence/principalPolicyReferencePersistence.js +0 -215
- package/data/persistence/principalPolicyReferencePersistence.js.map +0 -1
- package/data/persistence/verifiedPrincipalPolicyBundle.js +0 -33
- package/data/persistence/verifiedPrincipalPolicyBundle.js.map +0 -1
- package/data/persistence/verifiedPrincipalPolicyCurrent.js +0 -56
- package/data/persistence/verifiedPrincipalPolicyCurrent.js.map +0 -1
- package/data/persistence/verifiedPrincipalPolicyRetentionPersistence.js +0 -18
- package/data/persistence/verifiedPrincipalPolicyRetentionPersistence.js.map +0 -1
- package/data/sqlite/containerSchema.d.ts +0 -1193
- package/data/sqlite/containerSchema.js +0 -103
- package/data/sqlite/containerSchema.js.map +0 -1
- package/data/sqlite/documentHistoryPersistence.d.ts +0 -86
- package/data/sqlite/documentHistoryPersistence.js +0 -304
- package/data/sqlite/documentHistoryPersistence.js.map +0 -1
- package/data/sqlite/documentOrphanBlobReclaims.js +0 -6
- package/data/sqlite/documentOrphanBlobReclaims.js.map +0 -1
- package/data/sqlite/documentPendingUpdatePersistence.d.ts +0 -103
- package/data/sqlite/documentPendingUpdatePersistence.js +0 -243
- package/data/sqlite/documentPendingUpdatePersistence.js.map +0 -1
- package/data/sqlite/documentPersistence.d.ts +0 -22
- package/data/sqlite/documentPersistence.js +0 -35
- package/data/sqlite/documentPersistence.js.map +0 -1
- package/data/sqlite/documentPersistenceTypes.d.ts +0 -79
- package/data/sqlite/documentPersistenceTypes.js.map +0 -1
- package/data/sqlite/documentRecordPersistence.d.ts +0 -275
- package/data/sqlite/documentRecordPersistence.js +0 -103
- package/data/sqlite/documentRecordPersistence.js.map +0 -1
- package/data/sqlite/documentSyncFailurePersistence.d.ts +0 -39
- package/data/sqlite/documentSyncFailurePersistence.js +0 -81
- package/data/sqlite/documentSyncFailurePersistence.js.map +0 -1
- package/data/sqlite/organizationDataUsageSchema.js +0 -34
- package/data/sqlite/organizationDataUsageSchema.js.map +0 -1
- package/data/sqlite/organizationProvisioningAttemptSchema.js +0 -23
- package/data/sqlite/organizationProvisioningAttemptSchema.js.map +0 -1
- package/data/sqlite/organizationReadModelTableRegistry.d.ts +0 -1332
- package/data/sqlite/organizationReadModelTableRegistry.js +0 -31
- package/data/sqlite/organizationReadModelTableRegistry.js.map +0 -1
- package/data/sqlite/principalHistoryEvidenceSchema.d.ts +0 -308
- package/data/sqlite/principalHistoryEvidenceSchema.js +0 -48
- package/data/sqlite/principalHistoryEvidenceSchema.js.map +0 -1
- package/data/sqlite/principalHistoryNodeRetentionSchema.js +0 -30
- package/data/sqlite/principalHistoryNodeRetentionSchema.js.map +0 -1
- package/data/sqlite/principalHistoryRetentionSchema.js +0 -25
- package/data/sqlite/principalHistoryRetentionSchema.js.map +0 -1
- package/data/sqlite/principalHistoryStageSchema.d.ts +0 -161
- package/data/sqlite/principalHistoryStageSchema.js +0 -34
- package/data/sqlite/principalHistoryStageSchema.js.map +0 -1
- package/data/sqlite/principalMutationJournalSchema.d.ts +0 -85
- package/data/sqlite/principalMutationJournalSchema.js +0 -13
- package/data/sqlite/principalMutationJournalSchema.js.map +0 -1
- package/data/sqlite/principalPolicySchema.js +0 -72
- package/data/sqlite/principalPolicySchema.js.map +0 -1
- package/data/sqlite/schema.d.ts +0 -8055
- package/data/sqlite/schema.js +0 -525
- package/data/sqlite/schema.js.map +0 -1
- package/data/sqlite/securityIncidentSchema.d.ts +0 -224
- package/data/sqlite/securityIncidentSchema.js +0 -28
- package/data/sqlite/securityIncidentSchema.js.map +0 -1
- package/data/sqlite/verifiedManifestBundleSchema.d.ts +0 -174
- package/data/sqlite/verifiedManifestBundleSchema.js +0 -36
- package/data/sqlite/verifiedManifestBundleSchema.js.map +0 -1
- package/stores/container-contents/backgroundHydration.js +0 -32
- package/stores/container-contents/backgroundHydration.js.map +0 -1
- package/stores/container-contents/containerPurgeCore.js +0 -98
- package/stores/container-contents/containerPurgeCore.js.map +0 -1
- package/stores/container-contents/containerStateMap.js.map +0 -1
- package/stores/container-contents/containerStatePersistence.js +0 -57
- package/stores/container-contents/containerStatePersistence.js.map +0 -1
- package/stores/container-contents/documentRecovery.js +0 -114
- package/stores/container-contents/documentRecovery.js.map +0 -1
- package/stores/container-contents/documentRotation.js +0 -13
- package/stores/container-contents/documentRotation.js.map +0 -1
- package/stores/container-contents/documentWork.js +0 -29
- package/stores/container-contents/documentWork.js.map +0 -1
- package/stores/container-contents/emptyTrashOperation.js.map +0 -1
- package/stores/container-contents/existingSystemContainer.js +0 -58
- package/stores/container-contents/existingSystemContainer.js.map +0 -1
- package/stores/container-contents/groupRewrapOperation.js +0 -52
- package/stores/container-contents/groupRewrapOperation.js.map +0 -1
- package/stores/container-contents/metadataSyncSignal.js +0 -37
- package/stores/container-contents/metadataSyncSignal.js.map +0 -1
- package/stores/container-contents/missingContainerState.js +0 -10
- package/stores/container-contents/missingContainerState.js.map +0 -1
- package/stores/container-contents/missingSyncedContainerState.js.map +0 -1
- package/stores/container-contents/operations.js +0 -301
- package/stores/container-contents/operations.js.map +0 -1
- package/stores/container-contents/organizationMetadataSystemContainer.js +0 -44
- package/stores/container-contents/organizationMetadataSystemContainer.js.map +0 -1
- package/stores/container-contents/purgeContainerOperation.js.map +0 -1
- package/stores/container-contents/reconcilableContainer.d.ts +0 -48
- package/stores/container-contents/reconcilableContainer.js.map +0 -1
- package/stores/container-contents/remoteBackedContainerState.js.map +0 -1
- package/stores/container-contents/remoteContainerIngestion.js +0 -59
- package/stores/container-contents/remoteContainerIngestion.js.map +0 -1
- package/stores/container-contents/remoteEventProjectionInvalidation.js +0 -36
- package/stores/container-contents/remoteEventProjectionInvalidation.js.map +0 -1
- package/stores/container-contents/remoteEventSync.js +0 -38
- package/stores/container-contents/remoteEventSync.js.map +0 -1
- package/stores/container-contents/remoteHydrationRequest.js +0 -245
- package/stores/container-contents/remoteHydrationRequest.js.map +0 -1
- package/stores/container-contents/remoteWriteGuards.js +0 -54
- package/stores/container-contents/remoteWriteGuards.js.map +0 -1
- package/stores/container-contents/remoteWriteQueue.js +0 -51
- package/stores/container-contents/remoteWriteQueue.js.map +0 -1
- package/stores/container-contents/reportShareFailure.js +0 -44
- package/stores/container-contents/reportShareFailure.js.map +0 -1
- package/stores/container-contents/setContainerIconOperation.js +0 -47
- package/stores/container-contents/setContainerIconOperation.js.map +0 -1
- package/stores/container-contents/shareOperations.js +0 -90
- package/stores/container-contents/shareOperations.js.map +0 -1
- package/stores/container-contents/startupHydration.js +0 -110
- package/stores/container-contents/startupHydration.js.map +0 -1
- package/stores/container-contents/syncAgent.d.ts +0 -8
- package/stores/container-contents/syncAgent.js +0 -241
- package/stores/container-contents/syncAgent.js.map +0 -1
- package/stores/container-contents/syncAgentTypes.d.ts +0 -81
- package/stores/container-contents/syncAgentTypes.js.map +0 -1
- package/stores/container-contents/syncLaneIteration.js +0 -237
- package/stores/container-contents/syncLaneIteration.js.map +0 -1
- package/stores/container-contents/systemContainerHydration.js +0 -30
- package/stores/container-contents/systemContainerHydration.js.map +0 -1
- package/stores/container-contents/systemContainerIcon.js +0 -42
- package/stores/container-contents/systemContainerIcon.js.map +0 -1
- package/stores/container-contents/systemContainerLookup.js.map +0 -1
- package/stores/container-contents/systemContainerPostCreate.js +0 -109
- package/stores/container-contents/systemContainerPostCreate.js.map +0 -1
- package/stores/container-contents/systemContainerPromotion.js +0 -49
- package/stores/container-contents/systemContainerPromotion.js.map +0 -1
- package/stores/container-contents/writeGeneration.js.map +0 -1
- package/stores/documents/documentStore/attachmentDetachState.js +0 -54
- package/stores/documents/documentStore/attachmentDetachState.js.map +0 -1
- package/stores/documents/documentStore/attachmentHydration.js +0 -90
- package/stores/documents/documentStore/attachmentHydration.js.map +0 -1
- package/stores/documents/documentStore/attachmentHydrationCommit.js +0 -53
- package/stores/documents/documentStore/attachmentHydrationCommit.js.map +0 -1
- package/stores/documents/documentStore/attachmentIntents.js +0 -39
- package/stores/documents/documentStore/attachmentIntents.js.map +0 -1
- package/stores/documents/documentStore/attachmentMutationPersistence.js +0 -37
- package/stores/documents/documentStore/attachmentMutationPersistence.js.map +0 -1
- package/stores/documents/documentStore/attachmentPersistFollowup.js.map +0 -1
- package/stores/documents/documentStore/attachmentPersistence.js +0 -106
- package/stores/documents/documentStore/attachmentPersistence.js.map +0 -1
- package/stores/documents/documentStore/attachmentRemoval.js +0 -136
- package/stores/documents/documentStore/attachmentRemoval.js.map +0 -1
- package/stores/documents/documentStore/attachmentSnapshot.js.map +0 -1
- package/stores/documents/documentStore/attachmentSourceUpload.js +0 -39
- package/stores/documents/documentStore/attachmentSourceUpload.js.map +0 -1
- package/stores/documents/documentStore/attachmentStaging.js +0 -84
- package/stores/documents/documentStore/attachmentStaging.js.map +0 -1
- package/stores/documents/documentStore/attachmentUploadAttempt.js +0 -97
- package/stores/documents/documentStore/attachmentUploadAttempt.js.map +0 -1
- package/stores/documents/documentStore/attachmentUploadLane.js +0 -49
- package/stores/documents/documentStore/attachmentUploadLane.js.map +0 -1
- package/stores/documents/documentStore/attachmentUploadResume.js +0 -95
- package/stores/documents/documentStore/attachmentUploadResume.js.map +0 -1
- package/stores/documents/documentStore/attachmentWriteGeneration.js +0 -32
- package/stores/documents/documentStore/attachmentWriteGeneration.js.map +0 -1
- package/stores/documents/documentStore/attachments.js +0 -241
- package/stores/documents/documentStore/attachments.js.map +0 -1
- package/stores/documents/documentStore/deferredInitialUpdate.js +0 -116
- package/stores/documents/documentStore/deferredInitialUpdate.js.map +0 -1
- package/stores/documents/documentStore/documentHistoryCompaction.js +0 -67
- package/stores/documents/documentStore/documentHistoryCompaction.js.map +0 -1
- package/stores/documents/documentStore/durableDocumentReload.js +0 -79
- package/stores/documents/documentStore/durableDocumentReload.js.map +0 -1
- package/stores/documents/documentStore/historyRebuild.js +0 -75
- package/stores/documents/documentStore/historyRebuild.js.map +0 -1
- package/stores/documents/documentStore/initialization.js +0 -330
- package/stores/documents/documentStore/initialization.js.map +0 -1
- package/stores/documents/documentStore/initializationAttachments.js +0 -9
- package/stores/documents/documentStore/initializationAttachments.js.map +0 -1
- package/stores/documents/documentStore/initializationHistory.js +0 -33
- package/stores/documents/documentStore/initializationHistory.js.map +0 -1
- package/stores/documents/documentStore/initializationRecovery.js +0 -107
- package/stores/documents/documentStore/initializationRecovery.js.map +0 -1
- package/stores/documents/documentStore/pullContinuationInvalidation.js +0 -61
- package/stores/documents/documentStore/pullContinuationInvalidation.js.map +0 -1
- package/stores/documents/documentStore/remoteRevalidationTelemetry.js +0 -15
- package/stores/documents/documentStore/remoteRevalidationTelemetry.js.map +0 -1
- package/stores/documents/documentStore/remoteWork.js.map +0 -1
- package/stores/documents/documentStore/rotation.js +0 -307
- package/stores/documents/documentStore/rotation.js.map +0 -1
- package/stores/documents/documentStore/rotationProvenance.js +0 -52
- package/stores/documents/documentStore/rotationProvenance.js.map +0 -1
- package/stores/documents/documentStore/rotationSettlement.js +0 -222
- package/stores/documents/documentStore/rotationSettlement.js.map +0 -1
- package/stores/documents/documentStore/sync.js +0 -299
- package/stores/documents/documentStore/sync.js.map +0 -1
- package/stores/documents/documentStore/syncAcceptedUpdateIds.js.map +0 -1
- package/stores/documents/documentStore/syncAttachmentSettlement.js +0 -72
- package/stores/documents/documentStore/syncAttachmentSettlement.js.map +0 -1
- package/stores/documents/documentStore/syncAttachments.js +0 -323
- package/stores/documents/documentStore/syncAttachments.js.map +0 -1
- package/stores/documents/documentStore/syncDetachedAttachments.js +0 -129
- package/stores/documents/documentStore/syncDetachedAttachments.js.map +0 -1
- package/stores/documents/documentStore/syncFinalize.js +0 -204
- package/stores/documents/documentStore/syncFinalize.js.map +0 -1
- package/stores/documents/documentStore/syncGeneration.js.map +0 -1
- package/stores/documents/documentStore/syncOutgoingCoverage.js +0 -96
- package/stores/documents/documentStore/syncOutgoingCoverage.js.map +0 -1
- package/stores/documents/documentStore/syncRemoteSignals.js +0 -67
- package/stores/documents/documentStore/syncRemoteSignals.js.map +0 -1
- package/stores/documents/documentStore/syncRequest.js +0 -157
- package/stores/documents/documentStore/syncRequest.js.map +0 -1
- package/stores/documents/documentStore/syncShared.js +0 -211
- package/stores/documents/documentStore/syncShared.js.map +0 -1
- package/stores/documents/documentStore/syncUpdateImport.js +0 -62
- package/stores/documents/documentStore/syncUpdateImport.js.map +0 -1
- package/stores/documents/documentStore/versionCoverage.js +0 -45
- package/stores/documents/documentStore.d.ts +0 -8
- package/stores/documents/documentStore.js +0 -215
- package/stores/documents/documentStore.js.map +0 -1
- package/workflows/container-contents/container-state/createAdoption.js +0 -193
- package/workflows/container-contents/container-state/createAdoption.js.map +0 -1
- package/workflows/container-contents/container-state/createChild.js +0 -217
- package/workflows/container-contents/container-state/createChild.js.map +0 -1
- package/workflows/container-contents/container-state/createIntentDepth.js +0 -36
- package/workflows/container-contents/container-state/createIntentDepth.js.map +0 -1
- package/workflows/container-contents/container-state/createIntentSettlement.js.map +0 -1
- package/workflows/container-contents/container-state/createIntentSync.js +0 -354
- package/workflows/container-contents/container-state/createIntentSync.js.map +0 -1
- package/workflows/container-contents/container-state/createTerminalFailure.js +0 -19
- package/workflows/container-contents/container-state/createTerminalFailure.js.map +0 -1
- package/workflows/container-contents/container-state/createWithMetadata.js +0 -270
- package/workflows/container-contents/container-state/createWithMetadata.js.map +0 -1
- package/workflows/container-contents/container-state/createWithMetadataPlan.js +0 -68
- package/workflows/container-contents/container-state/createWithMetadataPlan.js.map +0 -1
- package/workflows/container-contents/container-state/groupGrantVerification.js +0 -71
- package/workflows/container-contents/container-state/groupGrantVerification.js.map +0 -1
- package/workflows/container-contents/container-state/groupShareEpoch.js +0 -16
- package/workflows/container-contents/container-state/groupShareEpoch.js.map +0 -1
- package/workflows/container-contents/container-state/localPurgeScope.js +0 -49
- package/workflows/container-contents/container-state/localPurgeScope.js.map +0 -1
- package/workflows/container-contents/container-state/purgeTree.js +0 -298
- package/workflows/container-contents/container-state/purgeTree.js.map +0 -1
- package/workflows/container-contents/container-state/purgeTreeCollection.js.map +0 -1
- package/workflows/container-contents/container-state/purgeTreeContainerDeletion.js +0 -75
- package/workflows/container-contents/container-state/purgeTreeContainerDeletion.js.map +0 -1
- package/workflows/container-contents/container-state/purgeTreeScope.js +0 -175
- package/workflows/container-contents/container-state/purgeTreeScope.js.map +0 -1
- package/workflows/container-contents/container-state/readLocalPurgeScope.js +0 -18
- package/workflows/container-contents/container-state/readLocalPurgeScope.js.map +0 -1
- package/workflows/container-contents/container-state/share.js +0 -283
- package/workflows/container-contents/container-state/share.js.map +0 -1
- package/workflows/container-contents/container-state/sharePersistence.js +0 -136
- package/workflows/container-contents/container-state/sharePersistence.js.map +0 -1
- package/workflows/container-contents/remoteHydration/childIndex.js.map +0 -1
- package/workflows/container-contents/remoteHydration/containerStateFingerprint.js.map +0 -1
- package/workflows/container-contents/remoteHydration/destinationPrefetch.js.map +0 -1
- package/workflows/container-contents/remoteHydration/destinationRoleCache.js.map +0 -1
- package/workflows/container-contents/remoteHydration/destinationRootReload.js +0 -10
- package/workflows/container-contents/remoteHydration/destinationRootReload.js.map +0 -1
- package/workflows/container-contents/remoteHydration/insertRemoteContainer.js +0 -135
- package/workflows/container-contents/remoteHydration/insertRemoteContainer.js.map +0 -1
- package/workflows/container-contents/remoteHydration/laneFetchMarkers.js +0 -21
- package/workflows/container-contents/remoteHydration/laneFetchMarkers.js.map +0 -1
- package/workflows/container-contents/remoteHydration/parentLaneFetch.js +0 -61
- package/workflows/container-contents/remoteHydration/parentLaneFetch.js.map +0 -1
- package/workflows/container-contents/remoteHydration/parentLaneQueue.js.map +0 -1
- package/workflows/container-contents/remoteHydration/remoteContainerPageHydration.js +0 -244
- package/workflows/container-contents/remoteHydration/remoteContainerPageHydration.js.map +0 -1
- package/workflows/container-contents/remoteHydration/remoteContainerState.js +0 -263
- package/workflows/container-contents/remoteHydration/remoteContainerState.js.map +0 -1
- package/workflows/container-contents/remoteHydration/remoteContainerTimestamps.js.map +0 -1
- package/workflows/container-contents/remoteHydration/replacementBinding.js +0 -75
- package/workflows/container-contents/remoteHydration/replacementBinding.js.map +0 -1
- package/workflows/container-contents/remoteHydration/verifiedDestination.js +0 -296
- package/workflows/container-contents/remoteHydration/verifiedDestination.js.map +0 -1
- package/workflows/containers/child/carriedDescendantRekeys.js +0 -126
- package/workflows/containers/child/carriedDescendantRekeys.js.map +0 -1
- package/workflows/containers/child/create.d.ts +0 -24
- package/workflows/containers/child/create.js +0 -335
- package/workflows/containers/child/create.js.map +0 -1
- package/workflows/containers/child/createProjection.d.ts +0 -6
- package/workflows/containers/child/createProjection.js +0 -43
- package/workflows/containers/child/createProjection.js.map +0 -1
- package/workflows/containers/child/createSubmission.d.ts +0 -56
- package/workflows/containers/child/createSubmission.js +0 -43
- package/workflows/containers/child/createSubmission.js.map +0 -1
- package/workflows/containers/child/currentShareGrantMutation.js +0 -82
- package/workflows/containers/child/currentShareGrantMutation.js.map +0 -1
- package/workflows/containers/child/currentSharePrincipalPolicy.js +0 -83
- package/workflows/containers/child/currentSharePrincipalPolicy.js.map +0 -1
- package/workflows/containers/child/keyringOverrideLineage.d.ts +0 -22
- package/workflows/containers/child/keyringOverrideLineage.js +0 -39
- package/workflows/containers/child/move.d.ts +0 -23
- package/workflows/containers/child/move.js +0 -268
- package/workflows/containers/child/move.js.map +0 -1
- package/workflows/containers/child/moveArtifacts.js +0 -102
- package/workflows/containers/child/moveArtifacts.js.map +0 -1
- package/workflows/containers/child/moveRotation.js +0 -88
- package/workflows/containers/child/moveRotation.js.map +0 -1
- package/workflows/containers/child/moveWraps.js +0 -49
- package/workflows/containers/child/moveWraps.js.map +0 -1
- package/workflows/containers/child/rekey.d.ts +0 -32
- package/workflows/containers/child/rekey.js +0 -227
- package/workflows/containers/child/rekey.js.map +0 -1
- package/workflows/containers/child/rekeyProjection.d.ts +0 -46
- package/workflows/containers/child/rekeyProjection.js +0 -151
- package/workflows/containers/child/rekeyProjection.js.map +0 -1
- package/workflows/containers/child/rekeyRemote.d.ts +0 -24
- package/workflows/containers/child/rekeyRemote.js +0 -64
- package/workflows/containers/child/rekeyRemote.js.map +0 -1
- package/workflows/containers/child/replacementPrincipalPolicyReferences.js +0 -19
- package/workflows/containers/child/replacementPrincipalPolicyReferences.js.map +0 -1
- package/workflows/containers/child/rotationContext.js +0 -64
- package/workflows/containers/child/rotationContext.js.map +0 -1
- package/workflows/containers/child/rotationPrincipalPolicies.js +0 -19
- package/workflows/containers/child/rotationPrincipalPolicies.js.map +0 -1
- package/workflows/containers/child/rotationWraps.js +0 -85
- package/workflows/containers/child/rotationWraps.js.map +0 -1
- package/workflows/containers/child/runtimeCurrentGroupShare.js +0 -79
- package/workflows/containers/child/runtimeCurrentGroupShare.js.map +0 -1
- package/workflows/containers/child/share.d.ts +0 -65
- package/workflows/containers/child/share.js +0 -256
- package/workflows/containers/child/share.js.map +0 -1
- package/workflows/containers/child/shareAncestorRepair.js +0 -95
- package/workflows/containers/child/shareAncestorRepair.js.map +0 -1
- package/workflows/containers/child/shareMaterialization.d.ts +0 -25
- package/workflows/containers/child/shareMaterialization.js +0 -164
- package/workflows/containers/child/shareMaterialization.js.map +0 -1
- package/workflows/containers/child/sharePlanCore.d.ts +0 -82
- package/workflows/containers/child/sharePlanCore.js +0 -191
- package/workflows/containers/child/sharePlanCore.js.map +0 -1
- package/workflows/containers/child/sharePrincipalPolicy.d.ts +0 -51
- package/workflows/containers/child/sharePrincipalPolicy.js +0 -194
- package/workflows/containers/child/sharePrincipalPolicy.js.map +0 -1
- package/workflows/containers/child/shareProjection.js.map +0 -1
- /package/data/documents/shared/{containerKekCurrency.js → containerKek/containerKekCurrency.js} +0 -0
- /package/data/documents/shared/{containerKekCurrency.js.map → containerKek/containerKekCurrency.js.map} +0 -0
- /package/data/documents/shared/{containerKekEntryVerification.js.map → containerKek/containerKekEntryVerification.js.map} +0 -0
- /package/data/documents/shared/{containerKekLogFetch.js.map → containerKek/containerKekLogFetch.js.map} +0 -0
- /package/data/documents/shared/{containerKekPath.d.ts → containerKek/containerKekPath.d.ts} +0 -0
- /package/data/documents/shared/{keyringLogWalk.js.map → containerKek/keyringLogWalk.js.map} +0 -0
- /package/data/documents/shared/{pullContinuation.d.ts → sync/pullContinuation.d.ts} +0 -0
- /package/data/documents/shared/{pullContinuation.js.map → sync/pullContinuation.js.map} +0 -0
- /package/data/documents/shared/{syncSubmitFailure.js → sync/syncSubmitFailure.js} +0 -0
- /package/data/documents/shared/{syncSubmitFailure.js.map → sync/syncSubmitFailure.js.map} +0 -0
- /package/data/keyingProjectionVerification/{containerCreateManifest.js.map → container/containerCreateManifest.js.map} +0 -0
- /package/data/keyingProjectionVerification/{documentContainerProjections.js → document/documentContainerProjections.js} +0 -0
- /package/data/keyingProjectionVerification/{documentContainerProjections.js.map → document/documentContainerProjections.js.map} +0 -0
- /package/data/keyingProjectionVerification/{documentManifestPredecessor.js.map → document/documentManifestPredecessor.js.map} +0 -0
- /package/data/persistence/{keyingCheckpointEvidence.js.map → keyingCheckpoints/keyingCheckpointEvidence.js.map} +0 -0
- /package/data/persistence/{storedPrincipalPolicyBundle.js → principalPolicy/storedPrincipalPolicyBundle.js} +0 -0
- /package/data/persistence/{storedPrincipalPolicyBundle.js.map → principalPolicy/storedPrincipalPolicyBundle.js.map} +0 -0
- /package/data/sqlite/{documentPersistenceTypes.js → documentPersistence/documentPersistenceTypes.js} +0 -0
- /package/data/sqlite/{containerDocumentTombstoneHoldSchema.d.ts → schema/containerDocumentTombstoneHoldSchema.d.ts} +0 -0
- /package/data/sqlite/{containerDocumentTombstoneHoldSchema.js → schema/containerDocumentTombstoneHoldSchema.js} +0 -0
- /package/data/sqlite/{containerDocumentTombstoneHoldSchema.js.map → schema/containerDocumentTombstoneHoldSchema.js.map} +0 -0
- /package/data/sqlite/{documentAttachmentSchema.d.ts → schema/documentAttachmentSchema.d.ts} +0 -0
- /package/data/sqlite/{documentAttachmentSchema.js → schema/documentAttachmentSchema.js} +0 -0
- /package/data/sqlite/{documentAttachmentSchema.js.map → schema/documentAttachmentSchema.js.map} +0 -0
- /package/data/sqlite/{documentDiscoveryEvidenceSchema.js → schema/documentDiscoveryEvidenceSchema.js} +0 -0
- /package/data/sqlite/{documentDiscoveryEvidenceSchema.js.map → schema/documentDiscoveryEvidenceSchema.js.map} +0 -0
- /package/data/sqlite/{documentPlacementIntentSchema.js → schema/documentPlacementIntentSchema.js} +0 -0
- /package/data/sqlite/{documentPlacementIntentSchema.js.map → schema/documentPlacementIntentSchema.js.map} +0 -0
- /package/data/sqlite/{localIntentSchema.d.ts → schema/localIntentSchema.d.ts} +0 -0
- /package/data/sqlite/{localIntentSchema.js → schema/localIntentSchema.js} +0 -0
- /package/data/sqlite/{localIntentSchema.js.map → schema/localIntentSchema.js.map} +0 -0
- /package/data/sqlite/{organizationFounderSchema.js → schema/organizationFounderSchema.js} +0 -0
- /package/data/sqlite/{organizationFounderSchema.js.map → schema/organizationFounderSchema.js.map} +0 -0
- /package/data/sqlite/{organizationReadModelSchema.js → schema/organizationReadModelSchema.js} +0 -0
- /package/data/sqlite/{organizationReadModelSchema.js.map → schema/organizationReadModelSchema.js.map} +0 -0
- /package/data/sqlite/{principalGrantRetirementSchema.js → schema/principalGrantRetirementSchema.js} +0 -0
- /package/data/sqlite/{principalGrantRetirementSchema.js.map → schema/principalGrantRetirementSchema.js.map} +0 -0
- /package/data/sqlite/{principalPolicySchema.d.ts → schema/principalPolicySchema.d.ts} +0 -0
- /package/stores/container-contents/{containerStateMap.js → containerState/containerStateMap.js} +0 -0
- /package/stores/container-contents/{missingSyncedContainerState.js → containerState/missingSyncedContainerState.js} +0 -0
- /package/stores/container-contents/{reconcilableContainer.js → containerState/reconcilableContainer.js} +0 -0
- /package/stores/container-contents/{remoteHydrationRefresh.js → hydration/remoteHydrationRefresh.js} +0 -0
- /package/stores/container-contents/{remoteHydrationRefresh.js.map → hydration/remoteHydrationRefresh.js.map} +0 -0
- /package/stores/container-contents/{emptyTrashOperation.js → operations/emptyTrashOperation.js} +0 -0
- /package/stores/container-contents/{purgeContainerOperation.js → operations/purgeContainerOperation.js} +0 -0
- /package/stores/container-contents/{remoteBackedContainerState.js → remoteEvents/remoteBackedContainerState.js} +0 -0
- /package/stores/container-contents/{writeGeneration.js → remoteWrites/writeGeneration.js} +0 -0
- /package/stores/container-contents/{syncAgentTypes.js → syncAgent/syncAgentTypes.js} +0 -0
- /package/stores/container-contents/{systemContainerLookup.js → systemContainers/systemContainerLookup.js} +0 -0
- /package/stores/documents/documentStore/{attachmentPersistFollowup.js → attachments/attachmentPersistFollowup.js} +0 -0
- /package/stores/documents/documentStore/{attachmentSnapshot.js → attachments/attachmentSnapshot.js} +0 -0
- /package/stores/documents/documentStore/{remoteWork.js → sync/remoteWork.js} +0 -0
- /package/stores/documents/documentStore/{syncAcceptedUpdateIds.js → sync/syncAcceptedUpdateIds.js} +0 -0
- /package/stores/documents/documentStore/{syncGeneration.js → sync/syncGeneration.js} +0 -0
- /package/stores/documents/documentStore/{versionCoverage.js.map → sync/versionCoverage.js.map} +0 -0
- /package/workflows/container-contents/container-state/{createIntentSettlement.js → create/createIntentSettlement.js} +0 -0
- /package/workflows/container-contents/container-state/{purgeProgress.d.ts → purge/purgeProgress.d.ts} +0 -0
- /package/workflows/container-contents/container-state/{purgeProgress.js → purge/purgeProgress.js} +0 -0
- /package/workflows/container-contents/container-state/{purgeProgress.js.map → purge/purgeProgress.js.map} +0 -0
- /package/workflows/container-contents/container-state/{purgeTreeCollection.js → purge/purgeTreeCollection.js} +0 -0
- /package/workflows/container-contents/remoteHydration/{destinationPrefetch.js → destination/destinationPrefetch.js} +0 -0
- /package/workflows/container-contents/remoteHydration/{destinationRoleCache.js → destination/destinationRoleCache.js} +0 -0
- /package/workflows/container-contents/remoteHydration/{childIndex.js → lanes/childIndex.js} +0 -0
- /package/workflows/container-contents/remoteHydration/{parentLaneQueue.js → lanes/parentLaneQueue.js} +0 -0
- /package/workflows/container-contents/remoteHydration/{containerStateFingerprint.js → remoteContainers/containerStateFingerprint.js} +0 -0
- /package/workflows/container-contents/remoteHydration/{remoteContainerTimestamps.js → remoteContainers/remoteContainerTimestamps.js} +0 -0
- /package/workflows/containers/child/{keyringOverrideLineage.js.map → rekey/keyringOverrideLineage.js.map} +0 -0
- /package/workflows/containers/child/{shareProjection.js → share/shareProjection.js} +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type SqlTableSchema } from "../sqlTableSchema.js";
|
|
2
|
+
/**
|
|
3
|
+
* Access-manifest bundles this device verified inside a writer projection,
|
|
4
|
+
* keyed by manifest hash. A later projection read cites them so the API can
|
|
5
|
+
* omit their bytes; the client refills each omission from this row and
|
|
6
|
+
* verifies the rebuilt projection from scratch. Rows are neither trust nor
|
|
7
|
+
* checkpoint state: a missing, evicted, or damaged row only costs bytes.
|
|
8
|
+
*
|
|
9
|
+
* Columns:
|
|
10
|
+
* - `manifestHash`: Manifest hash; equals the stored bundle's `manifestHash`.
|
|
11
|
+
* - `organizationId`, `objectKind`, `objectId`, `epoch`: The verified
|
|
12
|
+
* manifest's object, used to cite the lineage relevant to a request.
|
|
13
|
+
* - `bundleJson`: The exact verified bundle as JSON.
|
|
14
|
+
* - `bundleDigest`: SHA-256 hex of `bundleJson`; a mismatch drops the row.
|
|
15
|
+
* - `verifiedAt`: Latest local verification time; oldest rows evict first.
|
|
16
|
+
*/
|
|
17
|
+
export declare const verifiedAccessManifestBundles: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
18
|
+
name: "verified_access_manifest_bundles";
|
|
19
|
+
schema: undefined;
|
|
20
|
+
columns: {
|
|
21
|
+
manifestHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
22
|
+
name: "manifest_hash";
|
|
23
|
+
tableName: "verified_access_manifest_bundles";
|
|
24
|
+
dataType: "string";
|
|
25
|
+
columnType: "SQLiteText";
|
|
26
|
+
data: string;
|
|
27
|
+
driverParam: string;
|
|
28
|
+
notNull: true;
|
|
29
|
+
hasDefault: false;
|
|
30
|
+
isPrimaryKey: true;
|
|
31
|
+
isAutoincrement: false;
|
|
32
|
+
hasRuntimeDefault: false;
|
|
33
|
+
enumValues: [string, ...string[]];
|
|
34
|
+
baseColumn: never;
|
|
35
|
+
identity: undefined;
|
|
36
|
+
generated: undefined;
|
|
37
|
+
}, {}, {
|
|
38
|
+
length: number | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
41
|
+
name: "organization_id";
|
|
42
|
+
tableName: "verified_access_manifest_bundles";
|
|
43
|
+
dataType: "string";
|
|
44
|
+
columnType: "SQLiteText";
|
|
45
|
+
data: string;
|
|
46
|
+
driverParam: string;
|
|
47
|
+
notNull: true;
|
|
48
|
+
hasDefault: false;
|
|
49
|
+
isPrimaryKey: false;
|
|
50
|
+
isAutoincrement: false;
|
|
51
|
+
hasRuntimeDefault: false;
|
|
52
|
+
enumValues: [string, ...string[]];
|
|
53
|
+
baseColumn: never;
|
|
54
|
+
identity: undefined;
|
|
55
|
+
generated: undefined;
|
|
56
|
+
}, {}, {
|
|
57
|
+
length: number | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
objectKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
60
|
+
name: "object_kind";
|
|
61
|
+
tableName: "verified_access_manifest_bundles";
|
|
62
|
+
dataType: "string";
|
|
63
|
+
columnType: "SQLiteText";
|
|
64
|
+
data: string;
|
|
65
|
+
driverParam: string;
|
|
66
|
+
notNull: true;
|
|
67
|
+
hasDefault: false;
|
|
68
|
+
isPrimaryKey: false;
|
|
69
|
+
isAutoincrement: false;
|
|
70
|
+
hasRuntimeDefault: false;
|
|
71
|
+
enumValues: [string, ...string[]];
|
|
72
|
+
baseColumn: never;
|
|
73
|
+
identity: undefined;
|
|
74
|
+
generated: undefined;
|
|
75
|
+
}, {}, {
|
|
76
|
+
length: number | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
objectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
79
|
+
name: "object_id";
|
|
80
|
+
tableName: "verified_access_manifest_bundles";
|
|
81
|
+
dataType: "string";
|
|
82
|
+
columnType: "SQLiteText";
|
|
83
|
+
data: string;
|
|
84
|
+
driverParam: string;
|
|
85
|
+
notNull: true;
|
|
86
|
+
hasDefault: false;
|
|
87
|
+
isPrimaryKey: false;
|
|
88
|
+
isAutoincrement: false;
|
|
89
|
+
hasRuntimeDefault: false;
|
|
90
|
+
enumValues: [string, ...string[]];
|
|
91
|
+
baseColumn: never;
|
|
92
|
+
identity: undefined;
|
|
93
|
+
generated: undefined;
|
|
94
|
+
}, {}, {
|
|
95
|
+
length: number | undefined;
|
|
96
|
+
}>;
|
|
97
|
+
epoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
98
|
+
name: "epoch";
|
|
99
|
+
tableName: "verified_access_manifest_bundles";
|
|
100
|
+
dataType: "number";
|
|
101
|
+
columnType: "SQLiteInteger";
|
|
102
|
+
data: number;
|
|
103
|
+
driverParam: number;
|
|
104
|
+
notNull: true;
|
|
105
|
+
hasDefault: false;
|
|
106
|
+
isPrimaryKey: false;
|
|
107
|
+
isAutoincrement: false;
|
|
108
|
+
hasRuntimeDefault: false;
|
|
109
|
+
enumValues: undefined;
|
|
110
|
+
baseColumn: never;
|
|
111
|
+
identity: undefined;
|
|
112
|
+
generated: undefined;
|
|
113
|
+
}, {}, {}>;
|
|
114
|
+
bundleJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
115
|
+
name: "bundle_json";
|
|
116
|
+
tableName: "verified_access_manifest_bundles";
|
|
117
|
+
dataType: "string";
|
|
118
|
+
columnType: "SQLiteText";
|
|
119
|
+
data: string;
|
|
120
|
+
driverParam: string;
|
|
121
|
+
notNull: true;
|
|
122
|
+
hasDefault: false;
|
|
123
|
+
isPrimaryKey: false;
|
|
124
|
+
isAutoincrement: false;
|
|
125
|
+
hasRuntimeDefault: false;
|
|
126
|
+
enumValues: [string, ...string[]];
|
|
127
|
+
baseColumn: never;
|
|
128
|
+
identity: undefined;
|
|
129
|
+
generated: undefined;
|
|
130
|
+
}, {}, {
|
|
131
|
+
length: number | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
bundleDigest: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
134
|
+
name: "bundle_digest";
|
|
135
|
+
tableName: "verified_access_manifest_bundles";
|
|
136
|
+
dataType: "string";
|
|
137
|
+
columnType: "SQLiteText";
|
|
138
|
+
data: string;
|
|
139
|
+
driverParam: string;
|
|
140
|
+
notNull: true;
|
|
141
|
+
hasDefault: false;
|
|
142
|
+
isPrimaryKey: false;
|
|
143
|
+
isAutoincrement: false;
|
|
144
|
+
hasRuntimeDefault: false;
|
|
145
|
+
enumValues: [string, ...string[]];
|
|
146
|
+
baseColumn: never;
|
|
147
|
+
identity: undefined;
|
|
148
|
+
generated: undefined;
|
|
149
|
+
}, {}, {
|
|
150
|
+
length: number | undefined;
|
|
151
|
+
}>;
|
|
152
|
+
verifiedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
153
|
+
name: "verified_at";
|
|
154
|
+
tableName: "verified_access_manifest_bundles";
|
|
155
|
+
dataType: "string";
|
|
156
|
+
columnType: "SQLiteText";
|
|
157
|
+
data: string;
|
|
158
|
+
driverParam: string;
|
|
159
|
+
notNull: true;
|
|
160
|
+
hasDefault: false;
|
|
161
|
+
isPrimaryKey: false;
|
|
162
|
+
isAutoincrement: false;
|
|
163
|
+
hasRuntimeDefault: false;
|
|
164
|
+
enumValues: [string, ...string[]];
|
|
165
|
+
baseColumn: never;
|
|
166
|
+
identity: undefined;
|
|
167
|
+
generated: undefined;
|
|
168
|
+
}, {}, {
|
|
169
|
+
length: number | undefined;
|
|
170
|
+
}>;
|
|
171
|
+
};
|
|
172
|
+
dialect: "sqlite";
|
|
173
|
+
}>;
|
|
174
|
+
export declare const verifiedManifestBundleTables: ReadonlyArray<SqlTableSchema>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { desc } from "drizzle-orm";
|
|
2
|
+
import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
3
|
+
import { defineSqlTableSchema } from "../sqlTableSchema.js";
|
|
4
|
+
/**
|
|
5
|
+
* Access-manifest bundles this device verified inside a writer projection,
|
|
6
|
+
* keyed by manifest hash. A later projection read cites them so the API can
|
|
7
|
+
* omit their bytes; the client refills each omission from this row and
|
|
8
|
+
* verifies the rebuilt projection from scratch. Rows are neither trust nor
|
|
9
|
+
* checkpoint state: a missing, evicted, or damaged row only costs bytes.
|
|
10
|
+
*
|
|
11
|
+
* Columns:
|
|
12
|
+
* - `manifestHash`: Manifest hash; equals the stored bundle's `manifestHash`.
|
|
13
|
+
* - `organizationId`, `objectKind`, `objectId`, `epoch`: The verified
|
|
14
|
+
* manifest's object, used to cite the lineage relevant to a request.
|
|
15
|
+
* - `bundleJson`: The exact verified bundle as JSON.
|
|
16
|
+
* - `bundleDigest`: SHA-256 hex of `bundleJson`; a mismatch drops the row.
|
|
17
|
+
* - `verifiedAt`: Latest local verification time; oldest rows evict first.
|
|
18
|
+
*/
|
|
19
|
+
export const verifiedAccessManifestBundles = sqliteTable("verified_access_manifest_bundles", {
|
|
20
|
+
manifestHash: text("manifest_hash").primaryKey(),
|
|
21
|
+
organizationId: text("organization_id").notNull(),
|
|
22
|
+
objectKind: text("object_kind").notNull(),
|
|
23
|
+
objectId: text("object_id").notNull(),
|
|
24
|
+
epoch: integer("epoch").notNull(),
|
|
25
|
+
bundleJson: text("bundle_json").notNull(),
|
|
26
|
+
bundleDigest: text("bundle_digest").notNull(),
|
|
27
|
+
verifiedAt: text("verified_at").notNull(),
|
|
28
|
+
}, (table) => [
|
|
29
|
+
index("verified_access_manifest_bundles_object_idx").on(table.objectKind, table.objectId, desc(table.epoch)),
|
|
30
|
+
index("verified_access_manifest_bundles_verified_at_idx").on(table.verifiedAt),
|
|
31
|
+
index("verified_access_manifest_bundles_organization_idx").on(table.organizationId),
|
|
32
|
+
]);
|
|
33
|
+
export const verifiedManifestBundleTables = [
|
|
34
|
+
defineSqlTableSchema(verifiedAccessManifestBundles),
|
|
35
|
+
];
|
|
36
|
+
//# sourceMappingURL=verifiedManifestBundleSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifiedManifestBundleSchema.js","sourceRoot":"","sources":["verifiedManifestBundleSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAuB,MAAM,mBAAmB,CAAC;AAE9E;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,WAAW,CACtD,kCAAkC,EAClC;IACE,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,UAAU,EAAE;IAChD,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE;IACjD,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE;IACrC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE;IACjC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;IAC7C,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;CAC1C,EACD,CAAC,KAAK,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,6CAA6C,CAAC,CAAC,EAAE,CACrD,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,QAAQ,EACd,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAClB;IACD,KAAK,CAAC,kDAAkD,CAAC,CAAC,EAAE,CAC1D,KAAK,CAAC,UAAU,CACjB;IACD,KAAK,CAAC,mDAAmD,CAAC,CAAC,EAAE,CAC3D,KAAK,CAAC,cAAc,CACrB;CACF,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAkC;IACzE,oBAAoB,CAAC,6BAA6B,CAAC;CACpD,CAAC","sourcesContent":["import { desc } from \"drizzle-orm\";\nimport { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { defineSqlTableSchema, type SqlTableSchema } from \"../sqlTableSchema\";\n\n/**\n * Access-manifest bundles this device verified inside a writer projection,\n * keyed by manifest hash. A later projection read cites them so the API can\n * omit their bytes; the client refills each omission from this row and\n * verifies the rebuilt projection from scratch. Rows are neither trust nor\n * checkpoint state: a missing, evicted, or damaged row only costs bytes.\n *\n * Columns:\n * - `manifestHash`: Manifest hash; equals the stored bundle's `manifestHash`.\n * - `organizationId`, `objectKind`, `objectId`, `epoch`: The verified\n * manifest's object, used to cite the lineage relevant to a request.\n * - `bundleJson`: The exact verified bundle as JSON.\n * - `bundleDigest`: SHA-256 hex of `bundleJson`; a mismatch drops the row.\n * - `verifiedAt`: Latest local verification time; oldest rows evict first.\n */\nexport const verifiedAccessManifestBundles = sqliteTable(\n \"verified_access_manifest_bundles\",\n {\n manifestHash: text(\"manifest_hash\").primaryKey(),\n organizationId: text(\"organization_id\").notNull(),\n objectKind: text(\"object_kind\").notNull(),\n objectId: text(\"object_id\").notNull(),\n epoch: integer(\"epoch\").notNull(),\n bundleJson: text(\"bundle_json\").notNull(),\n bundleDigest: text(\"bundle_digest\").notNull(),\n verifiedAt: text(\"verified_at\").notNull(),\n },\n (table) => [\n index(\"verified_access_manifest_bundles_object_idx\").on(\n table.objectKind,\n table.objectId,\n desc(table.epoch),\n ),\n index(\"verified_access_manifest_bundles_verified_at_idx\").on(\n table.verifiedAt,\n ),\n index(\"verified_access_manifest_bundles_organization_idx\").on(\n table.organizationId,\n ),\n ],\n);\n\nexport const verifiedManifestBundleTables: ReadonlyArray<SqlTableSchema> = [\n defineSqlTableSchema(verifiedAccessManifestBundles),\n];\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SqliteRemoteDatabase } from "drizzle-orm/sqlite-proxy";
|
|
2
|
-
import { clientSQLiteSchema } from "./schema.js";
|
|
2
|
+
import { clientSQLiteSchema } from "./schema/index.js";
|
|
3
3
|
import { type ExecSql, type ExecSqlClientLike } from "./sqlSchema.js";
|
|
4
4
|
export type ClientSQLiteSchema = typeof clientSQLiteSchema;
|
|
5
5
|
export type ClientSQLiteDatabase = SqliteRemoteDatabase<ClientSQLiteSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { drizzle } from "drizzle-orm/sqlite-proxy";
|
|
2
|
-
import { clientSQLiteSchema } from "./schema.js";
|
|
2
|
+
import { clientSQLiteSchema } from "./schema/index.js";
|
|
3
3
|
import { assertClientSQLiteCommitAllowed, beginClientSQLiteCommitGuards, captureClientSQLiteCommitGuards, clearClientSQLiteCommitGuards, rethrowClientSQLiteCommitGuardFailure, } from "./sqliteCommitGuards.js";
|
|
4
4
|
import { createExecSql, resetConnectionSchemaMemo, resolveCanonicalExecSql, runSerializedSqlMutation, } from "./sqlSchema.js";
|
|
5
5
|
const runtimeByExecSql = new WeakMap();
|
package/package.json
CHANGED
package/sqlite/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export { createModuleDatabaseRuntime as createSQLiteRuntime } from "../internal/
|
|
|
12
12
|
export declare function createSQLiteRuntimeFromWorker(worker: SQLiteRuntimeWorker): SQLiteRuntime;
|
|
13
13
|
export { purgeOpfsSqliteDatabase } from "../internal/sqlite-worker/purgeOpfsDatabase.js";
|
|
14
14
|
export type { DatabasePersistenceMode } from "../internal/sqlite-worker/types.js";
|
|
15
|
-
export { clientSQLiteSchema } from "../data/sqlite/schema.js";
|
|
15
|
+
export { clientSQLiteSchema } from "../data/sqlite/schema/index.js";
|
|
16
16
|
export { type ClientSQLiteDatabase as SQLiteDatabase, type ClientSQLitePersistenceRuntime as SQLitePersistenceRuntime, type ClientSQLiteTransactionScope as SQLiteTransaction, getClientSQLitePersistenceRuntime as getSQLitePersistenceRuntime, } from "../data/sqlite/sqlitePersistenceRuntime.js";
|
|
17
17
|
export { createExecSql, defineSqlTableSchema, type ExecSql, type ExecSqlClientLike, ensureSqlTables, resetConnectionSchemaMemo, runSerializedSqlMutation, type SqlArrayRow, type SqlBind, type SqlRow, type SqlRowMode, type SqlRowValue, type SqlTableSchema, unavailableExecSql, } from "../data/sqlite/sqlSchema.js";
|
|
18
18
|
export { EPHEMERAL_STORAGE_POLICY, isPersistentStorageSupported, PERSISTENT_STORAGE_POLICY, type RequestPersistentStorageResult, requestPersistentStorage, resolveStoragePersistencePolicy, type StoragePersistencePolicy, } from "../data/sqlite/storagePersistence.js";
|
package/sqlite/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export function createSQLiteRuntimeFromWorker(worker) {
|
|
|
4
4
|
return createDatabaseRuntime(worker);
|
|
5
5
|
}
|
|
6
6
|
export { purgeOpfsSqliteDatabase } from "../internal/sqlite-worker/purgeOpfsDatabase.js";
|
|
7
|
-
export { clientSQLiteSchema } from "../data/sqlite/schema.js";
|
|
7
|
+
export { clientSQLiteSchema } from "../data/sqlite/schema/index.js";
|
|
8
8
|
export { getClientSQLitePersistenceRuntime as getSQLitePersistenceRuntime, } from "../data/sqlite/sqlitePersistenceRuntime.js";
|
|
9
9
|
export { createExecSql, defineSqlTableSchema, ensureSqlTables, resetConnectionSchemaMemo, runSerializedSqlMutation, unavailableExecSql, } from "../data/sqlite/sqlSchema.js";
|
|
10
10
|
export { EPHEMERAL_STORAGE_POLICY, isPersistentStorageSupported, PERSISTENT_STORAGE_POLICY, requestPersistentStorage, resolveStoragePersistencePolicy, } from "../data/sqlite/storagePersistence.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { refreshAllRemoteHydration, } from "./hydration/remoteHydrationRefresh.js";
|
|
1
2
|
import { getContainerContentsStoreLogLabel } from "./logLabel.js";
|
|
2
|
-
import { refreshAllRemoteHydration, } from "./remoteHydrationRefresh.js";
|
|
3
3
|
function createRestorationSweepSession(state, isCurrent) {
|
|
4
4
|
return {
|
|
5
5
|
isCurrent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessRestorationSweep.js","sourceRoot":"","sources":["accessRestorationSweep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAEL,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAgBlC,SAAS,6BAA6B,CACpC,KAAsC,EACtC,SAAwB;IAExB,OAAO;QACL,SAAS;QACT,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK;KACN,CAAC;AACJ,CAAC;AAED,SAAS,4BAA4B,CACnC,KAAsC;IAEtC,MAAM,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;IACtD,MAAM,oBAAoB,GAAG,KAAK,CAAC,oBAAoB,CAAC;IACxD,OAAO,GAAG,EAAE,CACV,KAAK,CAAC,mBAAmB,KAAK,mBAAmB;QACjD,KAAK,CAAC,oBAAoB,KAAK,oBAAoB,CAAC;AACxD,CAAC;AAED,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACnC,MAAM,kBAAkB,GAAG,EAAE,GAAG,MAAM,CAAC;AAEvC,SAAS,iBAAiB,CAAC,KAA2B,EAAE,GAAW;IACjE,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC1D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,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esContent":["import { getContainerContentsStoreLogLabel } from \"./logLabel\";\nimport {\n type RemoteHydrationRequester,\n refreshAllRemoteHydration,\n} from \"./remoteHydrationRefresh\";\nimport type { ContainerContentsStoreSyncState } from \"./syncAgentTypes\";\n\ntype DormantMetadataSweep = Awaited<\n ReturnType<\n ContainerContentsStoreSyncState[\"persistence\"][\"listDormantMetadataSweepRequests\"]\n >\n>[number];\n\ninterface RestorationSweepSession {\n isCurrent: () => boolean;\n persistence: ContainerContentsStoreSyncState[\"persistence\"];\n runtime: ContainerContentsStoreSyncState[\"runtime\"];\n state: ContainerContentsStoreSyncState;\n}\n\nfunction createRestorationSweepSession(\n state: ContainerContentsStoreSyncState,\n isCurrent: () => boolean,\n): RestorationSweepSession {\n return {\n isCurrent,\n persistence: state.persistence,\n runtime: state.runtime,\n state,\n };\n}\n\nfunction captureRestorationGeneration(\n state: ContainerContentsStoreSyncState,\n): () => boolean {\n const lifecycleGeneration = state.lifecycleGeneration;\n const structuralGeneration = state.structuralGeneration;\n return () =>\n state.lifecycleGeneration === lifecycleGeneration &&\n state.structuralGeneration === structuralGeneration;\n}\n\nconst SWEEP_ATTEMPT_LIMIT = 5;\nconst SWEEP_RETRY_BASE_MS = 60_000;\nconst SWEEP_RETRY_MAX_MS = 15 * 60_000;\n\nfunction isSweepAttemptDue(sweep: DormantMetadataSweep, now: number): boolean {\n if (!sweep.lastAttemptedAt) {\n return true;\n }\n const lastAttemptedAt = Date.parse(sweep.lastAttemptedAt);\n if (!Number.isFinite(lastAttemptedAt)) {\n return true;\n }\n const retryDelay = Math.min(\n SWEEP_RETRY_BASE_MS * 2 ** Math.max(0, sweep.attemptCount - 1),\n SWEEP_RETRY_MAX_MS,\n );\n return lastAttemptedAt + retryDelay <= now;\n}\n\nfunction restorationSweepIdentity(sweep: DormantMetadataSweep): string {\n return `${sweep.requesterUserId}\\u0000${sweep.organizationId}\\u0000${sweep.generation}`;\n}\n\n/** A completed crawl can restore verified objects; absence never authorizes data loss. */\nasync function completeRestorationSweeps(\n session: RestorationSweepSession,\n sweeps: readonly DormantMetadataSweep[],\n): Promise<void> {\n for (const sweep of sweeps) {\n if (!session.isCurrent()) return;\n // An unsigned 404 cannot prove that encrypted local edits are disposable.\n // Leave unavailable metadata dormant until verified rediscovery or explicit deletion.\n await session.persistence.completeDormantMetadataSweepRequest(\n session.runtime.infra.execSql,\n sweep,\n session.isCurrent,\n );\n }\n}\n\nasync function claimDueRestorationSweeps(\n session: RestorationSweepSession,\n sweeps: readonly DormantMetadataSweep[],\n forcedRetrySweepIds?: ReadonlySet<string> | undefined,\n): Promise<DormantMetadataSweep[]> {\n const now = Date.now();\n const attemptedAt = new Date(now).toISOString();\n const claimed: DormantMetadataSweep[] = [];\n for (const sweep of sweeps) {\n if (!session.isCurrent()) {\n return claimed;\n }\n if (forcedRetrySweepIds?.has(restorationSweepIdentity(sweep))) {\n // The interrupted generation already claimed and durably counted this\n // attempt. Resume that exact attempt after reset instead of consuming a\n // new one or retiring it at the limit before its completion ran.\n claimed.push(sweep);\n continue;\n }\n if (sweep.attemptCount >= SWEEP_ATTEMPT_LIMIT) {\n await session.persistence.completeDormantMetadataSweepRequest(\n session.runtime.infra.execSql,\n sweep,\n session.isCurrent,\n );\n if (!session.isCurrent()) {\n return claimed;\n }\n session.runtime.util.log(\n `${getContainerContentsStoreLogLabel(session.state)}: retired exhausted dormant metadata sweep; metadata remains dormant`,\n );\n continue;\n }\n if (!isSweepAttemptDue(sweep, now)) {\n continue;\n }\n const didClaim = await session.persistence.claimDormantMetadataSweepAttempt(\n session.runtime.infra.execSql,\n sweep,\n attemptedAt,\n session.isCurrent,\n );\n if (!session.isCurrent()) {\n return claimed;\n }\n if (didClaim) {\n claimed.push({\n ...sweep,\n attemptCount: sweep.attemptCount + 1,\n lastAttemptedAt: attemptedAt,\n });\n }\n }\n return claimed;\n}\n\nasync function loadAndClaimRestorationSweeps(\n session: RestorationSweepSession,\n forcedRetrySweepIds?: ReadonlySet<string> | undefined,\n): Promise<DormantMetadataSweep[]> {\n const requesterUserId = session.runtime.auth.userId;\n if (!requesterUserId) {\n return [];\n }\n const pendingSweeps =\n await session.persistence.listDormantMetadataSweepRequests(\n session.runtime.infra.execSql,\n requesterUserId,\n );\n if (!session.isCurrent()) {\n return [];\n }\n return claimDueRestorationSweeps(session, pendingSweeps, forcedRetrySweepIds);\n}\n\nfunction recreateRestorationSweepCompletion(\n state: ContainerContentsStoreSyncState,\n interruptedSession: RestorationSweepSession,\n interruptedSweeps: readonly DormantMetadataSweep[],\n): () => Promise<void> {\n const session = createRestorationSweepSession(\n state,\n captureRestorationGeneration(state),\n );\n return async () => {\n const sameStorage =\n session.runtime.infra.execSql ===\n interruptedSession.runtime.infra.execSql;\n const forcedRetrySweepIds = sameStorage\n ? new Set(interruptedSweeps.map(restorationSweepIdentity))\n : undefined;\n const sweeps = await loadAndClaimRestorationSweeps(\n session,\n forcedRetrySweepIds,\n );\n if (session.isCurrent() && sweeps.length > 0) {\n await completeRestorationSweeps(session, sweeps);\n }\n };\n}\n\nasync function reconcileRestoredAccess(input: {\n isCurrent: () => boolean;\n requestHydration: RemoteHydrationRequester;\n state: ContainerContentsStoreSyncState;\n}): Promise<void> {\n const { requestHydration, state } = input;\n const session = createRestorationSweepSession(state, input.isCurrent);\n const sweeps = await loadAndClaimRestorationSweeps(session);\n if (!session.isCurrent() || sweeps.length === 0) {\n return;\n }\n\n await refreshAllRemoteHydration({\n onFullyHydrated: () => completeRestorationSweeps(session, sweeps),\n recreateOnFullyHydratedAfterReset: () =>\n recreateRestorationSweepCompletion(state, session, sweeps),\n requestHydration,\n resetAllLaneWatermarks: true,\n scheduleSyncAfterHydration: false,\n scheduleSyncOnHydrationChange: false,\n state,\n });\n}\n\nexport function createRestoredAccessReconciler(input: {\n requestHydration: RemoteHydrationRequester;\n state: ContainerContentsStoreSyncState;\n}): (isCurrent?: () => boolean) => Promise<void> {\n const { state } = input;\n return async (isCurrent = captureRestorationGeneration(state)) => {\n try {\n await reconcileRestoredAccess({ ...input, isCurrent });\n } catch (error) {\n if (!isCurrent()) {\n return;\n }\n const message = `${getContainerContentsStoreLogLabel(state)}: dormant metadata sweep failed`;\n if (state.runtime.util.logError) {\n state.runtime.util.logError(message, error);\n } else {\n state.runtime.util.log(message);\n }\n }\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"accessRestorationSweep.js","sourceRoot":"","sources":["accessRestorationSweep.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAgB/D,SAAS,6BAA6B,CACpC,KAAsC,EACtC,SAAwB;IAExB,OAAO;QACL,SAAS;QACT,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK;KACN,CAAC;AACJ,CAAC;AAED,SAAS,4BAA4B,CACnC,KAAsC;IAEtC,MAAM,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;IACtD,MAAM,oBAAoB,GAAG,KAAK,CAAC,oBAAoB,CAAC;IACxD,OAAO,GAAG,EAAE,CACV,KAAK,CAAC,mBAAmB,KAAK,mBAAmB;QACjD,KAAK,CAAC,oBAAoB,KAAK,oBAAoB,CAAC;AACxD,CAAC;AAED,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACnC,MAAM,kBAAkB,GAAG,EAAE,GAAG,MAAM,CAAC;AAEvC,SAAS,iBAAiB,CAAC,KAA2B,EAAE,GAAW;IACjE,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC1D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACtC,OAAO,I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,CAAC;QACH,CAAC;IACH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {\n type RemoteHydrationRequester,\n refreshAllRemoteHydration,\n} from \"./hydration/remoteHydrationRefresh\";\nimport { getContainerContentsStoreLogLabel } from \"./logLabel\";\nimport type { ContainerContentsStoreSyncState } from \"./syncAgent/syncAgentTypes\";\n\ntype DormantMetadataSweep = Awaited<\n ReturnType<\n ContainerContentsStoreSyncState[\"persistence\"][\"listDormantMetadataSweepRequests\"]\n >\n>[number];\n\ninterface RestorationSweepSession {\n isCurrent: () => boolean;\n persistence: ContainerContentsStoreSyncState[\"persistence\"];\n runtime: ContainerContentsStoreSyncState[\"runtime\"];\n state: ContainerContentsStoreSyncState;\n}\n\nfunction createRestorationSweepSession(\n state: ContainerContentsStoreSyncState,\n isCurrent: () => boolean,\n): RestorationSweepSession {\n return {\n isCurrent,\n persistence: state.persistence,\n runtime: state.runtime,\n state,\n };\n}\n\nfunction captureRestorationGeneration(\n state: ContainerContentsStoreSyncState,\n): () => boolean {\n const lifecycleGeneration = state.lifecycleGeneration;\n const structuralGeneration = state.structuralGeneration;\n return () =>\n state.lifecycleGeneration === lifecycleGeneration &&\n state.structuralGeneration === structuralGeneration;\n}\n\nconst SWEEP_ATTEMPT_LIMIT = 5;\nconst SWEEP_RETRY_BASE_MS = 60_000;\nconst SWEEP_RETRY_MAX_MS = 15 * 60_000;\n\nfunction isSweepAttemptDue(sweep: DormantMetadataSweep, now: number): boolean {\n if (!sweep.lastAttemptedAt) {\n return true;\n }\n const lastAttemptedAt = Date.parse(sweep.lastAttemptedAt);\n if (!Number.isFinite(lastAttemptedAt)) {\n return true;\n }\n const retryDelay = Math.min(\n SWEEP_RETRY_BASE_MS * 2 ** Math.max(0, sweep.attemptCount - 1),\n SWEEP_RETRY_MAX_MS,\n );\n return lastAttemptedAt + retryDelay <= now;\n}\n\nfunction restorationSweepIdentity(sweep: DormantMetadataSweep): string {\n return `${sweep.requesterUserId}\\u0000${sweep.organizationId}\\u0000${sweep.generation}`;\n}\n\n/** A completed crawl can restore verified objects; absence never authorizes data loss. */\nasync function completeRestorationSweeps(\n session: RestorationSweepSession,\n sweeps: readonly DormantMetadataSweep[],\n): Promise<void> {\n for (const sweep of sweeps) {\n if (!session.isCurrent()) return;\n // An unsigned 404 cannot prove that encrypted local edits are disposable.\n // Leave unavailable metadata dormant until verified rediscovery or explicit deletion.\n await session.persistence.completeDormantMetadataSweepRequest(\n session.runtime.infra.execSql,\n sweep,\n session.isCurrent,\n );\n }\n}\n\nasync function claimDueRestorationSweeps(\n session: RestorationSweepSession,\n sweeps: readonly DormantMetadataSweep[],\n forcedRetrySweepIds?: ReadonlySet<string> | undefined,\n): Promise<DormantMetadataSweep[]> {\n const now = Date.now();\n const attemptedAt = new Date(now).toISOString();\n const claimed: DormantMetadataSweep[] = [];\n for (const sweep of sweeps) {\n if (!session.isCurrent()) {\n return claimed;\n }\n if (forcedRetrySweepIds?.has(restorationSweepIdentity(sweep))) {\n // The interrupted generation already claimed and durably counted this\n // attempt. Resume that exact attempt after reset instead of consuming a\n // new one or retiring it at the limit before its completion ran.\n claimed.push(sweep);\n continue;\n }\n if (sweep.attemptCount >= SWEEP_ATTEMPT_LIMIT) {\n await session.persistence.completeDormantMetadataSweepRequest(\n session.runtime.infra.execSql,\n sweep,\n session.isCurrent,\n );\n if (!session.isCurrent()) {\n return claimed;\n }\n session.runtime.util.log(\n `${getContainerContentsStoreLogLabel(session.state)}: retired exhausted dormant metadata sweep; metadata remains dormant`,\n );\n continue;\n }\n if (!isSweepAttemptDue(sweep, now)) {\n continue;\n }\n const didClaim = await session.persistence.claimDormantMetadataSweepAttempt(\n session.runtime.infra.execSql,\n sweep,\n attemptedAt,\n session.isCurrent,\n );\n if (!session.isCurrent()) {\n return claimed;\n }\n if (didClaim) {\n claimed.push({\n ...sweep,\n attemptCount: sweep.attemptCount + 1,\n lastAttemptedAt: attemptedAt,\n });\n }\n }\n return claimed;\n}\n\nasync function loadAndClaimRestorationSweeps(\n session: RestorationSweepSession,\n forcedRetrySweepIds?: ReadonlySet<string> | undefined,\n): Promise<DormantMetadataSweep[]> {\n const requesterUserId = session.runtime.auth.userId;\n if (!requesterUserId) {\n return [];\n }\n const pendingSweeps =\n await session.persistence.listDormantMetadataSweepRequests(\n session.runtime.infra.execSql,\n requesterUserId,\n );\n if (!session.isCurrent()) {\n return [];\n }\n return claimDueRestorationSweeps(session, pendingSweeps, forcedRetrySweepIds);\n}\n\nfunction recreateRestorationSweepCompletion(\n state: ContainerContentsStoreSyncState,\n interruptedSession: RestorationSweepSession,\n interruptedSweeps: readonly DormantMetadataSweep[],\n): () => Promise<void> {\n const session = createRestorationSweepSession(\n state,\n captureRestorationGeneration(state),\n );\n return async () => {\n const sameStorage =\n session.runtime.infra.execSql ===\n interruptedSession.runtime.infra.execSql;\n const forcedRetrySweepIds = sameStorage\n ? new Set(interruptedSweeps.map(restorationSweepIdentity))\n : undefined;\n const sweeps = await loadAndClaimRestorationSweeps(\n session,\n forcedRetrySweepIds,\n );\n if (session.isCurrent() && sweeps.length > 0) {\n await completeRestorationSweeps(session, sweeps);\n }\n };\n}\n\nasync function reconcileRestoredAccess(input: {\n isCurrent: () => boolean;\n requestHydration: RemoteHydrationRequester;\n state: ContainerContentsStoreSyncState;\n}): Promise<void> {\n const { requestHydration, state } = input;\n const session = createRestorationSweepSession(state, input.isCurrent);\n const sweeps = await loadAndClaimRestorationSweeps(session);\n if (!session.isCurrent() || sweeps.length === 0) {\n return;\n }\n\n await refreshAllRemoteHydration({\n onFullyHydrated: () => completeRestorationSweeps(session, sweeps),\n recreateOnFullyHydratedAfterReset: () =>\n recreateRestorationSweepCompletion(state, session, sweeps),\n requestHydration,\n resetAllLaneWatermarks: true,\n scheduleSyncAfterHydration: false,\n scheduleSyncOnHydrationChange: false,\n state,\n });\n}\n\nexport function createRestoredAccessReconciler(input: {\n requestHydration: RemoteHydrationRequester;\n state: ContainerContentsStoreSyncState;\n}): (isCurrent?: () => boolean) => Promise<void> {\n const { state } = input;\n return async (isCurrent = captureRestorationGeneration(state)) => {\n try {\n await reconcileRestoredAccess({ ...input, isCurrent });\n } catch (error) {\n if (!isCurrent()) {\n return;\n }\n const message = `${getContainerContentsStoreLogLabel(state)}: dormant metadata sweep failed`;\n if (state.runtime.util.logError) {\n state.runtime.util.logError(message, error);\n } else {\n state.runtime.util.log(message);\n }\n }\n };\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DomainScope } from "../../data/shared/domainScope.js";
|
|
2
2
|
import { type ContainerContentsPersistence } from "../../workflows/container-contents/containerPersistence.js";
|
|
3
|
-
import { type ContainerContentsStoreRuntime, createContainerContentsStoreSyncAgent } from "./syncAgent.js";
|
|
3
|
+
import { type ContainerContentsStoreRuntime, createContainerContentsStoreSyncAgent } from "./syncAgent/index.js";
|
|
4
4
|
import type { ContainerContentsStore, ContainerContentsStoreOptions, ContainerContentsStoreState } from "./types.js";
|
|
5
5
|
type ContainerWriteMethods = Pick<ContainerContentsStore, "createChild" | "deleteContainer" | "emptyTrash" | "ensureSystemContainer" | "moveContainer" | "prepareGroupRewrap" | "purgeContainer" | "renameContainer" | "setContainerIcon" | "shareWithGroup" | "shareWithUser">;
|
|
6
6
|
export declare function createContainerWriteMethods(state: ContainerContentsStoreState, syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>): ContainerWriteMethods;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { getCachedContainerWriterProjection } from "../../workflows/container-contents/container-state/projectionCache.js";
|
|
2
2
|
import { defaultContainerContentsPersistence, } from "../../workflows/container-contents/containerPersistence.js";
|
|
3
|
-
import { persistContainerState } from "./containerStatePersistence.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { purgeContainer } from "./purgeContainerOperation.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
3
|
+
import { persistContainerState } from "./containerState/containerStatePersistence.js";
|
|
4
|
+
import { createChildContainer, deleteContainer, ensureSystemContainer, moveContainer, renameContainer, } from "./operations/index.js";
|
|
5
|
+
import { emptyTrash } from "./operations/emptyTrashOperation.js";
|
|
6
|
+
import { prepareContainerGroupRewrap, verifyContainerGroupRewrapCurrent, } from "./operations/groupRewrapOperation.js";
|
|
7
|
+
import { purgeContainer } from "./operations/purgeContainerOperation.js";
|
|
8
|
+
import { setContainerIcon } from "./operations/setContainerIconOperation.js";
|
|
9
|
+
import { shareContainerWithGroup, shareContainerWithUser, } from "./operations/shareOperations.js";
|
|
10
|
+
import { invalidateRemoteContainerWrites } from "./remoteWrites/remoteWriteGuards.js";
|
|
11
|
+
import { chainRemoteContainerTask } from "./remoteWrites/remoteWriteQueue.js";
|
|
12
|
+
import { captureContainerWriteGeneration } from "./remoteWrites/writeGeneration.js";
|
|
12
13
|
import { createContainerContentsStoreState, subscribeToContainerContentsStore, updateContainerContentsSnapshot, updateContainerContentsStorePersistence, updateContainerContentsStoreRuntime, } from "./state.js";
|
|
13
|
-
import { createContainerContentsStoreSyncAgent, } from "./syncAgent.js";
|
|
14
|
-
import { findRootContainerState } from "./systemContainerLookup.js";
|
|
15
|
-
import { captureContainerWriteGeneration } from "./writeGeneration.js";
|
|
14
|
+
import { createContainerContentsStoreSyncAgent, } from "./syncAgent/index.js";
|
|
15
|
+
import { findRootContainerState } from "./systemContainers/systemContainerLookup.js";
|
|
16
16
|
const containerContentsStoresByScope = new WeakMap();
|
|
17
17
|
function applyContainerContentsStoreOptions(state, syncAgent, options) {
|
|
18
18
|
if ("logLabel" in options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerContentsStore.js","sourceRoot":"","sources":["containerContentsStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kCAAkC,EAAE,MAAM,oEAAoE,CAAC;AACxH,OAAO,EAEL,mCAAmC,GACpC,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6B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WAAW,EAAE,SAAS,CAAC,CAAC;IAC3D,OAAO,SAAS,CAAC,KAAK,CAAC;AACzB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uCAAuC,CACrD,WAAwB;IAExB,MAAM,KAAK,GAAG,8BAA8B,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,sBAAsB,EAAE,CAAC;IAC/B,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { DomainScope } from \"../../data/shared/domainScope\";\nimport { getCachedContainerWriterProjection } from \"../../workflows/container-contents/container-state/projectionCache\";\nimport {\n type ContainerContentsPersistence,\n defaultContainerContentsPersistence,\n} from \"../../workflows/container-contents/containerPersistence\";\nimport { persistContainerState } from \"./containerStatePersistence\";\nimport { emptyTrash } from \"./emptyTrashOperation\";\nimport {\n prepareContainerGroupRewrap,\n verifyContainerGroupRewrapCurrent,\n} from \"./groupRewrapOperation\";\nimport {\n createChildContainer,\n deleteContainer,\n ensureSystemContainer,\n moveContainer,\n renameContainer,\n} from \"./operations\";\nimport { purgeContainer } from \"./purgeContainerOperation\";\nimport { invalidateRemoteContainerWrites } from \"./remoteWriteGuards\";\nimport { chainRemoteContainerTask } from \"./remoteWriteQueue\";\nimport { setContainerIcon } from \"./setContainerIconOperation\";\nimport {\n shareContainerWithGroup,\n shareContainerWithUser,\n} from \"./shareOperations\";\nimport {\n createContainerContentsStoreState,\n subscribeToContainerContentsStore,\n updateContainerContentsSnapshot,\n updateContainerContentsStorePersistence,\n updateContainerContentsStoreRuntime,\n} from \"./state\";\nimport {\n type ContainerContentsStoreRuntime,\n type ContainerContentsStoreSyncAgent,\n createContainerContentsStoreSyncAgent,\n} from \"./syncAgent\";\nimport { findRootContainerState } from \"./systemContainerLookup\";\nimport type {\n ContainerContentsStore,\n ContainerContentsStoreOptions,\n ContainerContentsStoreState,\n} from \"./types\";\nimport { captureContainerWriteGeneration } from \"./writeGeneration\";\n\nconst containerContentsStoresByScope = new WeakMap<\n DomainScope,\n ContainerContentsStoreEntry\n>();\n\ninterface ContainerContentsStoreEntry {\n requestDocumentPriming: () => void;\n store: ContainerContentsStore;\n updateOptions: (options: ContainerContentsStoreOptions) => void;\n}\n\nfunction applyContainerContentsStoreOptions(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n options: ContainerContentsStoreOptions,\n): void {\n if (\"logLabel\" in options) {\n state.logLabel = options.logLabel;\n }\n\n if (\"persistence\" in options) {\n updateContainerContentsStorePersistence(\n state,\n options.persistence ?? defaultContainerContentsPersistence,\n syncAgent,\n );\n }\n}\n\nfunction getCachedContainerWriterProjectionForStore(\n state: ContainerContentsStoreState,\n containerId: string,\n) {\n const containerState = state.containersById.get(containerId);\n return containerState\n ? getCachedContainerWriterProjection(containerState)\n : null;\n}\n\nfunction createContainerContentsStoreSyncHost(\n state: ContainerContentsStoreState,\n): Parameters<typeof createContainerContentsStoreSyncAgent>[0][\"host\"] {\n return {\n persistContainerState: (\n containerState,\n patch,\n updateView,\n saveOptions,\n mutationOptions,\n ) =>\n persistContainerState(state, containerState, {\n patch,\n updateView,\n saveOptions,\n ...mutationOptions,\n }),\n requestDocumentPriming: () => {\n state.documentStoresNeedPriming = true;\n },\n updateSnapshot: () => updateContainerContentsSnapshot(state),\n };\n}\n\n// null marks an unknown mutation scope; [] delegates invalidation to actual writes.\nfunction chainContainerWrite(\n state: ContainerContentsStoreState,\n work: (isCurrent: () => boolean) => ContainerContentsStoreState[\"writeChain\"],\n changedIds: readonly string[] | null = null,\n movedId?: string,\n): ContainerContentsStoreState[\"writeChain\"] {\n const isCurrent = captureContainerWriteGeneration(state);\n invalidateRemoteContainerWrites(state, changedIds, movedId);\n state.writeChain = state.writeChain\n .catch(() => null)\n .then(() => {\n if (!isCurrent()) return null;\n invalidateRemoteContainerWrites(state, changedIds, movedId);\n return work(isCurrent);\n })\n .then((node) => (isCurrent() ? node : null));\n return state.writeChain;\n}\n\ntype ContainerWriteMethods = Pick<\n ContainerContentsStore,\n | \"createChild\"\n | \"deleteContainer\"\n | \"emptyTrash\"\n | \"ensureSystemContainer\"\n | \"moveContainer\"\n | \"prepareGroupRewrap\"\n | \"purgeContainer\"\n | \"renameContainer\"\n | \"setContainerIcon\"\n | \"shareWithGroup\"\n | \"shareWithUser\"\n>;\n\n// The group-rewrap builder verifies any required existing grant before capturing\n// the container KEK, then returns a check/rewrap pair. A verified non-match is\n// distinct from an unavailable preparation so security-critical callers can\n// no-op unrelated groups without failing open for a real grant.\nfunction createPrepareGroupRewrapMethod(\n state: ContainerContentsStoreState,\n syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>,\n): ContainerContentsStore[\"prepareGroupRewrap\"] {\n return async (containerId, groupId, accessLevel, options) => {\n const preparation = await chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n (isCurrent) =>\n prepareContainerGroupRewrap(\n state,\n containerId,\n groupId,\n accessLevel,\n options,\n isCurrent,\n ),\n containerId,\n );\n return preparation?.status === \"prepared\"\n ? {\n isCurrent: (\n expectedGroupHead,\n expectedContainerId,\n expectedOrganizationId,\n ) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n verifyContainerGroupRewrapCurrent(\n state,\n containerId,\n groupId,\n accessLevel,\n expectedGroupHead,\n expectedContainerId,\n expectedOrganizationId,\n isCurrent,\n ),\n containerId,\n ),\n rewrap: () =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithGroup(\n state,\n syncAgent,\n containerId,\n groupId,\n accessLevel,\n {\n ...options,\n knownContainerKeks: preparation.knownContainerKeks,\n // A prepared re-wrap is grant-preserving by definition, so\n // it never mints a grant and never needs the chosen name.\n requireExistingGrant: true,\n },\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n status: \"prepared\" as const,\n }\n : (preparation ?? null);\n };\n}\n\nfunction createContainerSharingMethods(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): Pick<ContainerWriteMethods, \"shareWithUser\" | \"shareWithGroup\"> {\n return {\n shareWithUser: (containerId, userId) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithUser(\n state,\n syncAgent,\n containerId,\n userId,\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n shareWithGroup: (containerId, groupId, accessLevel, options) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithGroup(\n state,\n syncAgent,\n containerId,\n groupId,\n accessLevel,\n options,\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n };\n}\n\nfunction createDeleteContainerMethod(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): ContainerContentsStore[\"deleteContainer\"] {\n return (containerId) => {\n const current = captureContainerWriteGeneration(state);\n const remoteDelete = () =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n (isCurrent) =>\n deleteContainer(state, syncAgent, containerId, isCurrent),\n containerId,\n ).then((node) => node !== null);\n if (state.containersById.get(containerId)?.record.documentId)\n return remoteDelete();\n let promoted = false;\n return chainContainerWrite(\n state,\n (isCurrent) => {\n // Promotion can win while this local operation was queued. Hand it to\n // the remote queue after releasing the local chain, before any HTTP I/O.\n promoted = Boolean(\n state.containersById.get(containerId)?.record.documentId,\n );\n return promoted\n ? Promise.resolve(null)\n : deleteContainer(state, syncAgent, containerId, isCurrent);\n },\n [containerId],\n ).then((node) => (promoted && current() ? remoteDelete() : node !== null));\n };\n}\n\nfunction createEnsureSystemContainerMethod(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): ContainerContentsStore[\"ensureSystemContainer\"] {\n return (systemSlot, name, options) => {\n const work = (isCurrent: () => boolean) =>\n ensureSystemContainer(\n state,\n syncAgent,\n systemSlot,\n name,\n options,\n isCurrent,\n );\n const rootId = findRootContainerState(state)?.container.id;\n return options?.deferRemoteBootstrap\n ? chainContainerWrite(state, work, [])\n : chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n work,\n rootId ? { rootId, systemSlot } : undefined,\n );\n };\n}\n\nexport function createContainerWriteMethods(\n state: ContainerContentsStoreState,\n syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>,\n): ContainerWriteMethods {\n return {\n ...createContainerSharingMethods(state, syncAgent),\n createChild: (parentId, name) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n createChildContainer(state, syncAgent, parentId, name, isCurrent),\n [parentId],\n ),\n deleteContainer: createDeleteContainerMethod(state, syncAgent),\n purgeContainer: (containerId, options) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n purgeContainer(state, syncAgent, containerId, options, isCurrent),\n containerId,\n ),\n emptyTrash: (trashContainerId, options) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n emptyTrash(state, syncAgent, trashContainerId, options, isCurrent),\n trashContainerId,\n ),\n ensureSystemContainer: createEnsureSystemContainerMethod(state, syncAgent),\n moveContainer: (containerId, parentId) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n moveContainer(state, syncAgent, containerId, parentId, isCurrent),\n [containerId, parentId],\n containerId,\n ),\n prepareGroupRewrap: createPrepareGroupRewrapMethod(state, syncAgent),\n renameContainer: (containerId, name) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n renameContainer(state, syncAgent, containerId, name, isCurrent),\n [containerId],\n ),\n setContainerIcon: (containerId, icon) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n setContainerIcon(state, syncAgent, containerId, icon, isCurrent),\n [containerId],\n ),\n };\n}\n\nfunction createContainerContentsStoreEntry(\n initialRuntime: ContainerContentsStoreRuntime,\n persistence: ContainerContentsPersistence = defaultContainerContentsPersistence,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStoreEntry {\n const state = createContainerContentsStoreState(\n initialRuntime,\n options.persistence ?? persistence,\n options.logLabel,\n );\n const syncAgent = createContainerContentsStoreSyncAgent({\n host: createContainerContentsStoreSyncHost(state),\n state,\n });\n const writeMethods = createContainerWriteMethods(state, syncAgent);\n\n return {\n requestDocumentPriming: () => {\n state.documentStoresNeedPriming = true;\n syncAgent.scheduleSync();\n },\n store: {\n ...writeMethods,\n refresh: () => syncAgent.refresh({ resetAllLaneWatermarks: true }),\n refreshRootLane: (options) => syncAgent.refreshRootLane(options),\n // Force an on-demand local SQLite re-read (see the interface doc): arm the\n // gate refreshLocalContainerStates otherwise requires, which the runtime\n // auto-arms only on a context transition an on-demand caller cannot rely on.\n refreshLocalContainers: () => {\n state.localContainersNeedRefresh = true;\n return syncAgent.refreshLocalContainers();\n },\n requestSync: () => syncAgent.scheduleSync(),\n getCachedContainerWriterProjection: (containerId) =>\n getCachedContainerWriterProjectionForStore(state, containerId),\n getSnapshot: () => state.snapshot,\n subscribe: (listener) =>\n subscribeToContainerContentsStore(state, listener),\n updateRuntime: (runtime) =>\n updateContainerContentsStoreRuntime(state, runtime, syncAgent),\n },\n updateOptions: (nextOptions) =>\n applyContainerContentsStoreOptions(state, syncAgent, nextOptions),\n };\n}\n\nexport function createContainerContentsStore(\n initialRuntime: ContainerContentsStoreRuntime,\n persistence: ContainerContentsPersistence = defaultContainerContentsPersistence,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStore {\n return createContainerContentsStoreEntry(initialRuntime, persistence, options)\n .store;\n}\n\nexport function getOrCreateContainerContentsStore(\n domainScope: DomainScope,\n runtime: ContainerContentsStoreRuntime,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStore {\n const existingEntry = containerContentsStoresByScope.get(domainScope);\n if (existingEntry) {\n existingEntry.updateOptions(options);\n return existingEntry.store;\n }\n\n const nextEntry = createContainerContentsStoreEntry(\n runtime,\n defaultContainerContentsPersistence,\n options,\n );\n containerContentsStoresByScope.set(domainScope, nextEntry);\n return nextEntry.store;\n}\n\n/**\n * Arm the next structural pass's document-priming scan for a domain scope.\n * Priming normally re-arms only on store creation and topology changes, so a\n * caller that just tore down a document's local state uses this to have the\n * still-listed server document re-created without waiting for an app\n * restart. Returns false when the scope has no container-contents store yet;\n * the startup priming pass covers that case.\n */\nexport function requestContainerContentsDocumentPriming(\n domainScope: DomainScope,\n): boolean {\n const entry = containerContentsStoresByScope.get(domainScope);\n if (!entry) {\n return false;\n }\n\n entry.requestDocumentPriming();\n return true;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"containerContentsStore.js","sourceRoot":"","sources":["containerContentsStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kCAAkC,EAAE,MAAM,oEAAoE,CAAC;AACxH,OAAO,EAEL,mCAAmC,GACpC,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,+BAA+B,EAC/B,uCAAuC,EACvC,mCAAmC,GACpC,MAAM,SAAS,CAAC;A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AC;AAED,MAAM,UAAU,4BAA4B,CAC1C,cAA6C,EAC7C,cAA4C,mCAAmC,EAC/E,UAAyC,EAAE;IAE3C,OAAO,iCAAiC,CAAC,cAAc,EAAE,WAAW,EAAE,OAAO,CAAC;SAC3E,KAAK,CAAC;AACX,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,WAAwB,EACxB,OAAsC,EACtC,UAAyC,EAAE;IAE3C,MAAM,aAAa,GAAG,8BAA8B,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACtE,IAAI,aAAa,EAAE,CAAC;QAClB,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,aAAa,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,MAAM,SAAS,GAAG,iCAAiC,CACjD,OAAO,EACP,mCAAmC,EACnC,OAAO,CACR,CAAC;IACF,8BAA8B,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC3D,OAAO,SAAS,CAAC,KAAK,CAAC;AACzB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uCAAuC,CACrD,WAAwB;IAExB,MAAM,KAAK,GAAG,8BAA8B,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,sBAAsB,EAAE,CAAC;IAC/B,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { DomainScope } from \"../../data/shared/domainScope\";\nimport { getCachedContainerWriterProjection } from \"../../workflows/container-contents/container-state/projectionCache\";\nimport {\n type ContainerContentsPersistence,\n defaultContainerContentsPersistence,\n} from \"../../workflows/container-contents/containerPersistence\";\nimport { persistContainerState } from \"./containerState/containerStatePersistence\";\nimport {\n createChildContainer,\n deleteContainer,\n ensureSystemContainer,\n moveContainer,\n renameContainer,\n} from \"./operations\";\nimport { emptyTrash } from \"./operations/emptyTrashOperation\";\nimport {\n prepareContainerGroupRewrap,\n verifyContainerGroupRewrapCurrent,\n} from \"./operations/groupRewrapOperation\";\nimport { purgeContainer } from \"./operations/purgeContainerOperation\";\nimport { setContainerIcon } from \"./operations/setContainerIconOperation\";\nimport {\n shareContainerWithGroup,\n shareContainerWithUser,\n} from \"./operations/shareOperations\";\nimport { invalidateRemoteContainerWrites } from \"./remoteWrites/remoteWriteGuards\";\nimport { chainRemoteContainerTask } from \"./remoteWrites/remoteWriteQueue\";\nimport { captureContainerWriteGeneration } from \"./remoteWrites/writeGeneration\";\nimport {\n createContainerContentsStoreState,\n subscribeToContainerContentsStore,\n updateContainerContentsSnapshot,\n updateContainerContentsStorePersistence,\n updateContainerContentsStoreRuntime,\n} from \"./state\";\nimport {\n type ContainerContentsStoreRuntime,\n type ContainerContentsStoreSyncAgent,\n createContainerContentsStoreSyncAgent,\n} from \"./syncAgent\";\nimport { findRootContainerState } from \"./systemContainers/systemContainerLookup\";\nimport type {\n ContainerContentsStore,\n ContainerContentsStoreOptions,\n ContainerContentsStoreState,\n} from \"./types\";\n\nconst containerContentsStoresByScope = new WeakMap<\n DomainScope,\n ContainerContentsStoreEntry\n>();\n\ninterface ContainerContentsStoreEntry {\n requestDocumentPriming: () => void;\n store: ContainerContentsStore;\n updateOptions: (options: ContainerContentsStoreOptions) => void;\n}\n\nfunction applyContainerContentsStoreOptions(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n options: ContainerContentsStoreOptions,\n): void {\n if (\"logLabel\" in options) {\n state.logLabel = options.logLabel;\n }\n\n if (\"persistence\" in options) {\n updateContainerContentsStorePersistence(\n state,\n options.persistence ?? defaultContainerContentsPersistence,\n syncAgent,\n );\n }\n}\n\nfunction getCachedContainerWriterProjectionForStore(\n state: ContainerContentsStoreState,\n containerId: string,\n) {\n const containerState = state.containersById.get(containerId);\n return containerState\n ? getCachedContainerWriterProjection(containerState)\n : null;\n}\n\nfunction createContainerContentsStoreSyncHost(\n state: ContainerContentsStoreState,\n): Parameters<typeof createContainerContentsStoreSyncAgent>[0][\"host\"] {\n return {\n persistContainerState: (\n containerState,\n patch,\n updateView,\n saveOptions,\n mutationOptions,\n ) =>\n persistContainerState(state, containerState, {\n patch,\n updateView,\n saveOptions,\n ...mutationOptions,\n }),\n requestDocumentPriming: () => {\n state.documentStoresNeedPriming = true;\n },\n updateSnapshot: () => updateContainerContentsSnapshot(state),\n };\n}\n\n// null marks an unknown mutation scope; [] delegates invalidation to actual writes.\nfunction chainContainerWrite(\n state: ContainerContentsStoreState,\n work: (isCurrent: () => boolean) => ContainerContentsStoreState[\"writeChain\"],\n changedIds: readonly string[] | null = null,\n movedId?: string,\n): ContainerContentsStoreState[\"writeChain\"] {\n const isCurrent = captureContainerWriteGeneration(state);\n invalidateRemoteContainerWrites(state, changedIds, movedId);\n state.writeChain = state.writeChain\n .catch(() => null)\n .then(() => {\n if (!isCurrent()) return null;\n invalidateRemoteContainerWrites(state, changedIds, movedId);\n return work(isCurrent);\n })\n .then((node) => (isCurrent() ? node : null));\n return state.writeChain;\n}\n\ntype ContainerWriteMethods = Pick<\n ContainerContentsStore,\n | \"createChild\"\n | \"deleteContainer\"\n | \"emptyTrash\"\n | \"ensureSystemContainer\"\n | \"moveContainer\"\n | \"prepareGroupRewrap\"\n | \"purgeContainer\"\n | \"renameContainer\"\n | \"setContainerIcon\"\n | \"shareWithGroup\"\n | \"shareWithUser\"\n>;\n\n// The group-rewrap builder verifies any required existing grant before capturing\n// the container KEK, then returns a check/rewrap pair. A verified non-match is\n// distinct from an unavailable preparation so security-critical callers can\n// no-op unrelated groups without failing open for a real grant.\nfunction createPrepareGroupRewrapMethod(\n state: ContainerContentsStoreState,\n syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>,\n): ContainerContentsStore[\"prepareGroupRewrap\"] {\n return async (containerId, groupId, accessLevel, options) => {\n const preparation = await chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n (isCurrent) =>\n prepareContainerGroupRewrap(\n state,\n containerId,\n groupId,\n accessLevel,\n options,\n isCurrent,\n ),\n containerId,\n );\n return preparation?.status === \"prepared\"\n ? {\n isCurrent: (\n expectedGroupHead,\n expectedContainerId,\n expectedOrganizationId,\n ) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n verifyContainerGroupRewrapCurrent(\n state,\n containerId,\n groupId,\n accessLevel,\n expectedGroupHead,\n expectedContainerId,\n expectedOrganizationId,\n isCurrent,\n ),\n containerId,\n ),\n rewrap: () =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithGroup(\n state,\n syncAgent,\n containerId,\n groupId,\n accessLevel,\n {\n ...options,\n knownContainerKeks: preparation.knownContainerKeks,\n // A prepared re-wrap is grant-preserving by definition, so\n // it never mints a grant and never needs the chosen name.\n requireExistingGrant: true,\n },\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n status: \"prepared\" as const,\n }\n : (preparation ?? null);\n };\n}\n\nfunction createContainerSharingMethods(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): Pick<ContainerWriteMethods, \"shareWithUser\" | \"shareWithGroup\"> {\n return {\n shareWithUser: (containerId, userId) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithUser(\n state,\n syncAgent,\n containerId,\n userId,\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n shareWithGroup: (containerId, groupId, accessLevel, options) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithGroup(\n state,\n syncAgent,\n containerId,\n groupId,\n accessLevel,\n options,\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n };\n}\n\nfunction createDeleteContainerMethod(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): ContainerContentsStore[\"deleteContainer\"] {\n return (containerId) => {\n const current = captureContainerWriteGeneration(state);\n const remoteDelete = () =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n (isCurrent) =>\n deleteContainer(state, syncAgent, containerId, isCurrent),\n containerId,\n ).then((node) => node !== null);\n if (state.containersById.get(containerId)?.record.documentId)\n return remoteDelete();\n let promoted = false;\n return chainContainerWrite(\n state,\n (isCurrent) => {\n // Promotion can win while this local operation was queued. Hand it to\n // the remote queue after releasing the local chain, before any HTTP I/O.\n promoted = Boolean(\n state.containersById.get(containerId)?.record.documentId,\n );\n return promoted\n ? Promise.resolve(null)\n : deleteContainer(state, syncAgent, containerId, isCurrent);\n },\n [containerId],\n ).then((node) => (promoted && current() ? remoteDelete() : node !== null));\n };\n}\n\nfunction createEnsureSystemContainerMethod(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): ContainerContentsStore[\"ensureSystemContainer\"] {\n return (systemSlot, name, options) => {\n const work = (isCurrent: () => boolean) =>\n ensureSystemContainer(\n state,\n syncAgent,\n systemSlot,\n name,\n options,\n isCurrent,\n );\n const rootId = findRootContainerState(state)?.container.id;\n return options?.deferRemoteBootstrap\n ? chainContainerWrite(state, work, [])\n : chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n work,\n rootId ? { rootId, systemSlot } : undefined,\n );\n };\n}\n\nexport function createContainerWriteMethods(\n state: ContainerContentsStoreState,\n syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>,\n): ContainerWriteMethods {\n return {\n ...createContainerSharingMethods(state, syncAgent),\n createChild: (parentId, name) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n createChildContainer(state, syncAgent, parentId, name, isCurrent),\n [parentId],\n ),\n deleteContainer: createDeleteContainerMethod(state, syncAgent),\n purgeContainer: (containerId, options) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n purgeContainer(state, syncAgent, containerId, options, isCurrent),\n containerId,\n ),\n emptyTrash: (trashContainerId, options) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n emptyTrash(state, syncAgent, trashContainerId, options, isCurrent),\n trashContainerId,\n ),\n ensureSystemContainer: createEnsureSystemContainerMethod(state, syncAgent),\n moveContainer: (containerId, parentId) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n moveContainer(state, syncAgent, containerId, parentId, isCurrent),\n [containerId, parentId],\n containerId,\n ),\n prepareGroupRewrap: createPrepareGroupRewrapMethod(state, syncAgent),\n renameContainer: (containerId, name) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n renameContainer(state, syncAgent, containerId, name, isCurrent),\n [containerId],\n ),\n setContainerIcon: (containerId, icon) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n setContainerIcon(state, syncAgent, containerId, icon, isCurrent),\n [containerId],\n ),\n };\n}\n\nfunction createContainerContentsStoreEntry(\n initialRuntime: ContainerContentsStoreRuntime,\n persistence: ContainerContentsPersistence = defaultContainerContentsPersistence,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStoreEntry {\n const state = createContainerContentsStoreState(\n initialRuntime,\n options.persistence ?? persistence,\n options.logLabel,\n );\n const syncAgent = createContainerContentsStoreSyncAgent({\n host: createContainerContentsStoreSyncHost(state),\n state,\n });\n const writeMethods = createContainerWriteMethods(state, syncAgent);\n\n return {\n requestDocumentPriming: () => {\n state.documentStoresNeedPriming = true;\n syncAgent.scheduleSync();\n },\n store: {\n ...writeMethods,\n refresh: () => syncAgent.refresh({ resetAllLaneWatermarks: true }),\n refreshRootLane: (options) => syncAgent.refreshRootLane(options),\n // Force an on-demand local SQLite re-read (see the interface doc): arm the\n // gate refreshLocalContainerStates otherwise requires, which the runtime\n // auto-arms only on a context transition an on-demand caller cannot rely on.\n refreshLocalContainers: () => {\n state.localContainersNeedRefresh = true;\n return syncAgent.refreshLocalContainers();\n },\n requestSync: () => syncAgent.scheduleSync(),\n getCachedContainerWriterProjection: (containerId) =>\n getCachedContainerWriterProjectionForStore(state, containerId),\n getSnapshot: () => state.snapshot,\n subscribe: (listener) =>\n subscribeToContainerContentsStore(state, listener),\n updateRuntime: (runtime) =>\n updateContainerContentsStoreRuntime(state, runtime, syncAgent),\n },\n updateOptions: (nextOptions) =>\n applyContainerContentsStoreOptions(state, syncAgent, nextOptions),\n };\n}\n\nexport function createContainerContentsStore(\n initialRuntime: ContainerContentsStoreRuntime,\n persistence: ContainerContentsPersistence = defaultContainerContentsPersistence,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStore {\n return createContainerContentsStoreEntry(initialRuntime, persistence, options)\n .store;\n}\n\nexport function getOrCreateContainerContentsStore(\n domainScope: DomainScope,\n runtime: ContainerContentsStoreRuntime,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStore {\n const existingEntry = containerContentsStoresByScope.get(domainScope);\n if (existingEntry) {\n existingEntry.updateOptions(options);\n return existingEntry.store;\n }\n\n const nextEntry = createContainerContentsStoreEntry(\n runtime,\n defaultContainerContentsPersistence,\n options,\n );\n containerContentsStoresByScope.set(domainScope, nextEntry);\n return nextEntry.store;\n}\n\n/**\n * Arm the next structural pass's document-priming scan for a domain scope.\n * Priming normally re-arms only on store creation and topology changes, so a\n * caller that just tore down a document's local state uses this to have the\n * still-listed server document re-created without waiting for an app\n * restart. Returns false when the scope has no container-contents store yet;\n * the startup priming pass covers that case.\n */\nexport function requestContainerContentsDocumentPriming(\n domainScope: DomainScope,\n): boolean {\n const entry = containerContentsStoresByScope.get(domainScope);\n if (!entry) {\n return false;\n }\n\n entry.requestDocumentPriming();\n return true;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerStateMap.js","sourceRoot":"","sources":["containerStateMap.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,iBAAkB,SAAQ,GAA2B;IACvD,uBAAuB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC7D,uBAAuB,GAAG,CAAC,CAAC;IAE5B,YAAY,OAA6C;QACvD,KAAK,EAAE,CAAC;QACR,KAAK,MA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wCAAwC,CACtD,MAAmC;IAEnC,OAAO,MAAM,YAAY,iBAAiB;QACxC,CAAC,CAAC,MAAM,CAAC,0BAA0B,EAAE;QACrC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,MAAmC,EACnC,WAAmB,EACnB,QAAqC;IAErC,OAAO,CACL,MAAM,YAAY,iBAAiB;QACnC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAC/C,CAAC;AACJ,CAAC","sourcesContent":["import type { ContainerState } from \"../../../workflows/container-contents/remoteHydration\";\n\nexport class ContainerStateMap extends Map<string, ContainerState> {\n readonly #mutationGenerationById = new Map<string, number>();\n #nextMutationGeneration = 0;\n\n constructor(entries?: ReadonlyMap<string, ContainerState>) {\n super();\n for (const [containerId, state] of entries ?? []) {\n super.set(containerId, state);\n }\n }\n\n override clear(): void {\n for (const containerId of this.keys()) {\n this.recordMutation(containerId);\n }\n super.clear();\n }\n\n override delete(containerId: string): boolean {\n const deleted = super.delete(containerId);\n // An absent delete is still an authoritative tombstone observation. A\n // local-refresh query that started before it must not install a stale row\n // merely because no in-memory value existed for Map.delete to remove.\n this.recordMutation(containerId);\n return deleted;\n }\n\n override set(containerId: string, state: ContainerState): this {\n this.recordMutation(containerId);\n return super.set(containerId, state);\n }\n\n captureMutationGenerations(): ReadonlyMap<string, number> {\n return new Map(this.#mutationGenerationById);\n }\n\n hasMutationAfter(\n containerId: string,\n baseline: ReadonlyMap<string, number>,\n ): boolean {\n return (\n (this.#mutationGenerationById.get(containerId) ?? 0) !==\n (baseline.get(containerId) ?? 0)\n );\n }\n\n private recordMutation(containerId: string): void {\n this.#nextMutationGeneration += 1;\n this.#mutationGenerationById.set(containerId, this.#nextMutationGeneration);\n }\n}\n\nexport function captureContainerStateMutationGenerations(\n states: Map<string, ContainerState>,\n): ReadonlyMap<string, number> {\n return states instanceof ContainerStateMap\n ? states.captureMutationGenerations()\n : new Map();\n}\n\nexport function containerStateMutatedAfter(\n states: Map<string, ContainerState>,\n containerId: string,\n baseline: ReadonlyMap<string, number>,\n): boolean {\n return (\n states instanceof ContainerStateMap &&\n states.hasMutationAfter(containerId, baseline)\n );\n}\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { installContainerMetadataRecord, persistContainerMetadataStateFromRuntime, } from "../../../workflows/container-contents/metadata/index.js";
|
|
2
|
+
import { updateContainerContentsSnapshot } from "../state.js";
|
|
3
|
+
import { removeMissingContainerState } from "./missingContainerState.js";
|
|
4
|
+
export async function persistContainerState(state, containerState, options = {}) {
|
|
5
|
+
const { expectedStateWhenMissing, isCurrent, updateView = true } = options;
|
|
6
|
+
const persisted = await persistContainerMetadataStateFromRuntime({
|
|
7
|
+
metadataState: containerState,
|
|
8
|
+
localMetadataPatch: options.localMetadataPatch,
|
|
9
|
+
localUpdate: options.localUpdate,
|
|
10
|
+
patch: options.patch ?? {},
|
|
11
|
+
persistence: state.persistence,
|
|
12
|
+
createIntentSettlement: options.createIntentSettlement,
|
|
13
|
+
moveIntentSettlement: options.moveIntentSettlement,
|
|
14
|
+
preserveDurableStructureWhenPending: options.preserveDurableStructureWhenPending,
|
|
15
|
+
runtime: state.runtime,
|
|
16
|
+
saveOptions: options.saveOptions,
|
|
17
|
+
stillCurrent: isCurrent,
|
|
18
|
+
});
|
|
19
|
+
if (isCurrent?.() === false) {
|
|
20
|
+
return { status: "stale-generation" };
|
|
21
|
+
}
|
|
22
|
+
if (!persisted) {
|
|
23
|
+
removeMissingContainerState(state, expectedStateWhenMissing ?? containerState);
|
|
24
|
+
return { status: "missing" };
|
|
25
|
+
}
|
|
26
|
+
containerState.container = persisted.container;
|
|
27
|
+
installContainerMetadataRecord(containerState, persisted.record);
|
|
28
|
+
if (persisted.mutationSuperseded || persisted.syncIdentitySuperseded) {
|
|
29
|
+
const cachedState = state.containersById.get(containerState.container.id);
|
|
30
|
+
if (cachedState && cachedState !== containerState) {
|
|
31
|
+
cachedState.container = containerState.container;
|
|
32
|
+
cachedState.doc = containerState.doc;
|
|
33
|
+
cachedState.metadataWriterProjection =
|
|
34
|
+
containerState.metadataWriterProjection;
|
|
35
|
+
installContainerMetadataRecord(cachedState, persisted.record);
|
|
36
|
+
}
|
|
37
|
+
// The requested structural mutation was not applied. Refresh from the
|
|
38
|
+
// authoritative state installed above, but make the caller fail explicitly
|
|
39
|
+
// so it cannot schedule sync or report the dropped mutation as successful.
|
|
40
|
+
updateContainerContentsSnapshot(state);
|
|
41
|
+
return { record: persisted.record, status: "identity-superseded" };
|
|
42
|
+
}
|
|
43
|
+
if (updateView) {
|
|
44
|
+
updateContainerContentsSnapshot(state);
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
record: persisted.record,
|
|
48
|
+
status: "persisted",
|
|
49
|
+
...(persisted.createIntentSettled
|
|
50
|
+
? { createIntentSettled: true }
|
|
51
|
+
: {}),
|
|
52
|
+
...(persisted.moveIntentSettled
|
|
53
|
+
? { moveIntentSettled: true }
|
|
54
|
+
: {}),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=containerStatePersistence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerStatePersistence.js","sourceRoot":"","sources":["containerStatePersistence.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,wCAAwC,GACzC,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAG3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAsBtE,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAkC,EAClC,cAA8B,EAC9B,UAAwC,EAAE;IAE1C,MAAM,EAAE,wBAAwB,EAAE,SAAS,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAC3E,MAAM,SAAS,GAAG,MAAM,wCAAwC,CAAC;QAC/D,aAAa,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,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QAChE,CAAC;QACD,sEAAsE;QACtE,2EAA2E;QAC3E,2EAA2E;QAC3E,+BAA+B,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC;IACrE,CAAC;IACD,IAAI,UAAU,EAAE,CAAC;QACf,+BAA+B,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,OAAO;QACL,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,MAAM,EAAE,WAAW;QACnB,GAAG,CAAC,SAAS,CAAC,mBAAmB;YAC/B,CAAC,CAAC,EAAE,mBAAmB,EAAE,IAAa,EAAE;YACxC,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,SAAS,CAAC,iBAAiB;YAC7B,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAa,EAAE;YACtC,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC","sourcesContent":["import {\n installContainerMetadataRecord,\n persistContainerMetadataStateFromRuntime,\n} from \"../../../workflows/container-contents/metadata\";\nimport type { PersistContainerStateResult } from \"../../../workflows/container-contents/remoteHydration\";\nimport { updateContainerContentsSnapshot } from \"../state\";\nimport type { ContainerState } from \"../syncAgent\";\nimport type { ContainerContentsStoreState } from \"../types\";\nimport { removeMissingContainerState } from \"./missingContainerState\";\n\ntype MetadataPersistenceInput = Parameters<\n typeof persistContainerMetadataStateFromRuntime\n>[0];\n\ninterface PersistContainerStateOptions\n extends Pick<\n MetadataPersistenceInput,\n | \"patch\"\n | \"saveOptions\"\n | \"localMetadataPatch\"\n | \"localUpdate\"\n | \"createIntentSettlement\"\n | \"moveIntentSettlement\"\n | \"preserveDurableStructureWhenPending\"\n > {\n expectedStateWhenMissing?: ContainerState | undefined;\n isCurrent?: (() => boolean) | undefined;\n updateView?: boolean | undefined;\n}\n\nexport async function persistContainerState(\n state: ContainerContentsStoreState,\n containerState: ContainerState,\n options: PersistContainerStateOptions = {},\n): Promise<PersistContainerStateResult> {\n const { expectedStateWhenMissing, isCurrent, updateView = true } = options;\n const persisted = await persistContainerMetadataStateFromRuntime({\n metadataState: containerState,\n localMetadataPatch: options.localMetadataPatch,\n localUpdate: options.localUpdate,\n patch: options.patch ?? {},\n persistence: state.persistence,\n createIntentSettlement: options.createIntentSettlement,\n moveIntentSettlement: options.moveIntentSettlement,\n preserveDurableStructureWhenPending:\n options.preserveDurableStructureWhenPending,\n runtime: state.runtime,\n saveOptions: options.saveOptions,\n stillCurrent: isCurrent,\n });\n if (isCurrent?.() === false) {\n return { status: \"stale-generation\" };\n }\n if (!persisted) {\n removeMissingContainerState(\n state,\n expectedStateWhenMissing ?? containerState,\n );\n return { status: \"missing\" };\n }\n containerState.container = persisted.container;\n installContainerMetadataRecord(containerState, persisted.record);\n if (persisted.mutationSuperseded || persisted.syncIdentitySuperseded) {\n const cachedState = state.containersById.get(containerState.container.id);\n if (cachedState && cachedState !== containerState) {\n cachedState.container = containerState.container;\n cachedState.doc = containerState.doc;\n cachedState.metadataWriterProjection =\n containerState.metadataWriterProjection;\n installContainerMetadataRecord(cachedState, persisted.record);\n }\n // The requested structural mutation was not applied. Refresh from the\n // authoritative state installed above, but make the caller fail explicitly\n // so it cannot schedule sync or report the dropped mutation as successful.\n updateContainerContentsSnapshot(state);\n return { record: persisted.record, status: \"identity-superseded\" };\n }\n if (updateView) {\n updateContainerContentsSnapshot(state);\n }\n return {\n record: persisted.record,\n status: \"persisted\",\n ...(persisted.createIntentSettled\n ? { createIntentSettled: true as const }\n : {}),\n ...(persisted.moveIntentSettled\n ? { moveIntentSettled: true as const }\n : {}),\n };\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { updateContainerContentsSnapshot } from "../state.js";
|
|
2
|
+
export function removeMissingContainerState(state, expectedState) {
|
|
3
|
+
const containerId = expectedState.container.id;
|
|
4
|
+
if (state.containersById.get(containerId) !== expectedState) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
state.containersById.delete(containerId);
|
|
8
|
+
updateContainerContentsSnapshot(state);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=missingContainerState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missingContainerState.js","sourceRoot":"","sources":["missingContainerState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAG3D,MAAM,UAAU,2BAA2B,CACzC,KAAkC,EAClC,aAA6B;IAE7B,MAAM,WAAW,GAAG,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC;IAC/C,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,aAAa,EAAE,CAAC;QAC5D,OAAO;IACT,CAAC;IACD,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACzC,+BAA+B,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC","sourcesContent":["import type { ContainerState } from \"../../../workflows/container-contents/remoteHydration\";\nimport { updateContainerContentsSnapshot } from \"../state\";\nimport type { ContainerContentsStoreState } from \"../types\";\n\nexport function removeMissingContainerState(\n state: ContainerContentsStoreState,\n expectedState: ContainerState,\n): void {\n const containerId = expectedState.container.id;\n if (state.containersById.get(containerId) !== expectedState) {\n return;\n }\n state.containersById.delete(containerId);\n updateContainerContentsSnapshot(state);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missingSyncedContainerState.js","sourceRoot":"","sources":["missingSyncedContainerState.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,iCAAiC,CAC/C,KAAsC,EACtC,aAA6B,EAC7B,cAA0B;IAE1B,MAAM,WAAW,GAAG,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC;IAC/C,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,aAAa,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACzC,cAAc,EAAE,CAAC;IACjB,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { ContainerState } from \"../../../workflows/container-contents/remoteHydration\";\nimport type { ContainerContentsStoreSyncState } from \"../syncAgent/syncAgentTypes\";\n\nexport function removeMissingSyncedContainerState(\n state: ContainerContentsStoreSyncState,\n expectedState: ContainerState,\n updateSnapshot: () => void,\n): boolean {\n const containerId = expectedState.container.id;\n if (state.containersById.get(containerId) !== expectedState) {\n return false;\n }\n\n state.containersById.delete(containerId);\n updateSnapshot();\n return true;\n}\n"]}
|