libre-webui 0.21.3 → 0.22.0
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/README.md +308 -328
- package/backend/dist/cli/migrateSqliteToPostgres.d.ts +2 -0
- package/backend/dist/cli/migrateSqliteToPostgres.d.ts.map +1 -0
- package/backend/dist/cli/migrateSqliteToPostgres.js +113 -0
- package/backend/dist/cli/migrateSqliteToPostgres.js.map +1 -0
- package/backend/dist/cli/recoveryBackup.d.ts +3 -0
- package/backend/dist/cli/recoveryBackup.d.ts.map +1 -0
- package/backend/dist/cli/recoveryBackup.js +251 -0
- package/backend/dist/cli/recoveryBackup.js.map +1 -0
- package/backend/dist/cli/recoveryInventory.d.ts +2 -0
- package/backend/dist/cli/recoveryInventory.d.ts.map +1 -0
- package/backend/dist/cli/recoveryInventory.js +109 -0
- package/backend/dist/cli/recoveryInventory.js.map +1 -0
- package/backend/dist/db.d.ts +27 -0
- package/backend/dist/db.d.ts.map +1 -1
- package/backend/dist/db.js +333 -16
- package/backend/dist/db.js.map +1 -1
- package/backend/dist/env.d.ts.map +1 -1
- package/backend/dist/env.js +12 -2
- package/backend/dist/env.js.map +1 -1
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +235 -47
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/main.d.ts +2 -0
- package/backend/dist/main.d.ts.map +1 -0
- package/backend/dist/main.js +137 -0
- package/backend/dist/main.js.map +1 -0
- package/backend/dist/middleware/auth.d.ts.map +1 -1
- package/backend/dist/middleware/auth.js +7 -3
- package/backend/dist/middleware/auth.js.map +1 -1
- package/backend/dist/middleware/chatCancellationAdmission.d.ts +7 -0
- package/backend/dist/middleware/chatCancellationAdmission.d.ts.map +1 -0
- package/backend/dist/middleware/chatCancellationAdmission.js +17 -0
- package/backend/dist/middleware/chatCancellationAdmission.js.map +1 -0
- package/backend/dist/middleware/coordinatedRateLimit.d.ts +18 -0
- package/backend/dist/middleware/coordinatedRateLimit.d.ts.map +1 -0
- package/backend/dist/middleware/coordinatedRateLimit.js +52 -0
- package/backend/dist/middleware/coordinatedRateLimit.js.map +1 -0
- package/backend/dist/middleware/sharedRateLimit.d.ts +26 -0
- package/backend/dist/middleware/sharedRateLimit.d.ts.map +1 -0
- package/backend/dist/middleware/sharedRateLimit.js +99 -0
- package/backend/dist/middleware/sharedRateLimit.js.map +1 -0
- package/backend/dist/models/personaModel.d.ts +1 -26
- package/backend/dist/models/personaModel.d.ts.map +1 -1
- package/backend/dist/models/personaModel.js +54 -247
- package/backend/dist/models/personaModel.js.map +1 -1
- package/backend/dist/models/userModel.d.ts +23 -66
- package/backend/dist/models/userModel.d.ts.map +1 -1
- package/backend/dist/models/userModel.js +110 -187
- package/backend/dist/models/userModel.js.map +1 -1
- package/backend/dist/persistence/chatGenerationTypes.d.ts +24 -0
- package/backend/dist/persistence/chatGenerationTypes.d.ts.map +1 -0
- package/backend/dist/persistence/chatGenerationTypes.js +7 -0
- package/backend/dist/persistence/chatGenerationTypes.js.map +1 -0
- package/backend/dist/persistence/extensionTypes.d.ts +185 -0
- package/backend/dist/persistence/extensionTypes.d.ts.map +1 -0
- package/backend/dist/persistence/extensionTypes.js +13 -0
- package/backend/dist/persistence/extensionTypes.js.map +1 -0
- package/backend/dist/persistence/identityDeletionTypes.d.ts +16 -0
- package/backend/dist/persistence/identityDeletionTypes.d.ts.map +1 -0
- package/backend/dist/persistence/identityDeletionTypes.js +7 -0
- package/backend/dist/persistence/identityDeletionTypes.js.map +1 -0
- package/backend/dist/persistence/index.d.ts +48 -0
- package/backend/dist/persistence/index.d.ts.map +1 -0
- package/backend/dist/persistence/index.js +159 -0
- package/backend/dist/persistence/index.js.map +1 -0
- package/backend/dist/persistence/postgresConfig.d.ts +32 -0
- package/backend/dist/persistence/postgresConfig.d.ts.map +1 -0
- package/backend/dist/persistence/postgresConfig.js +91 -0
- package/backend/dist/persistence/postgresConfig.js.map +1 -0
- package/backend/dist/persistence/postgresCoreMigration.d.ts +8 -0
- package/backend/dist/persistence/postgresCoreMigration.d.ts.map +1 -0
- package/backend/dist/persistence/postgresCoreMigration.js +179 -0
- package/backend/dist/persistence/postgresCoreMigration.js.map +1 -0
- package/backend/dist/persistence/postgresDatabase.d.ts +40 -0
- package/backend/dist/persistence/postgresDatabase.d.ts.map +1 -0
- package/backend/dist/persistence/postgresDatabase.js +148 -0
- package/backend/dist/persistence/postgresDatabase.js.map +1 -0
- package/backend/dist/persistence/postgresExtensionMigration.d.ts +4 -0
- package/backend/dist/persistence/postgresExtensionMigration.d.ts.map +1 -0
- package/backend/dist/persistence/postgresExtensionMigration.js +143 -0
- package/backend/dist/persistence/postgresExtensionMigration.js.map +1 -0
- package/backend/dist/persistence/postgresExtensionRepositories.d.ts +6 -0
- package/backend/dist/persistence/postgresExtensionRepositories.d.ts.map +1 -0
- package/backend/dist/persistence/postgresExtensionRepositories.js +550 -0
- package/backend/dist/persistence/postgresExtensionRepositories.js.map +1 -0
- package/backend/dist/persistence/postgresImportState.d.ts +9 -0
- package/backend/dist/persistence/postgresImportState.d.ts.map +1 -0
- package/backend/dist/persistence/postgresImportState.js +64 -0
- package/backend/dist/persistence/postgresImportState.js.map +1 -0
- package/backend/dist/persistence/postgresMigrationRegistry.d.ts +4 -0
- package/backend/dist/persistence/postgresMigrationRegistry.d.ts.map +1 -0
- package/backend/dist/persistence/postgresMigrationRegistry.js +33 -0
- package/backend/dist/persistence/postgresMigrationRegistry.js.map +1 -0
- package/backend/dist/persistence/postgresMigrationTypes.d.ts +24 -0
- package/backend/dist/persistence/postgresMigrationTypes.d.ts.map +1 -0
- package/backend/dist/persistence/postgresMigrationTypes.js +7 -0
- package/backend/dist/persistence/postgresMigrationTypes.js.map +1 -0
- package/backend/dist/persistence/postgresMigrations.d.ts +15 -0
- package/backend/dist/persistence/postgresMigrations.d.ts.map +1 -0
- package/backend/dist/persistence/postgresMigrations.js +333 -0
- package/backend/dist/persistence/postgresMigrations.js.map +1 -0
- package/backend/dist/persistence/postgresPersistence.d.ts +17 -0
- package/backend/dist/persistence/postgresPersistence.d.ts.map +1 -0
- package/backend/dist/persistence/postgresPersistence.js +332 -0
- package/backend/dist/persistence/postgresPersistence.js.map +1 -0
- package/backend/dist/persistence/postgresPluginDefinitionMigration.d.ts +4 -0
- package/backend/dist/persistence/postgresPluginDefinitionMigration.d.ts.map +1 -0
- package/backend/dist/persistence/postgresPluginDefinitionMigration.js +40 -0
- package/backend/dist/persistence/postgresPluginDefinitionMigration.js.map +1 -0
- package/backend/dist/persistence/postgresResourceRepositories.d.ts +7 -0
- package/backend/dist/persistence/postgresResourceRepositories.d.ts.map +1 -0
- package/backend/dist/persistence/postgresResourceRepositories.js +776 -0
- package/backend/dist/persistence/postgresResourceRepositories.js.map +1 -0
- package/backend/dist/persistence/postgresSchemaInspector.d.ts +14 -0
- package/backend/dist/persistence/postgresSchemaInspector.d.ts.map +1 -0
- package/backend/dist/persistence/postgresSchemaInspector.js +817 -0
- package/backend/dist/persistence/postgresSchemaInspector.js.map +1 -0
- package/backend/dist/persistence/resourceTypes.d.ts +207 -0
- package/backend/dist/persistence/resourceTypes.d.ts.map +1 -0
- package/backend/dist/persistence/resourceTypes.js +38 -0
- package/backend/dist/persistence/resourceTypes.js.map +1 -0
- package/backend/dist/persistence/sqliteExtensionRepositories.d.ts +4 -0
- package/backend/dist/persistence/sqliteExtensionRepositories.d.ts.map +1 -0
- package/backend/dist/persistence/sqliteExtensionRepositories.js +494 -0
- package/backend/dist/persistence/sqliteExtensionRepositories.js.map +1 -0
- package/backend/dist/persistence/sqliteMigrations.d.ts +93 -0
- package/backend/dist/persistence/sqliteMigrations.d.ts.map +1 -0
- package/backend/dist/persistence/sqliteMigrations.js +2232 -0
- package/backend/dist/persistence/sqliteMigrations.js.map +1 -0
- package/backend/dist/persistence/sqlitePersistence.d.ts +23 -0
- package/backend/dist/persistence/sqlitePersistence.d.ts.map +1 -0
- package/backend/dist/persistence/sqlitePersistence.js +596 -0
- package/backend/dist/persistence/sqlitePersistence.js.map +1 -0
- package/backend/dist/persistence/sqliteResourceRepositories.d.ts +4 -0
- package/backend/dist/persistence/sqliteResourceRepositories.d.ts.map +1 -0
- package/backend/dist/persistence/sqliteResourceRepositories.js +663 -0
- package/backend/dist/persistence/sqliteResourceRepositories.js.map +1 -0
- package/backend/dist/persistence/sqliteSyncExecutor.d.ts +5 -0
- package/backend/dist/persistence/sqliteSyncExecutor.d.ts.map +1 -0
- package/backend/dist/persistence/sqliteSyncExecutor.js +19 -0
- package/backend/dist/persistence/sqliteSyncExecutor.js.map +1 -0
- package/backend/dist/persistence/sqliteToPostgresMigration.d.ts +80 -0
- package/backend/dist/persistence/sqliteToPostgresMigration.d.ts.map +1 -0
- package/backend/dist/persistence/sqliteToPostgresMigration.js +1543 -0
- package/backend/dist/persistence/sqliteToPostgresMigration.js.map +1 -0
- package/backend/dist/persistence/types.d.ts +131 -0
- package/backend/dist/persistence/types.d.ts.map +1 -0
- package/backend/dist/persistence/types.js +18 -0
- package/backend/dist/persistence/types.js.map +1 -0
- package/backend/dist/persistence/voiceProfileNameLookup.d.ts +9 -0
- package/backend/dist/persistence/voiceProfileNameLookup.d.ts.map +1 -0
- package/backend/dist/persistence/voiceProfileNameLookup.js +15 -0
- package/backend/dist/persistence/voiceProfileNameLookup.js.map +1 -0
- package/backend/dist/platform/coordination/index.d.ts +7 -0
- package/backend/dist/platform/coordination/index.d.ts.map +1 -0
- package/backend/dist/platform/coordination/index.js +24 -0
- package/backend/dist/platform/coordination/index.js.map +1 -0
- package/backend/dist/platform/coordination/localCoordinator.d.ts +49 -0
- package/backend/dist/platform/coordination/localCoordinator.d.ts.map +1 -0
- package/backend/dist/platform/coordination/localCoordinator.js +380 -0
- package/backend/dist/platform/coordination/localCoordinator.js.map +1 -0
- package/backend/dist/platform/coordination/redisCoordinator.d.ts +83 -0
- package/backend/dist/platform/coordination/redisCoordinator.d.ts.map +1 -0
- package/backend/dist/platform/coordination/redisCoordinator.js +726 -0
- package/backend/dist/platform/coordination/redisCoordinator.js.map +1 -0
- package/backend/dist/platform/coordination/service.d.ts +11 -0
- package/backend/dist/platform/coordination/service.d.ts.map +1 -0
- package/backend/dist/platform/coordination/service.js +55 -0
- package/backend/dist/platform/coordination/service.js.map +1 -0
- package/backend/dist/platform/coordination/sharedAdmission.d.ts +53 -0
- package/backend/dist/platform/coordination/sharedAdmission.d.ts.map +1 -0
- package/backend/dist/platform/coordination/sharedAdmission.js +194 -0
- package/backend/dist/platform/coordination/sharedAdmission.js.map +1 -0
- package/backend/dist/platform/coordination/types.d.ts +76 -0
- package/backend/dist/platform/coordination/types.d.ts.map +1 -0
- package/backend/dist/platform/coordination/types.js +32 -0
- package/backend/dist/platform/coordination/types.js.map +1 -0
- package/backend/dist/platform/events/durableEventGateway.d.ts +54 -0
- package/backend/dist/platform/events/durableEventGateway.d.ts.map +1 -0
- package/backend/dist/platform/events/durableEventGateway.js +262 -0
- package/backend/dist/platform/events/durableEventGateway.js.map +1 -0
- package/backend/dist/platform/events/index.d.ts +3 -0
- package/backend/dist/platform/events/index.d.ts.map +1 -0
- package/backend/dist/platform/events/index.js +8 -0
- package/backend/dist/platform/events/index.js.map +1 -0
- package/backend/dist/platform/events/service.d.ts +8 -0
- package/backend/dist/platform/events/service.d.ts.map +1 -0
- package/backend/dist/platform/events/service.js +25 -0
- package/backend/dist/platform/events/service.js.map +1 -0
- package/backend/dist/platform/jobs/chatGenerationEnqueuer.d.ts +3 -0
- package/backend/dist/platform/jobs/chatGenerationEnqueuer.d.ts.map +1 -0
- package/backend/dist/platform/jobs/chatGenerationEnqueuer.js +55 -0
- package/backend/dist/platform/jobs/chatGenerationEnqueuer.js.map +1 -0
- package/backend/dist/platform/jobs/documentIngestionEnqueuer.d.ts +3 -0
- package/backend/dist/platform/jobs/documentIngestionEnqueuer.d.ts.map +1 -0
- package/backend/dist/platform/jobs/documentIngestionEnqueuer.js +38 -0
- package/backend/dist/platform/jobs/documentIngestionEnqueuer.js.map +1 -0
- package/backend/dist/platform/jobs/domainJobContracts.d.ts +30 -0
- package/backend/dist/platform/jobs/domainJobContracts.d.ts.map +1 -0
- package/backend/dist/platform/jobs/domainJobContracts.js +53 -0
- package/backend/dist/platform/jobs/domainJobContracts.js.map +1 -0
- package/backend/dist/platform/jobs/domainJobHandlers.d.ts +11 -0
- package/backend/dist/platform/jobs/domainJobHandlers.d.ts.map +1 -0
- package/backend/dist/platform/jobs/domainJobHandlers.js +612 -0
- package/backend/dist/platform/jobs/domainJobHandlers.js.map +1 -0
- package/backend/dist/platform/jobs/durableEventIdentity.d.ts +8 -0
- package/backend/dist/platform/jobs/durableEventIdentity.d.ts.map +1 -0
- package/backend/dist/platform/jobs/durableEventIdentity.js +33 -0
- package/backend/dist/platform/jobs/durableEventIdentity.js.map +1 -0
- package/backend/dist/platform/jobs/durableJobRuntime.d.ts +57 -0
- package/backend/dist/platform/jobs/durableJobRuntime.d.ts.map +1 -0
- package/backend/dist/platform/jobs/durableJobRuntime.js +131 -0
- package/backend/dist/platform/jobs/durableJobRuntime.js.map +1 -0
- package/backend/dist/platform/jobs/durableJobRuntimeBackend.d.ts +28 -0
- package/backend/dist/platform/jobs/durableJobRuntimeBackend.d.ts.map +1 -0
- package/backend/dist/platform/jobs/durableJobRuntimeBackend.js +62 -0
- package/backend/dist/platform/jobs/durableJobRuntimeBackend.js.map +1 -0
- package/backend/dist/platform/jobs/durableJobService.d.ts +85 -0
- package/backend/dist/platform/jobs/durableJobService.d.ts.map +1 -0
- package/backend/dist/platform/jobs/durableJobService.js +726 -0
- package/backend/dist/platform/jobs/durableJobService.js.map +1 -0
- package/backend/dist/platform/jobs/durableJobTypes.d.ts +195 -0
- package/backend/dist/platform/jobs/durableJobTypes.d.ts.map +1 -0
- package/backend/dist/platform/jobs/durableJobTypes.js +72 -0
- package/backend/dist/platform/jobs/durableJobTypes.js.map +1 -0
- package/backend/dist/platform/jobs/embeddedDurableJobWorker.d.ts +87 -0
- package/backend/dist/platform/jobs/embeddedDurableJobWorker.d.ts.map +1 -0
- package/backend/dist/platform/jobs/embeddedDurableJobWorker.js +429 -0
- package/backend/dist/platform/jobs/embeddedDurableJobWorker.js.map +1 -0
- package/backend/dist/platform/jobs/identityDeletionEnqueuer.d.ts +3 -0
- package/backend/dist/platform/jobs/identityDeletionEnqueuer.d.ts.map +1 -0
- package/backend/dist/platform/jobs/identityDeletionEnqueuer.js +36 -0
- package/backend/dist/platform/jobs/identityDeletionEnqueuer.js.map +1 -0
- package/backend/dist/platform/jobs/index.d.ts +18 -0
- package/backend/dist/platform/jobs/index.d.ts.map +1 -0
- package/backend/dist/platform/jobs/index.js +34 -0
- package/backend/dist/platform/jobs/index.js.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableEventIdempotencyMigration.d.ts +4 -0
- package/backend/dist/platform/jobs/postgresDurableEventIdempotencyMigration.d.ts.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableEventIdempotencyMigration.js +25 -0
- package/backend/dist/platform/jobs/postgresDurableEventIdempotencyMigration.js.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableEventReplayIndexMigration.d.ts +4 -0
- package/backend/dist/platform/jobs/postgresDurableEventReplayIndexMigration.d.ts.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableEventReplayIndexMigration.js +23 -0
- package/backend/dist/platform/jobs/postgresDurableEventReplayIndexMigration.js.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableJobMigration.d.ts +11 -0
- package/backend/dist/platform/jobs/postgresDurableJobMigration.d.ts.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableJobMigration.js +106 -0
- package/backend/dist/platform/jobs/postgresDurableJobMigration.js.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableJobRepository.d.ts +88 -0
- package/backend/dist/platform/jobs/postgresDurableJobRepository.d.ts.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableJobRepository.js +1185 -0
- package/backend/dist/platform/jobs/postgresDurableJobRepository.js.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableJobService.d.ts +86 -0
- package/backend/dist/platform/jobs/postgresDurableJobService.d.ts.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableJobService.js +696 -0
- package/backend/dist/platform/jobs/postgresDurableJobService.js.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableJobWorker.d.ts +53 -0
- package/backend/dist/platform/jobs/postgresDurableJobWorker.d.ts.map +1 -0
- package/backend/dist/platform/jobs/postgresDurableJobWorker.js +393 -0
- package/backend/dist/platform/jobs/postgresDurableJobWorker.js.map +1 -0
- package/backend/dist/platform/jobs/resourceDeletionEnqueuer.d.ts +3 -0
- package/backend/dist/platform/jobs/resourceDeletionEnqueuer.d.ts.map +1 -0
- package/backend/dist/platform/jobs/resourceDeletionEnqueuer.js +43 -0
- package/backend/dist/platform/jobs/resourceDeletionEnqueuer.js.map +1 -0
- package/backend/dist/platform/jobs/sqliteDurableJobRepository.d.ts +166 -0
- package/backend/dist/platform/jobs/sqliteDurableJobRepository.d.ts.map +1 -0
- package/backend/dist/platform/jobs/sqliteDurableJobRepository.js +1008 -0
- package/backend/dist/platform/jobs/sqliteDurableJobRepository.js.map +1 -0
- package/backend/dist/platform/jobs/videoGenerationEnqueuer.d.ts +4 -0
- package/backend/dist/platform/jobs/videoGenerationEnqueuer.d.ts.map +1 -0
- package/backend/dist/platform/jobs/videoGenerationEnqueuer.js +46 -0
- package/backend/dist/platform/jobs/videoGenerationEnqueuer.js.map +1 -0
- package/backend/dist/platform/jobs/workExecutionEnqueuer.d.ts +3 -0
- package/backend/dist/platform/jobs/workExecutionEnqueuer.d.ts.map +1 -0
- package/backend/dist/platform/jobs/workExecutionEnqueuer.js +38 -0
- package/backend/dist/platform/jobs/workExecutionEnqueuer.js.map +1 -0
- package/backend/dist/platform/ollamaRuntimeConfig.d.ts +40 -0
- package/backend/dist/platform/ollamaRuntimeConfig.d.ts.map +1 -0
- package/backend/dist/platform/ollamaRuntimeConfig.js +72 -0
- package/backend/dist/platform/ollamaRuntimeConfig.js.map +1 -0
- package/backend/dist/platform/recovery/backupArchive.d.ts +120 -0
- package/backend/dist/platform/recovery/backupArchive.d.ts.map +1 -0
- package/backend/dist/platform/recovery/backupArchive.js +842 -0
- package/backend/dist/platform/recovery/backupArchive.js.map +1 -0
- package/backend/dist/platform/recovery/index.d.ts +3 -0
- package/backend/dist/platform/recovery/index.d.ts.map +1 -0
- package/backend/dist/platform/recovery/index.js +8 -0
- package/backend/dist/platform/recovery/index.js.map +1 -0
- package/backend/dist/platform/recovery/teamBackupArchive.d.ts +98 -0
- package/backend/dist/platform/recovery/teamBackupArchive.d.ts.map +1 -0
- package/backend/dist/platform/recovery/teamBackupArchive.js +1203 -0
- package/backend/dist/platform/recovery/teamBackupArchive.js.map +1 -0
- package/backend/dist/platform/runtimeConfig.d.ts +70 -0
- package/backend/dist/platform/runtimeConfig.d.ts.map +1 -0
- package/backend/dist/platform/runtimeConfig.js +205 -0
- package/backend/dist/platform/runtimeConfig.js.map +1 -0
- package/backend/dist/platform/storage/aesGcmKeyring.d.ts +26 -0
- package/backend/dist/platform/storage/aesGcmKeyring.d.ts.map +1 -0
- package/backend/dist/platform/storage/aesGcmKeyring.js +135 -0
- package/backend/dist/platform/storage/aesGcmKeyring.js.map +1 -0
- package/backend/dist/platform/storage/blobReferenceRepository.d.ts +36 -0
- package/backend/dist/platform/storage/blobReferenceRepository.d.ts.map +1 -0
- package/backend/dist/platform/storage/blobReferenceRepository.js +117 -0
- package/backend/dist/platform/storage/blobReferenceRepository.js.map +1 -0
- package/backend/dist/platform/storage/blobStore.d.ts +111 -0
- package/backend/dist/platform/storage/blobStore.d.ts.map +1 -0
- package/backend/dist/platform/storage/blobStore.js +46 -0
- package/backend/dist/platform/storage/blobStore.js.map +1 -0
- package/backend/dist/platform/storage/documentVectorIndex.d.ts +44 -0
- package/backend/dist/platform/storage/documentVectorIndex.d.ts.map +1 -0
- package/backend/dist/platform/storage/documentVectorIndex.js +110 -0
- package/backend/dist/platform/storage/documentVectorIndex.js.map +1 -0
- package/backend/dist/platform/storage/durableBlobQuotaPolicy.d.ts +82 -0
- package/backend/dist/platform/storage/durableBlobQuotaPolicy.d.ts.map +1 -0
- package/backend/dist/platform/storage/durableBlobQuotaPolicy.js +583 -0
- package/backend/dist/platform/storage/durableBlobQuotaPolicy.js.map +1 -0
- package/backend/dist/platform/storage/index.d.ts +19 -0
- package/backend/dist/platform/storage/index.d.ts.map +1 -0
- package/backend/dist/platform/storage/index.js +35 -0
- package/backend/dist/platform/storage/index.js.map +1 -0
- package/backend/dist/platform/storage/localEncryptedBlobStore.d.ts +120 -0
- package/backend/dist/platform/storage/localEncryptedBlobStore.d.ts.map +1 -0
- package/backend/dist/platform/storage/localEncryptedBlobStore.js +1205 -0
- package/backend/dist/platform/storage/localEncryptedBlobStore.js.map +1 -0
- package/backend/dist/platform/storage/personaMemoryIndexing.d.ts +12 -0
- package/backend/dist/platform/storage/personaMemoryIndexing.d.ts.map +1 -0
- package/backend/dist/platform/storage/personaMemoryIndexing.js +25 -0
- package/backend/dist/platform/storage/personaMemoryIndexing.js.map +1 -0
- package/backend/dist/platform/storage/pgVectorStore.d.ts +37 -0
- package/backend/dist/platform/storage/pgVectorStore.d.ts.map +1 -0
- package/backend/dist/platform/storage/pgVectorStore.js +493 -0
- package/backend/dist/platform/storage/pgVectorStore.js.map +1 -0
- package/backend/dist/platform/storage/platformDomainRepositories.d.ts +244 -0
- package/backend/dist/platform/storage/platformDomainRepositories.d.ts.map +1 -0
- package/backend/dist/platform/storage/platformDomainRepositories.js +7 -0
- package/backend/dist/platform/storage/platformDomainRepositories.js.map +1 -0
- package/backend/dist/platform/storage/platformStorageRuntime.d.ts +35 -0
- package/backend/dist/platform/storage/platformStorageRuntime.d.ts.map +1 -0
- package/backend/dist/platform/storage/platformStorageRuntime.js +299 -0
- package/backend/dist/platform/storage/platformStorageRuntime.js.map +1 -0
- package/backend/dist/platform/storage/postgresPlatformDomainRepositories.d.ts +4 -0
- package/backend/dist/platform/storage/postgresPlatformDomainRepositories.d.ts.map +1 -0
- package/backend/dist/platform/storage/postgresPlatformDomainRepositories.js +1017 -0
- package/backend/dist/platform/storage/postgresPlatformDomainRepositories.js.map +1 -0
- package/backend/dist/platform/storage/postgresResourceDeletionLifecycleMigration.d.ts +4 -0
- package/backend/dist/platform/storage/postgresResourceDeletionLifecycleMigration.d.ts.map +1 -0
- package/backend/dist/platform/storage/postgresResourceDeletionLifecycleMigration.js +40 -0
- package/backend/dist/platform/storage/postgresResourceDeletionLifecycleMigration.js.map +1 -0
- package/backend/dist/platform/storage/resourceContentCleanup.d.ts +29 -0
- package/backend/dist/platform/storage/resourceContentCleanup.d.ts.map +1 -0
- package/backend/dist/platform/storage/resourceContentCleanup.js +100 -0
- package/backend/dist/platform/storage/resourceContentCleanup.js.map +1 -0
- package/backend/dist/platform/storage/resourceDeletionLifecycle.d.ts +14 -0
- package/backend/dist/platform/storage/resourceDeletionLifecycle.d.ts.map +1 -0
- package/backend/dist/platform/storage/resourceDeletionLifecycle.js +31 -0
- package/backend/dist/platform/storage/resourceDeletionLifecycle.js.map +1 -0
- package/backend/dist/platform/storage/s3EncryptedBlobStore.d.ts +140 -0
- package/backend/dist/platform/storage/s3EncryptedBlobStore.d.ts.map +1 -0
- package/backend/dist/platform/storage/s3EncryptedBlobStore.js +1309 -0
- package/backend/dist/platform/storage/s3EncryptedBlobStore.js.map +1 -0
- package/backend/dist/platform/storage/sqliteEncryptedVectorStore.d.ts +71 -0
- package/backend/dist/platform/storage/sqliteEncryptedVectorStore.d.ts.map +1 -0
- package/backend/dist/platform/storage/sqliteEncryptedVectorStore.js +766 -0
- package/backend/dist/platform/storage/sqliteEncryptedVectorStore.js.map +1 -0
- package/backend/dist/platform/storage/sqlitePlatformDomainRepositories.d.ts +4 -0
- package/backend/dist/platform/storage/sqlitePlatformDomainRepositories.d.ts.map +1 -0
- package/backend/dist/platform/storage/sqlitePlatformDomainRepositories.js +1037 -0
- package/backend/dist/platform/storage/sqlitePlatformDomainRepositories.js.map +1 -0
- package/backend/dist/platform/storage/sqliteToTeamStorageMigration.d.ts +25 -0
- package/backend/dist/platform/storage/sqliteToTeamStorageMigration.d.ts.map +1 -0
- package/backend/dist/platform/storage/sqliteToTeamStorageMigration.js +1292 -0
- package/backend/dist/platform/storage/sqliteToTeamStorageMigration.js.map +1 -0
- package/backend/dist/platform/storage/storageFactory.d.ts +81 -0
- package/backend/dist/platform/storage/storageFactory.d.ts.map +1 -0
- package/backend/dist/platform/storage/storageFactory.js +518 -0
- package/backend/dist/platform/storage/storageFactory.js.map +1 -0
- package/backend/dist/platform/storage/storageSchemaContracts.d.ts +22 -0
- package/backend/dist/platform/storage/storageSchemaContracts.d.ts.map +1 -0
- package/backend/dist/platform/storage/storageSchemaContracts.js +299 -0
- package/backend/dist/platform/storage/storageSchemaContracts.js.map +1 -0
- package/backend/dist/platform/storage/vectorStore.d.ts +117 -0
- package/backend/dist/platform/storage/vectorStore.d.ts.map +1 -0
- package/backend/dist/platform/storage/vectorStore.js +40 -0
- package/backend/dist/platform/storage/vectorStore.js.map +1 -0
- package/backend/dist/platform/workPersistence/index.d.ts +9 -0
- package/backend/dist/platform/workPersistence/index.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/index.js +14 -0
- package/backend/dist/platform/workPersistence/index.js.map +1 -0
- package/backend/dist/platform/workPersistence/postgresWorkLifecycleMigration.d.ts +9 -0
- package/backend/dist/platform/workPersistence/postgresWorkLifecycleMigration.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/postgresWorkLifecycleMigration.js +47 -0
- package/backend/dist/platform/workPersistence/postgresWorkLifecycleMigration.js.map +1 -0
- package/backend/dist/platform/workPersistence/postgresWorkMessageContentMigration.d.ts +3 -0
- package/backend/dist/platform/workPersistence/postgresWorkMessageContentMigration.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/postgresWorkMessageContentMigration.js +28 -0
- package/backend/dist/platform/workPersistence/postgresWorkMessageContentMigration.js.map +1 -0
- package/backend/dist/platform/workPersistence/postgresWorkMigration.d.ts +3 -0
- package/backend/dist/platform/workPersistence/postgresWorkMigration.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/postgresWorkMigration.js +101 -0
- package/backend/dist/platform/workPersistence/postgresWorkMigration.js.map +1 -0
- package/backend/dist/platform/workPersistence/postgresWorkPersistence.d.ts +79 -0
- package/backend/dist/platform/workPersistence/postgresWorkPersistence.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/postgresWorkPersistence.js +521 -0
- package/backend/dist/platform/workPersistence/postgresWorkPersistence.js.map +1 -0
- package/backend/dist/platform/workPersistence/service.d.ts +6 -0
- package/backend/dist/platform/workPersistence/service.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/service.js +27 -0
- package/backend/dist/platform/workPersistence/service.js.map +1 -0
- package/backend/dist/platform/workPersistence/sqliteWorkPersistence.d.ts +77 -0
- package/backend/dist/platform/workPersistence/sqliteWorkPersistence.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/sqliteWorkPersistence.js +463 -0
- package/backend/dist/platform/workPersistence/sqliteWorkPersistence.js.map +1 -0
- package/backend/dist/platform/workPersistence/types.d.ts +159 -0
- package/backend/dist/platform/workPersistence/types.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/types.js +13 -0
- package/backend/dist/platform/workPersistence/types.js.map +1 -0
- package/backend/dist/platform/workPersistence/workExecutionTypes.d.ts +13 -0
- package/backend/dist/platform/workPersistence/workExecutionTypes.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/workExecutionTypes.js +7 -0
- package/backend/dist/platform/workPersistence/workExecutionTypes.js.map +1 -0
- package/backend/dist/platform/workPersistence/workMessageContentCodec.d.ts +8 -0
- package/backend/dist/platform/workPersistence/workMessageContentCodec.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/workMessageContentCodec.js +25 -0
- package/backend/dist/platform/workPersistence/workMessageContentCodec.js.map +1 -0
- package/backend/dist/platform/workPersistence/workTextSafety.d.ts +3 -0
- package/backend/dist/platform/workPersistence/workTextSafety.d.ts.map +1 -0
- package/backend/dist/platform/workPersistence/workTextSafety.js +8 -0
- package/backend/dist/platform/workPersistence/workTextSafety.js.map +1 -0
- package/backend/dist/routes/agentCli.js +1 -1
- package/backend/dist/routes/agentCli.js.map +1 -1
- package/backend/dist/routes/artifacts.d.ts.map +1 -1
- package/backend/dist/routes/artifacts.js +2 -1
- package/backend/dist/routes/artifacts.js.map +1 -1
- package/backend/dist/routes/auth.d.ts.map +1 -1
- package/backend/dist/routes/auth.js +64 -18
- package/backend/dist/routes/auth.js.map +1 -1
- package/backend/dist/routes/chat.d.ts.map +1 -1
- package/backend/dist/routes/chat.js +519 -85
- package/backend/dist/routes/chat.js.map +1 -1
- package/backend/dist/routes/documents.d.ts.map +1 -1
- package/backend/dist/routes/documents.js +134 -28
- package/backend/dist/routes/documents.js.map +1 -1
- package/backend/dist/routes/embeddings.d.ts.map +1 -1
- package/backend/dist/routes/embeddings.js +2 -1
- package/backend/dist/routes/embeddings.js.map +1 -1
- package/backend/dist/routes/health.d.ts +3 -0
- package/backend/dist/routes/health.d.ts.map +1 -0
- package/backend/dist/routes/health.js +52 -0
- package/backend/dist/routes/health.js.map +1 -0
- package/backend/dist/routes/huggingfaceHub.d.ts.map +1 -1
- package/backend/dist/routes/huggingfaceHub.js +2 -1
- package/backend/dist/routes/huggingfaceHub.js.map +1 -1
- package/backend/dist/routes/imageGen.d.ts.map +1 -1
- package/backend/dist/routes/imageGen.js +42 -10
- package/backend/dist/routes/imageGen.js.map +1 -1
- package/backend/dist/routes/jobs.d.ts +3 -0
- package/backend/dist/routes/jobs.d.ts.map +1 -0
- package/backend/dist/routes/jobs.js +117 -0
- package/backend/dist/routes/jobs.js.map +1 -0
- package/backend/dist/routes/libreClaw.d.ts.map +1 -1
- package/backend/dist/routes/libreClaw.js +10 -7
- package/backend/dist/routes/libreClaw.js.map +1 -1
- package/backend/dist/routes/media.d.ts.map +1 -1
- package/backend/dist/routes/media.js +523 -77
- package/backend/dist/routes/media.js.map +1 -1
- package/backend/dist/routes/notes.d.ts.map +1 -1
- package/backend/dist/routes/notes.js +21 -21
- package/backend/dist/routes/notes.js.map +1 -1
- package/backend/dist/routes/ollama.d.ts.map +1 -1
- package/backend/dist/routes/ollama.js +40 -12
- package/backend/dist/routes/ollama.js.map +1 -1
- package/backend/dist/routes/personas.d.ts.map +1 -1
- package/backend/dist/routes/personas.js +4 -2
- package/backend/dist/routes/personas.js.map +1 -1
- package/backend/dist/routes/plugins.d.ts.map +1 -1
- package/backend/dist/routes/plugins.js +79 -51
- package/backend/dist/routes/plugins.js.map +1 -1
- package/backend/dist/routes/preferences.d.ts.map +1 -1
- package/backend/dist/routes/preferences.js +290 -25
- package/backend/dist/routes/preferences.js.map +1 -1
- package/backend/dist/routes/search.d.ts.map +1 -1
- package/backend/dist/routes/search.js +23 -14
- package/backend/dist/routes/search.js.map +1 -1
- package/backend/dist/routes/stt.d.ts +9 -0
- package/backend/dist/routes/stt.d.ts.map +1 -0
- package/backend/dist/routes/stt.js +217 -0
- package/backend/dist/routes/stt.js.map +1 -0
- package/backend/dist/routes/systemDiagnostics.d.ts.map +1 -1
- package/backend/dist/routes/systemDiagnostics.js +2 -1
- package/backend/dist/routes/systemDiagnostics.js.map +1 -1
- package/backend/dist/routes/tts.d.ts.map +1 -1
- package/backend/dist/routes/tts.js +577 -28
- package/backend/dist/routes/tts.js.map +1 -1
- package/backend/dist/routes/users.d.ts.map +1 -1
- package/backend/dist/routes/users.js +16 -25
- package/backend/dist/routes/users.js.map +1 -1
- package/backend/dist/routes/work.d.ts.map +1 -1
- package/backend/dist/routes/work.js +167 -113
- package/backend/dist/routes/work.js.map +1 -1
- package/backend/dist/services/agentAccessService.d.ts +2 -2
- package/backend/dist/services/agentAccessService.d.ts.map +1 -1
- package/backend/dist/services/agentAccessService.js +5 -14
- package/backend/dist/services/agentAccessService.js.map +1 -1
- package/backend/dist/services/agentCliService.d.ts +3 -2
- package/backend/dist/services/agentCliService.d.ts.map +1 -1
- package/backend/dist/services/agentCliService.js +44 -16
- package/backend/dist/services/agentCliService.js.map +1 -1
- package/backend/dist/services/assistantCompletionService.d.ts +2 -1
- package/backend/dist/services/assistantCompletionService.d.ts.map +1 -1
- package/backend/dist/services/assistantCompletionService.js +7 -3
- package/backend/dist/services/assistantCompletionService.js.map +1 -1
- package/backend/dist/services/authService.d.ts +7 -2
- package/backend/dist/services/authService.d.ts.map +1 -1
- package/backend/dist/services/authService.js +23 -10
- package/backend/dist/services/authService.js.map +1 -1
- package/backend/dist/services/chatGenerationService.d.ts +5 -4
- package/backend/dist/services/chatGenerationService.d.ts.map +1 -1
- package/backend/dist/services/chatGenerationService.js +23 -17
- package/backend/dist/services/chatGenerationService.js.map +1 -1
- package/backend/dist/services/chatRequestService.d.ts +4 -3
- package/backend/dist/services/chatRequestService.d.ts.map +1 -1
- package/backend/dist/services/chatRequestService.js +3 -3
- package/backend/dist/services/chatRequestService.js.map +1 -1
- package/backend/dist/services/chatService.d.ts +66 -16
- package/backend/dist/services/chatService.d.ts.map +1 -1
- package/backend/dist/services/chatService.js +402 -111
- package/backend/dist/services/chatService.js.map +1 -1
- package/backend/dist/services/codexOAuthService.d.ts +2 -2
- package/backend/dist/services/codexOAuthService.d.ts.map +1 -1
- package/backend/dist/services/codexOAuthService.js +63 -7
- package/backend/dist/services/codexOAuthService.js.map +1 -1
- package/backend/dist/services/dataArchiveService.d.ts +88 -0
- package/backend/dist/services/dataArchiveService.d.ts.map +1 -0
- package/backend/dist/services/dataArchiveService.js +1027 -0
- package/backend/dist/services/dataArchiveService.js.map +1 -0
- package/backend/dist/services/documentService.d.ts +67 -14
- package/backend/dist/services/documentService.d.ts.map +1 -1
- package/backend/dist/services/documentService.js +938 -193
- package/backend/dist/services/documentService.js.map +1 -1
- package/backend/dist/services/durableChatCompletion.d.ts +16 -0
- package/backend/dist/services/durableChatCompletion.d.ts.map +1 -0
- package/backend/dist/services/durableChatCompletion.js +34 -0
- package/backend/dist/services/durableChatCompletion.js.map +1 -0
- package/backend/dist/services/durableChatGenerationService.d.ts +19 -0
- package/backend/dist/services/durableChatGenerationService.d.ts.map +1 -0
- package/backend/dist/services/durableChatGenerationService.js +341 -0
- package/backend/dist/services/durableChatGenerationService.js.map +1 -0
- package/backend/dist/services/embeddingService.d.ts +1 -1
- package/backend/dist/services/embeddingService.d.ts.map +1 -1
- package/backend/dist/services/embeddingService.js +16 -13
- package/backend/dist/services/embeddingService.js.map +1 -1
- package/backend/dist/services/encryptionService.d.ts +28 -1
- package/backend/dist/services/encryptionService.d.ts.map +1 -1
- package/backend/dist/services/encryptionService.js +131 -51
- package/backend/dist/services/encryptionService.js.map +1 -1
- package/backend/dist/services/followUpService.d.ts +1 -1
- package/backend/dist/services/followUpService.d.ts.map +1 -1
- package/backend/dist/services/followUpService.js +1 -1
- package/backend/dist/services/followUpService.js.map +1 -1
- package/backend/dist/services/galleryService.d.ts +38 -37
- package/backend/dist/services/galleryService.d.ts.map +1 -1
- package/backend/dist/services/galleryService.js +356 -251
- package/backend/dist/services/galleryService.js.map +1 -1
- package/backend/dist/services/healthService.d.ts +65 -0
- package/backend/dist/services/healthService.d.ts.map +1 -0
- package/backend/dist/services/healthService.js +379 -0
- package/backend/dist/services/healthService.js.map +1 -0
- package/backend/dist/services/legacyCiphertextIntegrity.d.ts +40 -0
- package/backend/dist/services/legacyCiphertextIntegrity.d.ts.map +1 -0
- package/backend/dist/services/legacyCiphertextIntegrity.js +406 -0
- package/backend/dist/services/legacyCiphertextIntegrity.js.map +1 -0
- package/backend/dist/services/mediaGenerationJobService.d.ts +27 -5
- package/backend/dist/services/mediaGenerationJobService.d.ts.map +1 -1
- package/backend/dist/services/mediaGenerationJobService.js +185 -55
- package/backend/dist/services/mediaGenerationJobService.js.map +1 -1
- package/backend/dist/services/memoryService.d.ts +7 -83
- package/backend/dist/services/memoryService.d.ts.map +1 -1
- package/backend/dist/services/memoryService.js +428 -573
- package/backend/dist/services/memoryService.js.map +1 -1
- package/backend/dist/services/memoryUtils.d.ts.map +1 -1
- package/backend/dist/services/memoryUtils.js +8 -1
- package/backend/dist/services/memoryUtils.js.map +1 -1
- package/backend/dist/services/modelAccessService.d.ts +3 -3
- package/backend/dist/services/modelAccessService.d.ts.map +1 -1
- package/backend/dist/services/modelAccessService.js +8 -16
- package/backend/dist/services/modelAccessService.js.map +1 -1
- package/backend/dist/services/mutationEngineService.d.ts +0 -7
- package/backend/dist/services/mutationEngineService.d.ts.map +1 -1
- package/backend/dist/services/mutationEngineService.js +7 -78
- package/backend/dist/services/mutationEngineService.js.map +1 -1
- package/backend/dist/services/ollamaService.d.ts +4 -4
- package/backend/dist/services/ollamaService.d.ts.map +1 -1
- package/backend/dist/services/ollamaService.js +62 -31
- package/backend/dist/services/ollamaService.js.map +1 -1
- package/backend/dist/services/personaService.d.ts.map +1 -1
- package/backend/dist/services/personaService.js +19 -54
- package/backend/dist/services/personaService.js.map +1 -1
- package/backend/dist/services/pluginActivationService.d.ts +6 -5
- package/backend/dist/services/pluginActivationService.d.ts.map +1 -1
- package/backend/dist/services/pluginActivationService.js +36 -76
- package/backend/dist/services/pluginActivationService.js.map +1 -1
- package/backend/dist/services/pluginAudioGenerationService.d.ts +11 -6
- package/backend/dist/services/pluginAudioGenerationService.d.ts.map +1 -1
- package/backend/dist/services/pluginAudioGenerationService.js +74 -16
- package/backend/dist/services/pluginAudioGenerationService.js.map +1 -1
- package/backend/dist/services/pluginCacheInvalidation.d.ts +38 -0
- package/backend/dist/services/pluginCacheInvalidation.d.ts.map +1 -0
- package/backend/dist/services/pluginCacheInvalidation.js +198 -0
- package/backend/dist/services/pluginCacheInvalidation.js.map +1 -0
- package/backend/dist/services/pluginCapabilityRegistryService.d.ts +3 -3
- package/backend/dist/services/pluginCapabilityRegistryService.d.ts.map +1 -1
- package/backend/dist/services/pluginCapabilityRegistryService.js +11 -7
- package/backend/dist/services/pluginCapabilityRegistryService.js.map +1 -1
- package/backend/dist/services/pluginCredentialsService.d.ts +9 -8
- package/backend/dist/services/pluginCredentialsService.d.ts.map +1 -1
- package/backend/dist/services/pluginCredentialsService.js +48 -89
- package/backend/dist/services/pluginCredentialsService.js.map +1 -1
- package/backend/dist/services/pluginEmbeddingService.d.ts +8 -7
- package/backend/dist/services/pluginEmbeddingService.d.ts.map +1 -1
- package/backend/dist/services/pluginEmbeddingService.js +13 -11
- package/backend/dist/services/pluginEmbeddingService.js.map +1 -1
- package/backend/dist/services/pluginImageGenerationService.d.ts +10 -8
- package/backend/dist/services/pluginImageGenerationService.d.ts.map +1 -1
- package/backend/dist/services/pluginImageGenerationService.js +119 -14
- package/backend/dist/services/pluginImageGenerationService.js.map +1 -1
- package/backend/dist/services/pluginSTTService.d.ts +47 -0
- package/backend/dist/services/pluginSTTService.d.ts.map +1 -0
- package/backend/dist/services/pluginSTTService.js +199 -0
- package/backend/dist/services/pluginSTTService.js.map +1 -0
- package/backend/dist/services/pluginService.d.ts +94 -40
- package/backend/dist/services/pluginService.d.ts.map +1 -1
- package/backend/dist/services/pluginService.js +799 -274
- package/backend/dist/services/pluginService.js.map +1 -1
- package/backend/dist/services/pluginTTSService.d.ts +26 -8
- package/backend/dist/services/pluginTTSService.d.ts.map +1 -1
- package/backend/dist/services/pluginTTSService.js +277 -25
- package/backend/dist/services/pluginTTSService.js.map +1 -1
- package/backend/dist/services/pluginUsageService.d.ts +4 -4
- package/backend/dist/services/pluginUsageService.d.ts.map +1 -1
- package/backend/dist/services/pluginUsageService.js +44 -93
- package/backend/dist/services/pluginUsageService.js.map +1 -1
- package/backend/dist/services/pluginVariablesService.d.ts +14 -7
- package/backend/dist/services/pluginVariablesService.d.ts.map +1 -1
- package/backend/dist/services/pluginVariablesService.js +116 -81
- package/backend/dist/services/pluginVariablesService.js.map +1 -1
- package/backend/dist/services/pluginVideoGenerationService.d.ts +19 -8
- package/backend/dist/services/pluginVideoGenerationService.d.ts.map +1 -1
- package/backend/dist/services/pluginVideoGenerationService.js +116 -20
- package/backend/dist/services/pluginVideoGenerationService.js.map +1 -1
- package/backend/dist/services/preferencesService.d.ts +31 -21
- package/backend/dist/services/preferencesService.d.ts.map +1 -1
- package/backend/dist/services/preferencesService.js +104 -102
- package/backend/dist/services/preferencesService.js.map +1 -1
- package/backend/dist/services/recoveryInventoryService.d.ts +244 -0
- package/backend/dist/services/recoveryInventoryService.d.ts.map +1 -0
- package/backend/dist/services/recoveryInventoryService.js +1436 -0
- package/backend/dist/services/recoveryInventoryService.js.map +1 -0
- package/backend/dist/services/simpleGitHubOAuth.js +3 -3
- package/backend/dist/services/simpleGitHubOAuth.js.map +1 -1
- package/backend/dist/services/simpleHuggingFaceOAuth.d.ts.map +1 -1
- package/backend/dist/services/simpleHuggingFaceOAuth.js +3 -3
- package/backend/dist/services/simpleHuggingFaceOAuth.js.map +1 -1
- package/backend/dist/services/systemDiagnosticsService.d.ts.map +1 -1
- package/backend/dist/services/systemDiagnosticsService.js +2 -2
- package/backend/dist/services/systemDiagnosticsService.js.map +1 -1
- package/backend/dist/services/systemSettingsService.d.ts +5 -0
- package/backend/dist/services/systemSettingsService.d.ts.map +1 -0
- package/backend/dist/services/systemSettingsService.js +24 -0
- package/backend/dist/services/systemSettingsService.js.map +1 -0
- package/backend/dist/services/titleGenerationService.d.ts +1 -1
- package/backend/dist/services/titleGenerationService.d.ts.map +1 -1
- package/backend/dist/services/titleGenerationService.js +1 -1
- package/backend/dist/services/titleGenerationService.js.map +1 -1
- package/backend/dist/services/voiceProfileService.d.ts +44 -0
- package/backend/dist/services/voiceProfileService.d.ts.map +1 -0
- package/backend/dist/services/voiceProfileService.js +195 -0
- package/backend/dist/services/voiceProfileService.js.map +1 -0
- package/backend/dist/services/webSearchService.d.ts +7 -7
- package/backend/dist/services/webSearchService.d.ts.map +1 -1
- package/backend/dist/services/webSearchService.js +40 -35
- package/backend/dist/services/webSearchService.js.map +1 -1
- package/backend/dist/services/websocketTicketService.d.ts +39 -0
- package/backend/dist/services/websocketTicketService.d.ts.map +1 -0
- package/backend/dist/services/websocketTicketService.js +183 -0
- package/backend/dist/services/websocketTicketService.js.map +1 -0
- package/backend/dist/services/workAccessService.d.ts +3 -3
- package/backend/dist/services/workAccessService.d.ts.map +1 -1
- package/backend/dist/services/workAccessService.js +8 -16
- package/backend/dist/services/workAccessService.js.map +1 -1
- package/backend/dist/services/workAdminService.d.ts +3 -3
- package/backend/dist/services/workAdminService.d.ts.map +1 -1
- package/backend/dist/services/workAdminService.js +4 -4
- package/backend/dist/services/workAdminService.js.map +1 -1
- package/backend/dist/services/workAgentService.d.ts +25 -1
- package/backend/dist/services/workAgentService.d.ts.map +1 -1
- package/backend/dist/services/workAgentService.js +294 -126
- package/backend/dist/services/workAgentService.js.map +1 -1
- package/backend/dist/services/workEventService.d.ts +15 -2
- package/backend/dist/services/workEventService.d.ts.map +1 -1
- package/backend/dist/services/workEventService.js +201 -3
- package/backend/dist/services/workEventService.js.map +1 -1
- package/backend/dist/services/workKubernetesDriver.d.ts +8 -7
- package/backend/dist/services/workKubernetesDriver.d.ts.map +1 -1
- package/backend/dist/services/workKubernetesDriver.js +65 -21
- package/backend/dist/services/workKubernetesDriver.js.map +1 -1
- package/backend/dist/services/workModelProviderService.d.ts +2 -2
- package/backend/dist/services/workModelProviderService.d.ts.map +1 -1
- package/backend/dist/services/workModelProviderService.js +38 -34
- package/backend/dist/services/workModelProviderService.js.map +1 -1
- package/backend/dist/services/workPolicyService.d.ts +7 -7
- package/backend/dist/services/workPolicyService.d.ts.map +1 -1
- package/backend/dist/services/workPolicyService.js +50 -51
- package/backend/dist/services/workPolicyService.js.map +1 -1
- package/backend/dist/services/workPreviewProxyService.d.ts +8 -8
- package/backend/dist/services/workPreviewProxyService.d.ts.map +1 -1
- package/backend/dist/services/workPreviewProxyService.js +47 -44
- package/backend/dist/services/workPreviewProxyService.js.map +1 -1
- package/backend/dist/services/workRuntimeDriver.d.ts +21 -18
- package/backend/dist/services/workRuntimeDriver.d.ts.map +1 -1
- package/backend/dist/services/workRuntimeDriver.js +69 -20
- package/backend/dist/services/workRuntimeDriver.js.map +1 -1
- package/backend/dist/services/workRuntimeService.d.ts +18 -13
- package/backend/dist/services/workRuntimeService.d.ts.map +1 -1
- package/backend/dist/services/workRuntimeService.js +438 -194
- package/backend/dist/services/workRuntimeService.js.map +1 -1
- package/backend/dist/services/workRuntimeShared.d.ts +2 -0
- package/backend/dist/services/workRuntimeShared.d.ts.map +1 -1
- package/backend/dist/services/workRuntimeShared.js.map +1 -1
- package/backend/dist/services/workTaskService.d.ts +42 -36
- package/backend/dist/services/workTaskService.d.ts.map +1 -1
- package/backend/dist/services/workTaskService.js +445 -350
- package/backend/dist/services/workTaskService.js.map +1 -1
- package/backend/dist/services/workTerminalService.d.ts +1 -1
- package/backend/dist/services/workTerminalService.d.ts.map +1 -1
- package/backend/dist/services/workTerminalService.js +33 -6
- package/backend/dist/services/workTerminalService.js.map +1 -1
- package/backend/dist/storage.d.ts +72 -40
- package/backend/dist/storage.d.ts.map +1 -1
- package/backend/dist/storage.js +312 -660
- package/backend/dist/storage.js.map +1 -1
- package/backend/dist/types/index.d.ts +28 -0
- package/backend/dist/types/index.d.ts.map +1 -1
- package/backend/dist/types/index.js.map +1 -1
- package/backend/dist/types/work.d.ts +7 -2
- package/backend/dist/types/work.d.ts.map +1 -1
- package/backend/dist/utils/chatCancellation.d.ts +48 -0
- package/backend/dist/utils/chatCancellation.d.ts.map +1 -0
- package/backend/dist/utils/chatCancellation.js +152 -0
- package/backend/dist/utils/chatCancellation.js.map +1 -0
- package/backend/dist/utils/chatDocumentContext.d.ts +1 -1
- package/backend/dist/utils/chatDocumentContext.d.ts.map +1 -1
- package/backend/dist/utils/chatDocumentContext.js +11 -5
- package/backend/dist/utils/chatDocumentContext.js.map +1 -1
- package/backend/dist/utils/chatStreamCoalescer.d.ts +15 -0
- package/backend/dist/utils/chatStreamCoalescer.d.ts.map +1 -0
- package/backend/dist/utils/chatStreamCoalescer.js +59 -0
- package/backend/dist/utils/chatStreamCoalescer.js.map +1 -0
- package/backend/dist/utils/dataDirectory.d.ts +49 -0
- package/backend/dist/utils/dataDirectory.d.ts.map +1 -0
- package/backend/dist/utils/dataDirectory.js +291 -0
- package/backend/dist/utils/dataDirectory.js.map +1 -0
- package/backend/dist/utils/generationUtils.d.ts.map +1 -1
- package/backend/dist/utils/generationUtils.js +18 -6
- package/backend/dist/utils/generationUtils.js.map +1 -1
- package/backend/dist/utils/jwt.d.ts.map +1 -1
- package/backend/dist/utils/jwt.js +2 -3
- package/backend/dist/utils/jwt.js.map +1 -1
- package/backend/dist/utils/ollamaModelDefaults.d.ts.map +1 -1
- package/backend/dist/utils/ollamaModelDefaults.js +2 -7
- package/backend/dist/utils/ollamaModelDefaults.js.map +1 -1
- package/backend/dist/utils/ollamaStreaming.d.ts +2 -1
- package/backend/dist/utils/ollamaStreaming.d.ts.map +1 -1
- package/backend/dist/utils/ollamaStreaming.js +49 -11
- package/backend/dist/utils/ollamaStreaming.js.map +1 -1
- package/backend/dist/utils/pluginConnectionVariables.d.ts.map +1 -1
- package/backend/dist/utils/pluginConnectionVariables.js +11 -3
- package/backend/dist/utils/pluginConnectionVariables.js.map +1 -1
- package/backend/dist/utils/pluginDefinitionTrust.d.ts.map +1 -1
- package/backend/dist/utils/pluginDefinitionTrust.js +4 -3
- package/backend/dist/utils/pluginDefinitionTrust.js.map +1 -1
- package/backend/dist/utils/pluginStreaming.d.ts +2 -1
- package/backend/dist/utils/pluginStreaming.d.ts.map +1 -1
- package/backend/dist/utils/pluginStreaming.js +5 -1
- package/backend/dist/utils/pluginStreaming.js.map +1 -1
- package/backend/dist/utils/pluginUpload.d.ts +1 -0
- package/backend/dist/utils/pluginUpload.d.ts.map +1 -1
- package/backend/dist/utils/pluginUpload.js +9 -2
- package/backend/dist/utils/pluginUpload.js.map +1 -1
- package/backend/dist/utils/pluginValidation.d.ts.map +1 -1
- package/backend/dist/utils/pluginValidation.js +29 -1
- package/backend/dist/utils/pluginValidation.js.map +1 -1
- package/backend/dist/utils/sttAudioUpload.d.ts +24 -0
- package/backend/dist/utils/sttAudioUpload.d.ts.map +1 -0
- package/backend/dist/utils/sttAudioUpload.js +500 -0
- package/backend/dist/utils/sttAudioUpload.js.map +1 -0
- package/backend/dist/utils/ttsVoiceCloneUpload.d.ts +34 -0
- package/backend/dist/utils/ttsVoiceCloneUpload.d.ts.map +1 -0
- package/backend/dist/utils/ttsVoiceCloneUpload.js +224 -0
- package/backend/dist/utils/ttsVoiceCloneUpload.js.map +1 -0
- package/backend/dist/utils/websocketMessages.d.ts +2 -1
- package/backend/dist/utils/websocketMessages.d.ts.map +1 -1
- package/backend/dist/utils/websocketMessages.js +16 -2
- package/backend/dist/utils/websocketMessages.js.map +1 -1
- package/backend/dist/websocketServer.d.ts +4 -1
- package/backend/dist/websocketServer.d.ts.map +1 -1
- package/backend/dist/websocketServer.js +290 -44
- package/backend/dist/websocketServer.js.map +1 -1
- package/backend/dist/workTerminalServer.d.ts +9 -0
- package/backend/dist/workTerminalServer.d.ts.map +1 -1
- package/backend/dist/workTerminalServer.js +221 -52
- package/backend/dist/workTerminalServer.js.map +1 -1
- package/backend/dist/worker.d.ts +2 -0
- package/backend/dist/worker.d.ts.map +1 -0
- package/backend/dist/worker.js +250 -0
- package/backend/dist/worker.js.map +1 -0
- package/backend/package.json +19 -9
- package/bin/cli.js +126 -99
- package/bin/runtime-paths.js +108 -0
- package/frontend/dist/artifact-runtime/.build-fingerprint +1 -1
- package/frontend/dist/artifact-runtime/framer-motion.js +5 -5
- package/frontend/dist/artifact-runtime/lucide-react.js +1 -1
- package/frontend/dist/assets/index-CUhEG7E2.js +33 -0
- package/frontend/dist/assets/index-kxtZQLV6.css +1 -0
- package/frontend/dist/assets/{markdown-math-ClQbWekD.css → markdown-math-ClTedVi7.css} +1 -1
- package/frontend/dist/index.html +18 -18
- package/frontend/dist/js/{ArtifactContainer-Dy2Q0iIL.js → ArtifactContainer-BTEDhBnv.js} +1 -1
- package/frontend/dist/js/{ArtifactDemoPage-K79dWshB.js → ArtifactDemoPage-B0gN3YTl.js} +1 -1
- package/frontend/dist/js/{ArtifactSandboxFrame-DhqLNUtY.js → ArtifactSandboxFrame-CLBXQkZs.js} +3 -3
- package/frontend/dist/js/{ArtifactSlideOutPanel-Cl8JG7bz.js → ArtifactSlideOutPanel-CfqHPFdE.js} +1 -1
- package/frontend/dist/js/{Button-CTXHujOd.js → Button-BV44cTnj.js} +1 -1
- package/frontend/dist/js/ChatPage-DIkAXZWA.js +23 -0
- package/frontend/dist/js/{FirstTimeSetup-kHhRzGJ8.js → FirstTimeSetup-B8phXGNA.js} +1 -1
- package/frontend/dist/js/GalleryPage-W4uI043I.js +1 -0
- package/frontend/dist/js/{HomePage-C1L8WAXL.js → HomePage-DlxehbyO.js} +1 -1
- package/frontend/dist/js/{LibreClawPage-Dyua8IUu.js → LibreClawPage-CgD0_G_F.js} +1 -1
- package/frontend/dist/js/{ModelManagerModals-CuMRGUd-.js → ModelManagerModals-D7jIT3v1.js} +1 -1
- package/frontend/dist/js/{ModelSelector-CqHc-Ln4.js → ModelSelector-BYxJU1UV.js} +1 -1
- package/frontend/dist/js/ModelsPage-C4XdCKP5.js +2 -0
- package/frontend/dist/js/NotesPage-CDECOl4V.js +1 -0
- package/frontend/dist/js/{OptimizedSyntaxHighlighter-CWYUn9Oe.js → OptimizedSyntaxHighlighter-XwqZEoTf.js} +1 -1
- package/frontend/dist/js/{PersonasPage-D_6WBCH5.js → PersonasPage-CjSLPrgS.js} +2 -2
- package/frontend/dist/js/PluginUsagePage-DJOXJuH4.js +1 -0
- package/frontend/dist/js/RichMessageContent-Debeh6bi.js +3 -0
- package/frontend/dist/js/SettingsModal-cUqAeYUP.js +1 -0
- package/frontend/dist/js/{SettingsToggle-DLHlCDBl.js → SettingsToggle-WTa0rgvY.js} +1 -1
- package/frontend/dist/js/{SystemPage-BMWEet9e.js → SystemPage-DxPw0GS7.js} +1 -1
- package/frontend/dist/js/UserManagementPage-CEdYFe_Z.js +1 -0
- package/frontend/dist/js/WorkPage-DDVeuG_9.js +6 -0
- package/frontend/dist/js/api-IzobHGND.js +14 -0
- package/frontend/dist/js/appStore-DKwC2vgn.js +2 -0
- package/frontend/dist/js/ar-xTSvTq05.js +2 -0
- package/frontend/dist/js/authStore-OaTuapL7.js +4 -0
- package/frontend/dist/js/{babel-CmENXdZw.js → babel-D24oDI9y.js} +1 -1
- package/frontend/dist/js/bn-iYAsohEA.js +2 -0
- package/frontend/dist/js/chatStore-DXGUVLXD.js +3 -0
- package/frontend/dist/js/{config-DkV1ka7I.js → config-DPEEuTAe.js} +1 -1
- package/frontend/dist/js/cs-YBHN88Hb.js +2 -0
- package/frontend/dist/js/da-D7qlLy_k.js +2 -0
- package/frontend/dist/js/de-DV671k2c.js +2 -0
- package/frontend/dist/js/es-kyBgzNq-.js +2 -0
- package/frontend/dist/js/{estree-D5KP-qbw.js → estree-ChwJsD2w.js} +1 -1
- package/frontend/dist/js/fr-Cw1vut7I.js +2 -0
- package/frontend/dist/js/hi-DWEFC024.js +2 -0
- package/frontend/dist/js/{html-Cm9c2akd.js → html-DFrVjciF.js} +1 -1
- package/frontend/dist/js/id-DlMHjjy0.js +2 -0
- package/frontend/dist/js/is-B9E_a7dG.js +2 -0
- package/frontend/dist/js/it-DawmVbLC.js +2 -0
- package/frontend/dist/js/ja-DmVvwY3W.js +2 -0
- package/frontend/dist/js/ko-DzOPpkVs.js +2 -0
- package/frontend/dist/js/{markdown-B2u7CnKN.js → markdown-FLLx7b67.js} +1 -1
- package/frontend/dist/js/markdown-core-BmPPZiuD.js +31 -0
- package/frontend/dist/js/{markdown-math-B7FlYsmr.js → markdown-math-mH7AZ_mb.js} +6 -6
- package/frontend/dist/js/{messageCodeStyles-DalG2j6U.js → messageCodeStyles-CBkkZY4n.js} +1 -1
- package/frontend/dist/js/ms-DpsaOPht.js +2 -0
- package/frontend/dist/js/nl-B1d8W22n.js +2 -0
- package/frontend/dist/js/pl-nCncRVgt.js +2 -0
- package/frontend/dist/js/{postcss-B5WIGhAY.js → postcss-Bx9CTcIc.js} +1 -1
- package/frontend/dist/js/pt-DHw8fGuu.js +2 -0
- package/frontend/dist/js/{react-vendor-DPNXrO-8.js → react-vendor-C5yShNlM.js} +1 -1
- package/frontend/dist/js/{router-vendor-Ca9zqOqT.js → router-vendor-CbPDks39.js} +1 -1
- package/frontend/dist/js/ru-Derl_YP_.js +2 -0
- package/frontend/dist/js/{standalone-Dwm1daef.js → standalone-i8-5bg5p.js} +1 -1
- package/frontend/dist/js/sv-pJAfBVo0.js +2 -0
- package/frontend/dist/js/{syntax-highlight-Ca9bHsaz.js → syntax-highlight-3EEX6CGL.js} +3 -3
- package/frontend/dist/js/th-C_7fIGnk.js +2 -0
- package/frontend/dist/js/tr-CPqsJvaP.js +2 -0
- package/frontend/dist/js/{typescript-CwieSptM.js → typescript-CQ3x-Uni.js} +1 -1
- package/frontend/dist/js/{ui-BnDZpjfc.js → ui-BHhR3Vok.js} +2 -2
- package/frontend/dist/js/ui-vendor-D3Ahl1x5.js +177 -0
- package/frontend/dist/js/uk-3o8P_kFi.js +2 -0
- package/frontend/dist/js/{useTranslation-CXY69qNk.js → useTranslation-C3ei3mJq.js} +1 -1
- package/frontend/dist/js/{utils-BM0_0iFj.js → utils-CuC1beTY.js} +1 -1
- package/frontend/dist/js/{utils-vendor-1zob7nK9.js → utils-vendor-BBa8OxtB.js} +1 -1
- package/frontend/dist/js/vi-Dv6N7OVD.js +2 -0
- package/frontend/dist/js/{workApi-BOS7crs9.js → workApi-Czu69yWS.js} +2 -2
- package/frontend/dist/js/{yaml-QD4znPfZ.js → yaml-DioTxVLA.js} +1 -1
- package/frontend/dist/js/zh-qg5iqtPi.js +2 -0
- package/package.json +16 -5
- package/plugins/huggingface.json +12 -3
- package/plugins/llama-cpp.json +18 -6
- package/plugins/longcat-audiodit.json +114 -0
- package/plugins/openai.json +18 -0
- package/frontend/dist/assets/index-BBpNbfKW.js +0 -16
- package/frontend/dist/assets/index-BLATyFmD.css +0 -1
- package/frontend/dist/js/ChatPage-BBayfMLS.js +0 -16
- package/frontend/dist/js/GalleryPage-By8VI39Q.js +0 -1
- package/frontend/dist/js/ModelsPage-ODeXhDDk.js +0 -2
- package/frontend/dist/js/NotesPage-CApzDjOq.js +0 -1
- package/frontend/dist/js/PluginUsagePage-kutS6SOd.js +0 -1
- package/frontend/dist/js/RichMessageContent-g6WT75Te.js +0 -3
- package/frontend/dist/js/SettingsModal-B7z51BCx.js +0 -1
- package/frontend/dist/js/UserManagementPage-D08lM51c.js +0 -1
- package/frontend/dist/js/WorkPage-DdVLefsK.js +0 -6
- package/frontend/dist/js/api-CLEmGcEh.js +0 -14
- package/frontend/dist/js/appStore-CGdhvp9P.js +0 -2
- package/frontend/dist/js/ar-BTmB2WVm.js +0 -2
- package/frontend/dist/js/authStore-Dh3beEOq.js +0 -4
- package/frontend/dist/js/bn-CQnH7YVT.js +0 -2
- package/frontend/dist/js/chatStore-CDeYWL_q.js +0 -3
- package/frontend/dist/js/cs-oTTZkQXr.js +0 -2
- package/frontend/dist/js/da-Br0gB6J6.js +0 -2
- package/frontend/dist/js/de-DE2iztTF.js +0 -2
- package/frontend/dist/js/es-DgthfVtl.js +0 -2
- package/frontend/dist/js/fr-BjxjFwPh.js +0 -2
- package/frontend/dist/js/hi-D1q7E-9N.js +0 -2
- package/frontend/dist/js/id-CDJZqLTF.js +0 -2
- package/frontend/dist/js/is-BU7Um_Tq.js +0 -2
- package/frontend/dist/js/it-CdAxr8P_.js +0 -2
- package/frontend/dist/js/ja-BLbQwz9u.js +0 -2
- package/frontend/dist/js/ko-CY5lpkAe.js +0 -2
- package/frontend/dist/js/markdown-core-DHnR5Hw8.js +0 -16
- package/frontend/dist/js/ms-tQ8AYXEQ.js +0 -2
- package/frontend/dist/js/nl-CRNi2oWT.js +0 -2
- package/frontend/dist/js/pl-CWtFRS_W.js +0 -2
- package/frontend/dist/js/pt-C7SPoLF8.js +0 -2
- package/frontend/dist/js/ru-Dz4AX8xc.js +0 -2
- package/frontend/dist/js/sv-ETy5-boa.js +0 -2
- package/frontend/dist/js/th-DpuMqvxU.js +0 -2
- package/frontend/dist/js/tr-C-1AYAqg.js +0 -2
- package/frontend/dist/js/ui-vendor-xUzKqAXI.js +0 -177
- package/frontend/dist/js/uk-CyS680gr.js +0 -2
- package/frontend/dist/js/vi-BG8HuiTz.js +0 -2
- package/frontend/dist/js/zh-NCs2mkHj.js +0 -2
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Libre WebUI
|
|
3
|
+
* Copyright (C) 2025 Kroonen AI, Inc.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
*/
|
|
6
|
+
import crypto from 'node:crypto';
|
|
7
|
+
import fs from 'node:fs';
|
|
8
|
+
import os from 'node:os';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
import recoveryInventoryService from '../../services/recoveryInventoryService.js';
|
|
11
|
+
import { loadAppPackage } from '../../utils/packagePaths.js';
|
|
12
|
+
const MAGIC = Buffer.from('LWBK0001', 'ascii');
|
|
13
|
+
const MAX_HEADER_BYTES = 16 * 1024 * 1024;
|
|
14
|
+
const COPY_BUFFER_BYTES = 1024 * 1024;
|
|
15
|
+
export const BACKUP_SECRET_NAMES = [
|
|
16
|
+
'ENCRYPTION_KEY',
|
|
17
|
+
'STORAGE_ENCRYPTION_KEYS',
|
|
18
|
+
'STORAGE_ENCRYPTION_ACTIVE_KEY_ID',
|
|
19
|
+
'JWT_SECRET',
|
|
20
|
+
'SESSION_SECRET',
|
|
21
|
+
'DATABASE_URL',
|
|
22
|
+
'REDIS_URL',
|
|
23
|
+
'S3_ENDPOINT',
|
|
24
|
+
'S3_REGION',
|
|
25
|
+
'S3_BUCKET',
|
|
26
|
+
'S3_ACCESS_KEY_ID',
|
|
27
|
+
'S3_SECRET_ACCESS_KEY',
|
|
28
|
+
'S3_SESSION_TOKEN',
|
|
29
|
+
];
|
|
30
|
+
export const BACKUP_RUNTIME_NAMES = [
|
|
31
|
+
'LIBRE_PLATFORM_MODE',
|
|
32
|
+
'DATABASE_BACKEND',
|
|
33
|
+
'BLOB_STORE_BACKEND',
|
|
34
|
+
'BLOB_QUOTA_BYTES_PER_USER',
|
|
35
|
+
'BLOB_QUOTA_RESERVATION_TTL_MS',
|
|
36
|
+
'VECTOR_STORE_BACKEND',
|
|
37
|
+
'COORDINATION_BACKEND',
|
|
38
|
+
'REDIS_KEY_PREFIX',
|
|
39
|
+
'REDIS_CONNECT_TIMEOUT_MS',
|
|
40
|
+
'JOB_WORKER_MODE',
|
|
41
|
+
'DATABASE_SSL_MODE',
|
|
42
|
+
'POSTGRES_MIGRATION_MODE',
|
|
43
|
+
'POSTGRES_POOL_MAX',
|
|
44
|
+
'POSTGRES_CONNECT_TIMEOUT_MS',
|
|
45
|
+
'POSTGRES_IDLE_TIMEOUT_MS',
|
|
46
|
+
'POSTGRES_STATEMENT_TIMEOUT_MS',
|
|
47
|
+
'POSTGRES_MIGRATION_LOCK_TIMEOUT_MS',
|
|
48
|
+
'S3_BLOB_PREFIX',
|
|
49
|
+
'S3_FORCE_PATH_STYLE',
|
|
50
|
+
];
|
|
51
|
+
export const stageProtectedRuntimeConfiguration = (payloadDirectory, env) => {
|
|
52
|
+
const directory = path.join(payloadDirectory, 'configuration');
|
|
53
|
+
fs.mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
54
|
+
const runtime = Object.fromEntries(BACKUP_RUNTIME_NAMES.flatMap(name => env[name] ? [[name, env[name]]] : []));
|
|
55
|
+
const secrets = Object.fromEntries(BACKUP_SECRET_NAMES.flatMap(name => (env[name] ? [[name, env[name]]] : [])));
|
|
56
|
+
fs.writeFileSync(path.join(directory, 'runtime.json'), canonicalJson(runtime), { mode: 0o600, flag: 'wx' });
|
|
57
|
+
fs.writeFileSync(path.join(directory, 'secrets.json'), canonicalJson(secrets), { mode: 0o600, flag: 'wx' });
|
|
58
|
+
};
|
|
59
|
+
const canonicalJson = (value) => {
|
|
60
|
+
const visit = (candidate) => {
|
|
61
|
+
if (candidate === null || typeof candidate !== 'object') {
|
|
62
|
+
return JSON.stringify(candidate);
|
|
63
|
+
}
|
|
64
|
+
if (Array.isArray(candidate)) {
|
|
65
|
+
return `[${candidate.map(visit).join(',')}]`;
|
|
66
|
+
}
|
|
67
|
+
const object = candidate;
|
|
68
|
+
return `{${Object.keys(object)
|
|
69
|
+
.sort()
|
|
70
|
+
.map(key => `${JSON.stringify(key)}:${visit(object[key])}`)
|
|
71
|
+
.join(',')}}`;
|
|
72
|
+
};
|
|
73
|
+
return visit(value);
|
|
74
|
+
};
|
|
75
|
+
const sha256 = (value) => crypto.createHash('sha256').update(value).digest('hex');
|
|
76
|
+
const assertPhysicalFile = (target, label) => {
|
|
77
|
+
const stat = fs.lstatSync(target);
|
|
78
|
+
if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink !== 1) {
|
|
79
|
+
throw new Error(`${label} must be a single-link physical file.`);
|
|
80
|
+
}
|
|
81
|
+
return stat;
|
|
82
|
+
};
|
|
83
|
+
const assertPhysicalDirectory = (target, label) => {
|
|
84
|
+
const stat = fs.lstatSync(target);
|
|
85
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) {
|
|
86
|
+
throw new Error(`${label} must be a physical directory.`);
|
|
87
|
+
}
|
|
88
|
+
return stat;
|
|
89
|
+
};
|
|
90
|
+
const readEncryptionKey = (keyPath) => {
|
|
91
|
+
const stat = assertPhysicalFile(keyPath, 'Backup encryption key');
|
|
92
|
+
if ((stat.mode & 0o077) !== 0) {
|
|
93
|
+
throw new Error('Backup encryption key permissions must not grant group or other access.');
|
|
94
|
+
}
|
|
95
|
+
const value = fs.readFileSync(keyPath, 'utf8').trim();
|
|
96
|
+
const key = /^[a-fA-F0-9]{64}$/.test(value)
|
|
97
|
+
? Buffer.from(value, 'hex')
|
|
98
|
+
: Buffer.from(value, 'base64');
|
|
99
|
+
if (key.byteLength !== 32) {
|
|
100
|
+
key.fill(0);
|
|
101
|
+
throw new Error('Backup encryption key must contain exactly 32 bytes.');
|
|
102
|
+
}
|
|
103
|
+
return key;
|
|
104
|
+
};
|
|
105
|
+
const readPrivateKey = (keyPath) => {
|
|
106
|
+
const stat = assertPhysicalFile(keyPath, 'Backup signing private key');
|
|
107
|
+
if ((stat.mode & 0o077) !== 0) {
|
|
108
|
+
throw new Error('Backup signing private key permissions must not grant group or other access.');
|
|
109
|
+
}
|
|
110
|
+
const key = crypto.createPrivateKey(fs.readFileSync(keyPath));
|
|
111
|
+
if (key.asymmetricKeyType !== 'ed25519') {
|
|
112
|
+
throw new Error('Backup signing private key must be Ed25519.');
|
|
113
|
+
}
|
|
114
|
+
return key;
|
|
115
|
+
};
|
|
116
|
+
const readPublicKey = (keyPath) => {
|
|
117
|
+
assertPhysicalFile(keyPath, 'Backup signing public key');
|
|
118
|
+
const key = crypto.createPublicKey(fs.readFileSync(keyPath));
|
|
119
|
+
if (key.asymmetricKeyType !== 'ed25519') {
|
|
120
|
+
throw new Error('Backup signing public key must be Ed25519.');
|
|
121
|
+
}
|
|
122
|
+
return key;
|
|
123
|
+
};
|
|
124
|
+
const publicKeyFingerprint = (key) => sha256(key.export({ type: 'spki', format: 'der' })).slice(0, 32);
|
|
125
|
+
const safeRelativePath = (value) => {
|
|
126
|
+
if (!value ||
|
|
127
|
+
value.includes('\0') ||
|
|
128
|
+
value.includes('\\') ||
|
|
129
|
+
path.posix.isAbsolute(value) ||
|
|
130
|
+
value.split('/').some(part => part === '' || part === '.' || part === '..')) {
|
|
131
|
+
throw new Error('Backup manifest contains an unsafe file path.');
|
|
132
|
+
}
|
|
133
|
+
return value;
|
|
134
|
+
};
|
|
135
|
+
const walkFiles = (root) => {
|
|
136
|
+
const output = [];
|
|
137
|
+
const pending = [''];
|
|
138
|
+
while (pending.length > 0) {
|
|
139
|
+
const relativeDirectory = pending.pop();
|
|
140
|
+
const directory = path.join(root, relativeDirectory);
|
|
141
|
+
for (const entry of fs
|
|
142
|
+
.readdirSync(directory, { withFileTypes: true })
|
|
143
|
+
.sort((left, right) => left.name.localeCompare(right.name))) {
|
|
144
|
+
const relative = path.posix.join(relativeDirectory.split(path.sep).join('/'), entry.name);
|
|
145
|
+
const target = path.join(root, relative);
|
|
146
|
+
const stat = fs.lstatSync(target);
|
|
147
|
+
if (stat.isSymbolicLink()) {
|
|
148
|
+
throw new Error('Backup source contains a symbolic link.');
|
|
149
|
+
}
|
|
150
|
+
if (stat.isDirectory())
|
|
151
|
+
pending.push(relative);
|
|
152
|
+
else if (stat.isFile() && stat.nlink === 1)
|
|
153
|
+
output.push(relative);
|
|
154
|
+
else
|
|
155
|
+
throw new Error('Backup source contains an unsupported filesystem entry.');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return output.sort();
|
|
159
|
+
};
|
|
160
|
+
const copyPhysicalTree = (source, destination) => {
|
|
161
|
+
assertPhysicalDirectory(source, 'Backup source data directory');
|
|
162
|
+
fs.mkdirSync(destination, { recursive: true, mode: 0o700 });
|
|
163
|
+
for (const relative of walkFiles(source)) {
|
|
164
|
+
const input = path.join(source, relative);
|
|
165
|
+
const output = path.join(destination, relative);
|
|
166
|
+
fs.mkdirSync(path.dirname(output), { recursive: true, mode: 0o700 });
|
|
167
|
+
fs.copyFileSync(input, output, fs.constants.COPYFILE_EXCL);
|
|
168
|
+
fs.chmodSync(output, 0o600);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const hashPhysicalFile = (target) => {
|
|
172
|
+
const expected = assertPhysicalFile(target, 'Backup payload file');
|
|
173
|
+
const descriptor = fs.openSync(target, fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW || 0));
|
|
174
|
+
const buffer = Buffer.allocUnsafe(COPY_BUFFER_BYTES);
|
|
175
|
+
const hash = crypto.createHash('sha256');
|
|
176
|
+
let bytes = 0;
|
|
177
|
+
try {
|
|
178
|
+
const opened = fs.fstatSync(descriptor);
|
|
179
|
+
if (opened.dev !== expected.dev ||
|
|
180
|
+
opened.ino !== expected.ino ||
|
|
181
|
+
opened.nlink !== 1) {
|
|
182
|
+
throw new Error('Backup payload changed during inspection.');
|
|
183
|
+
}
|
|
184
|
+
let bytesRead;
|
|
185
|
+
while ((bytesRead = fs.readSync(descriptor, buffer, 0, buffer.length, null)) > 0) {
|
|
186
|
+
hash.update(buffer.subarray(0, bytesRead));
|
|
187
|
+
bytes += bytesRead;
|
|
188
|
+
}
|
|
189
|
+
const finished = fs.fstatSync(descriptor);
|
|
190
|
+
if (bytes !== expected.size ||
|
|
191
|
+
finished.size !== expected.size ||
|
|
192
|
+
finished.mtimeMs !== expected.mtimeMs) {
|
|
193
|
+
throw new Error('Backup payload changed during inspection.');
|
|
194
|
+
}
|
|
195
|
+
return { bytes, sha256: hash.digest('hex') };
|
|
196
|
+
}
|
|
197
|
+
finally {
|
|
198
|
+
buffer.fill(0);
|
|
199
|
+
fs.closeSync(descriptor);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
const inspectFiles = (root) => walkFiles(root).map(relative => {
|
|
203
|
+
const target = path.join(root, relative);
|
|
204
|
+
return {
|
|
205
|
+
path: safeRelativePath(relative.split(path.sep).join('/')),
|
|
206
|
+
...hashPhysicalFile(target),
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
const assertSourceMatchesStagedData = (source, files) => {
|
|
210
|
+
const expected = files
|
|
211
|
+
.filter(file => file.path.startsWith('data/'))
|
|
212
|
+
.map(file => ({ ...file, path: file.path.slice('data/'.length) }));
|
|
213
|
+
const actual = inspectFiles(source);
|
|
214
|
+
if (canonicalJson(actual) !== canonicalJson(expected)) {
|
|
215
|
+
throw new Error('Backup source changed while it was being copied; no archive was published.');
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
const writeAll = (descriptor, value) => {
|
|
219
|
+
let offset = 0;
|
|
220
|
+
while (offset < value.byteLength) {
|
|
221
|
+
offset += fs.writeSync(descriptor, value, offset, value.byteLength - offset);
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
const writeHeaderAndCiphertext = (destination, header, ciphertextPath) => {
|
|
225
|
+
const serializedHeader = Buffer.from(canonicalJson(header), 'utf8');
|
|
226
|
+
if (serializedHeader.byteLength > MAX_HEADER_BYTES) {
|
|
227
|
+
throw new Error('Backup manifest exceeds the supported size.');
|
|
228
|
+
}
|
|
229
|
+
const headerLength = Buffer.allocUnsafe(4);
|
|
230
|
+
headerLength.writeUInt32BE(serializedHeader.byteLength);
|
|
231
|
+
const output = fs.openSync(destination, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL, 0o600);
|
|
232
|
+
try {
|
|
233
|
+
writeAll(output, MAGIC);
|
|
234
|
+
writeAll(output, headerLength);
|
|
235
|
+
writeAll(output, serializedHeader);
|
|
236
|
+
const input = fs.openSync(ciphertextPath, fs.constants.O_RDONLY);
|
|
237
|
+
const buffer = Buffer.allocUnsafe(COPY_BUFFER_BYTES);
|
|
238
|
+
try {
|
|
239
|
+
let bytesRead;
|
|
240
|
+
while ((bytesRead = fs.readSync(input, buffer, 0, buffer.length, null)) > 0) {
|
|
241
|
+
writeAll(output, buffer.subarray(0, bytesRead));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
finally {
|
|
245
|
+
buffer.fill(0);
|
|
246
|
+
fs.closeSync(input);
|
|
247
|
+
}
|
|
248
|
+
fs.fsyncSync(output);
|
|
249
|
+
}
|
|
250
|
+
finally {
|
|
251
|
+
serializedHeader.fill(0);
|
|
252
|
+
fs.closeSync(output);
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
const parseHeader = (archivePath) => {
|
|
256
|
+
const stat = assertPhysicalFile(archivePath, 'Backup archive');
|
|
257
|
+
const descriptor = fs.openSync(archivePath, fs.constants.O_RDONLY);
|
|
258
|
+
try {
|
|
259
|
+
const prefix = Buffer.alloc(MAGIC.byteLength + 4);
|
|
260
|
+
if (fs.readSync(descriptor, prefix, 0, prefix.length, 0) !== prefix.length) {
|
|
261
|
+
throw new Error('Backup archive header is truncated.');
|
|
262
|
+
}
|
|
263
|
+
if (!prefix.subarray(0, MAGIC.byteLength).equals(MAGIC)) {
|
|
264
|
+
throw new Error('Backup archive magic is invalid.');
|
|
265
|
+
}
|
|
266
|
+
const length = prefix.readUInt32BE(MAGIC.byteLength);
|
|
267
|
+
if (length < 2 || length > MAX_HEADER_BYTES) {
|
|
268
|
+
throw new Error('Backup archive header size is invalid.');
|
|
269
|
+
}
|
|
270
|
+
const bytes = Buffer.alloc(length);
|
|
271
|
+
if (fs.readSync(descriptor, bytes, 0, length, prefix.length) !== length) {
|
|
272
|
+
throw new Error('Backup archive header is truncated.');
|
|
273
|
+
}
|
|
274
|
+
let parsed;
|
|
275
|
+
try {
|
|
276
|
+
parsed = JSON.parse(bytes.toString('utf8'));
|
|
277
|
+
}
|
|
278
|
+
finally {
|
|
279
|
+
bytes.fill(0);
|
|
280
|
+
}
|
|
281
|
+
const header = parsed;
|
|
282
|
+
if (!header ||
|
|
283
|
+
header.manifest?.format !== 'libre-webui-integrated-backup' ||
|
|
284
|
+
header.manifest.version !== 1 ||
|
|
285
|
+
header.encryption?.algorithm !== 'aes-256-gcm' ||
|
|
286
|
+
header.signature?.algorithm !== 'ed25519' ||
|
|
287
|
+
!Array.isArray(header.manifest.files)) {
|
|
288
|
+
throw new Error('Backup archive header contract is invalid.');
|
|
289
|
+
}
|
|
290
|
+
if (!/^[a-f0-9]{64}$/.test(header.encryption.ciphertextSha256) ||
|
|
291
|
+
typeof header.encryption.iv !== 'string' ||
|
|
292
|
+
typeof header.encryption.tag !== 'string' ||
|
|
293
|
+
typeof header.signature.value !== 'string' ||
|
|
294
|
+
!/^[a-f0-9]{32}$/.test(header.signature.signerFingerprint)) {
|
|
295
|
+
throw new Error('Backup archive cryptographic metadata is invalid.');
|
|
296
|
+
}
|
|
297
|
+
const seen = new Set();
|
|
298
|
+
for (const file of header.manifest.files) {
|
|
299
|
+
safeRelativePath(file.path);
|
|
300
|
+
if (seen.has(file.path))
|
|
301
|
+
throw new Error('Backup manifest contains a duplicate path.');
|
|
302
|
+
seen.add(file.path);
|
|
303
|
+
if (!Number.isSafeInteger(file.bytes) ||
|
|
304
|
+
file.bytes < 0 ||
|
|
305
|
+
!/^[a-f0-9]{64}$/.test(file.sha256)) {
|
|
306
|
+
throw new Error('Backup manifest contains invalid file metadata.');
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
const payloadOffset = prefix.length + length;
|
|
310
|
+
if (!Number.isSafeInteger(header.encryption.ciphertextBytes) ||
|
|
311
|
+
header.encryption.ciphertextBytes < 0 ||
|
|
312
|
+
payloadOffset + header.encryption.ciphertextBytes !== stat.size) {
|
|
313
|
+
throw new Error('Backup ciphertext size does not match its manifest.');
|
|
314
|
+
}
|
|
315
|
+
return { header, payloadOffset, bytes: stat.size };
|
|
316
|
+
}
|
|
317
|
+
finally {
|
|
318
|
+
fs.closeSync(descriptor);
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
const signedValue = (header) => Buffer.from(canonicalJson({ manifest: header.manifest, encryption: header.encryption }), 'utf8');
|
|
322
|
+
const ciphertextDigest = (archivePath, offset, length) => {
|
|
323
|
+
const hash = crypto.createHash('sha256');
|
|
324
|
+
const descriptor = fs.openSync(archivePath, fs.constants.O_RDONLY);
|
|
325
|
+
const buffer = Buffer.allocUnsafe(COPY_BUFFER_BYTES);
|
|
326
|
+
try {
|
|
327
|
+
let position = offset;
|
|
328
|
+
let remaining = length;
|
|
329
|
+
while (remaining > 0) {
|
|
330
|
+
const bytesRead = fs.readSync(descriptor, buffer, 0, Math.min(buffer.length, remaining), position);
|
|
331
|
+
if (bytesRead <= 0)
|
|
332
|
+
throw new Error('Backup ciphertext is truncated.');
|
|
333
|
+
hash.update(buffer.subarray(0, bytesRead));
|
|
334
|
+
position += bytesRead;
|
|
335
|
+
remaining -= bytesRead;
|
|
336
|
+
}
|
|
337
|
+
return hash.digest('hex');
|
|
338
|
+
}
|
|
339
|
+
finally {
|
|
340
|
+
buffer.fill(0);
|
|
341
|
+
fs.closeSync(descriptor);
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
const verifyHeader = (archivePath, signingPublicKeyPath) => {
|
|
345
|
+
const parsed = parseHeader(archivePath);
|
|
346
|
+
const publicKey = readPublicKey(signingPublicKeyPath);
|
|
347
|
+
if (parsed.header.signature.signerFingerprint !==
|
|
348
|
+
publicKeyFingerprint(publicKey)) {
|
|
349
|
+
throw new Error('Backup signer does not match the trusted public key.');
|
|
350
|
+
}
|
|
351
|
+
const value = signedValue(parsed.header);
|
|
352
|
+
try {
|
|
353
|
+
if (!crypto.verify(null, value, publicKey, Buffer.from(parsed.header.signature.value, 'base64'))) {
|
|
354
|
+
throw new Error('Backup manifest signature verification failed.');
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
finally {
|
|
358
|
+
value.fill(0);
|
|
359
|
+
}
|
|
360
|
+
const actualDigest = ciphertextDigest(archivePath, parsed.payloadOffset, parsed.header.encryption.ciphertextBytes);
|
|
361
|
+
if (!crypto.timingSafeEqual(Buffer.from(actualDigest, 'hex'), Buffer.from(parsed.header.encryption.ciphertextSha256, 'hex'))) {
|
|
362
|
+
throw new Error('Backup ciphertext checksum verification failed.');
|
|
363
|
+
}
|
|
364
|
+
return { header: parsed.header, payloadOffset: parsed.payloadOffset };
|
|
365
|
+
};
|
|
366
|
+
const decryptInto = (archivePath, payloadOffset, header, encryptionKeyPath, destination) => {
|
|
367
|
+
const key = readEncryptionKey(encryptionKeyPath);
|
|
368
|
+
const iv = Buffer.from(header.encryption.iv, 'base64');
|
|
369
|
+
const tag = Buffer.from(header.encryption.tag, 'base64');
|
|
370
|
+
if (iv.byteLength !== 12 || tag.byteLength !== 16) {
|
|
371
|
+
key.fill(0);
|
|
372
|
+
throw new Error('Backup encryption envelope is invalid.');
|
|
373
|
+
}
|
|
374
|
+
const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv, {
|
|
375
|
+
authTagLength: 16,
|
|
376
|
+
});
|
|
377
|
+
const aad = Buffer.from(canonicalJson(header.manifest), 'utf8');
|
|
378
|
+
decipher.setAAD(aad);
|
|
379
|
+
decipher.setAuthTag(tag);
|
|
380
|
+
fs.mkdirSync(destination, { recursive: false, mode: 0o700 });
|
|
381
|
+
const input = fs.openSync(archivePath, fs.constants.O_RDONLY);
|
|
382
|
+
const buffer = Buffer.allocUnsafe(COPY_BUFFER_BYTES);
|
|
383
|
+
let fileIndex = 0;
|
|
384
|
+
let fileDescriptor;
|
|
385
|
+
let fileRemaining = 0;
|
|
386
|
+
let fileHash = crypto.createHash('sha256');
|
|
387
|
+
const openNext = () => {
|
|
388
|
+
while (fileIndex < header.manifest.files.length) {
|
|
389
|
+
const file = header.manifest.files[fileIndex];
|
|
390
|
+
const target = path.join(destination, ...safeRelativePath(file.path).split('/'));
|
|
391
|
+
fs.mkdirSync(path.dirname(target), { recursive: true, mode: 0o700 });
|
|
392
|
+
fileDescriptor = fs.openSync(target, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL, 0o600);
|
|
393
|
+
fileRemaining = file.bytes;
|
|
394
|
+
fileHash = crypto.createHash('sha256');
|
|
395
|
+
if (fileRemaining > 0)
|
|
396
|
+
return;
|
|
397
|
+
fs.closeSync(fileDescriptor);
|
|
398
|
+
fileDescriptor = undefined;
|
|
399
|
+
if (fileHash.digest('hex') !== file.sha256) {
|
|
400
|
+
throw new Error('Restored backup file checksum verification failed.');
|
|
401
|
+
}
|
|
402
|
+
fileIndex += 1;
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
const consume = (plaintext) => {
|
|
406
|
+
let offset = 0;
|
|
407
|
+
while (offset < plaintext.byteLength) {
|
|
408
|
+
if (fileDescriptor === undefined)
|
|
409
|
+
openNext();
|
|
410
|
+
if (fileDescriptor === undefined) {
|
|
411
|
+
throw new Error('Backup plaintext exceeds its file manifest.');
|
|
412
|
+
}
|
|
413
|
+
const length = Math.min(fileRemaining, plaintext.byteLength - offset);
|
|
414
|
+
const slice = plaintext.subarray(offset, offset + length);
|
|
415
|
+
writeAll(fileDescriptor, slice);
|
|
416
|
+
fileHash.update(slice);
|
|
417
|
+
offset += length;
|
|
418
|
+
fileRemaining -= length;
|
|
419
|
+
if (fileRemaining === 0) {
|
|
420
|
+
fs.fsyncSync(fileDescriptor);
|
|
421
|
+
fs.closeSync(fileDescriptor);
|
|
422
|
+
fileDescriptor = undefined;
|
|
423
|
+
const expected = header.manifest.files[fileIndex];
|
|
424
|
+
if (fileHash.digest('hex') !== expected.sha256) {
|
|
425
|
+
throw new Error('Restored backup file checksum verification failed.');
|
|
426
|
+
}
|
|
427
|
+
fileIndex += 1;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
try {
|
|
432
|
+
openNext();
|
|
433
|
+
let position = payloadOffset;
|
|
434
|
+
let remaining = header.encryption.ciphertextBytes;
|
|
435
|
+
while (remaining > 0) {
|
|
436
|
+
const bytesRead = fs.readSync(input, buffer, 0, Math.min(buffer.length, remaining), position);
|
|
437
|
+
if (bytesRead <= 0)
|
|
438
|
+
throw new Error('Backup ciphertext is truncated.');
|
|
439
|
+
const plaintext = decipher.update(buffer.subarray(0, bytesRead));
|
|
440
|
+
try {
|
|
441
|
+
consume(plaintext);
|
|
442
|
+
}
|
|
443
|
+
finally {
|
|
444
|
+
plaintext.fill(0);
|
|
445
|
+
}
|
|
446
|
+
position += bytesRead;
|
|
447
|
+
remaining -= bytesRead;
|
|
448
|
+
}
|
|
449
|
+
const final = decipher.final();
|
|
450
|
+
try {
|
|
451
|
+
consume(final);
|
|
452
|
+
}
|
|
453
|
+
finally {
|
|
454
|
+
final.fill(0);
|
|
455
|
+
}
|
|
456
|
+
openNext();
|
|
457
|
+
if (fileDescriptor !== undefined ||
|
|
458
|
+
fileIndex !== header.manifest.files.length) {
|
|
459
|
+
throw new Error('Backup plaintext is shorter than its file manifest.');
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
finally {
|
|
463
|
+
if (fileDescriptor !== undefined)
|
|
464
|
+
fs.closeSync(fileDescriptor);
|
|
465
|
+
buffer.fill(0);
|
|
466
|
+
aad.fill(0);
|
|
467
|
+
key.fill(0);
|
|
468
|
+
fs.closeSync(input);
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
const readJsonObject = (target) => {
|
|
472
|
+
const bytes = fs.readFileSync(target);
|
|
473
|
+
try {
|
|
474
|
+
const parsed = JSON.parse(bytes.toString('utf8'));
|
|
475
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
476
|
+
throw new Error('Restored backup configuration is invalid.');
|
|
477
|
+
}
|
|
478
|
+
return Object.fromEntries(Object.entries(parsed).flatMap(([key, value]) => (typeof value === 'string' ? [[key, value]] : [])));
|
|
479
|
+
}
|
|
480
|
+
finally {
|
|
481
|
+
bytes.fill(0);
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
const collectRestoreInventory = async (restoreRoot, baseEnv) => {
|
|
485
|
+
const secrets = readJsonObject(path.join(restoreRoot, 'configuration', 'secrets.json'));
|
|
486
|
+
const runtime = readJsonObject(path.join(restoreRoot, 'configuration', 'runtime.json'));
|
|
487
|
+
return recoveryInventoryService.collect({
|
|
488
|
+
dataDir: path.join(restoreRoot, 'data'),
|
|
489
|
+
env: {
|
|
490
|
+
...baseEnv,
|
|
491
|
+
...runtime,
|
|
492
|
+
...secrets,
|
|
493
|
+
DATA_DIR: path.join(restoreRoot, 'data'),
|
|
494
|
+
// The archive owns only this restored data tree. Never let a caller's
|
|
495
|
+
// historical PLUGINS_DIR make preflight inspect or mutate another tree.
|
|
496
|
+
PLUGINS_DIR: path.join(restoreRoot, 'data', 'plugins'),
|
|
497
|
+
},
|
|
498
|
+
legacyPluginsDirectories: [],
|
|
499
|
+
});
|
|
500
|
+
};
|
|
501
|
+
export const generateBackupKeys = (directory) => {
|
|
502
|
+
fs.mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
503
|
+
assertPhysicalDirectory(directory, 'Backup key directory');
|
|
504
|
+
const encryptionKeyPath = path.join(directory, 'backup-encryption.key');
|
|
505
|
+
const signingPrivateKeyPath = path.join(directory, 'backup-signing-private.pem');
|
|
506
|
+
const signingPublicKeyPath = path.join(directory, 'backup-signing-public.pem');
|
|
507
|
+
for (const target of [
|
|
508
|
+
encryptionKeyPath,
|
|
509
|
+
signingPrivateKeyPath,
|
|
510
|
+
signingPublicKeyPath,
|
|
511
|
+
]) {
|
|
512
|
+
if (fs.existsSync(target))
|
|
513
|
+
throw new Error('Backup key output already exists.');
|
|
514
|
+
}
|
|
515
|
+
const encryptionKey = crypto.randomBytes(32);
|
|
516
|
+
const pair = crypto.generateKeyPairSync('ed25519');
|
|
517
|
+
try {
|
|
518
|
+
fs.writeFileSync(encryptionKeyPath, `${encryptionKey.toString('hex')}\n`, {
|
|
519
|
+
mode: 0o600,
|
|
520
|
+
flag: 'wx',
|
|
521
|
+
});
|
|
522
|
+
fs.writeFileSync(signingPrivateKeyPath, pair.privateKey.export({ type: 'pkcs8', format: 'pem' }), { mode: 0o600, flag: 'wx' });
|
|
523
|
+
fs.writeFileSync(signingPublicKeyPath, pair.publicKey.export({ type: 'spki', format: 'pem' }), { mode: 0o644, flag: 'wx' });
|
|
524
|
+
}
|
|
525
|
+
finally {
|
|
526
|
+
encryptionKey.fill(0);
|
|
527
|
+
}
|
|
528
|
+
return { encryptionKeyPath, signingPrivateKeyPath, signingPublicKeyPath };
|
|
529
|
+
};
|
|
530
|
+
export const inspectBackupArchive = (archivePath) => parseHeader(archivePath).header;
|
|
531
|
+
export const verifyBackupArchive = (options) => {
|
|
532
|
+
const verified = verifyHeader(options.archivePath, options.signingPublicKeyPath);
|
|
533
|
+
let payloadVerified = false;
|
|
534
|
+
if (options.encryptionKeyPath) {
|
|
535
|
+
const scratch = fs.mkdtempSync(path.join(os.tmpdir(), 'libre-backup-verify-'));
|
|
536
|
+
const destination = path.join(scratch, 'payload');
|
|
537
|
+
try {
|
|
538
|
+
decryptInto(options.archivePath, verified.payloadOffset, verified.header, options.encryptionKeyPath, destination);
|
|
539
|
+
payloadVerified = true;
|
|
540
|
+
}
|
|
541
|
+
finally {
|
|
542
|
+
fs.rmSync(scratch, { recursive: true, force: true });
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
return {
|
|
546
|
+
header: verified.header,
|
|
547
|
+
signatureVerified: true,
|
|
548
|
+
ciphertextVerified: true,
|
|
549
|
+
payloadVerified,
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* Seal an already-staged, physical payload tree into the common signed and
|
|
554
|
+
* encrypted archive format. Callers are responsible for producing a
|
|
555
|
+
* consistent staged snapshot before invoking this boundary.
|
|
556
|
+
*/
|
|
557
|
+
export const sealBackupPayload = (options) => {
|
|
558
|
+
assertPhysicalDirectory(options.payloadDirectory, 'Backup payload directory');
|
|
559
|
+
if (fs.existsSync(options.outputPath)) {
|
|
560
|
+
throw new Error('Backup output already exists.');
|
|
561
|
+
}
|
|
562
|
+
const payload = path.resolve(options.payloadDirectory);
|
|
563
|
+
const output = path.resolve(options.outputPath);
|
|
564
|
+
const relativeOutput = path.relative(payload, output);
|
|
565
|
+
if (relativeOutput === '' ||
|
|
566
|
+
(!relativeOutput.startsWith(`..${path.sep}`) &&
|
|
567
|
+
relativeOutput !== '..' &&
|
|
568
|
+
!path.isAbsolute(relativeOutput))) {
|
|
569
|
+
throw new Error('Backup output must be outside the staged payload.');
|
|
570
|
+
}
|
|
571
|
+
const files = inspectFiles(payload);
|
|
572
|
+
const manifest = { ...options.manifest, files };
|
|
573
|
+
const parent = path.dirname(output);
|
|
574
|
+
fs.mkdirSync(parent, { recursive: true, mode: 0o700 });
|
|
575
|
+
const scratch = fs.mkdtempSync(path.join(parent, '.libre-backup-seal-'));
|
|
576
|
+
const ciphertextPath = path.join(scratch, 'ciphertext.partial');
|
|
577
|
+
const outputPartial = `${output}.partial-${process.pid}-${crypto.randomUUID()}`;
|
|
578
|
+
const key = readEncryptionKey(options.encryptionKeyPath);
|
|
579
|
+
try {
|
|
580
|
+
const iv = crypto.randomBytes(12);
|
|
581
|
+
const cipher = crypto.createCipheriv('aes-256-gcm', key, iv);
|
|
582
|
+
const aad = Buffer.from(canonicalJson(manifest), 'utf8');
|
|
583
|
+
cipher.setAAD(aad);
|
|
584
|
+
const ciphertext = fs.openSync(ciphertextPath, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL, 0o600);
|
|
585
|
+
const ciphertextHash = crypto.createHash('sha256');
|
|
586
|
+
let ciphertextBytes = 0;
|
|
587
|
+
try {
|
|
588
|
+
for (const file of files) {
|
|
589
|
+
const input = fs.openSync(path.join(payload, ...file.path.split('/')), fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW || 0));
|
|
590
|
+
const buffer = Buffer.allocUnsafe(COPY_BUFFER_BYTES);
|
|
591
|
+
try {
|
|
592
|
+
let bytesRead;
|
|
593
|
+
while ((bytesRead = fs.readSync(input, buffer, 0, buffer.length, null)) > 0) {
|
|
594
|
+
const encrypted = cipher.update(buffer.subarray(0, bytesRead));
|
|
595
|
+
try {
|
|
596
|
+
writeAll(ciphertext, encrypted);
|
|
597
|
+
ciphertextHash.update(encrypted);
|
|
598
|
+
ciphertextBytes += encrypted.byteLength;
|
|
599
|
+
}
|
|
600
|
+
finally {
|
|
601
|
+
encrypted.fill(0);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
finally {
|
|
606
|
+
buffer.fill(0);
|
|
607
|
+
fs.closeSync(input);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
const final = cipher.final();
|
|
611
|
+
try {
|
|
612
|
+
writeAll(ciphertext, final);
|
|
613
|
+
ciphertextHash.update(final);
|
|
614
|
+
ciphertextBytes += final.byteLength;
|
|
615
|
+
}
|
|
616
|
+
finally {
|
|
617
|
+
final.fill(0);
|
|
618
|
+
}
|
|
619
|
+
fs.fsyncSync(ciphertext);
|
|
620
|
+
}
|
|
621
|
+
finally {
|
|
622
|
+
aad.fill(0);
|
|
623
|
+
fs.closeSync(ciphertext);
|
|
624
|
+
}
|
|
625
|
+
const privateKey = readPrivateKey(options.signingPrivateKeyPath);
|
|
626
|
+
const publicKey = crypto.createPublicKey(privateKey);
|
|
627
|
+
const unsigned = {
|
|
628
|
+
manifest,
|
|
629
|
+
encryption: {
|
|
630
|
+
algorithm: 'aes-256-gcm',
|
|
631
|
+
iv: iv.toString('base64'),
|
|
632
|
+
tag: cipher.getAuthTag().toString('base64'),
|
|
633
|
+
ciphertextBytes,
|
|
634
|
+
ciphertextSha256: ciphertextHash.digest('hex'),
|
|
635
|
+
},
|
|
636
|
+
};
|
|
637
|
+
const signed = Buffer.from(canonicalJson(unsigned), 'utf8');
|
|
638
|
+
let signature;
|
|
639
|
+
try {
|
|
640
|
+
signature = crypto.sign(null, signed, privateKey).toString('base64');
|
|
641
|
+
}
|
|
642
|
+
finally {
|
|
643
|
+
signed.fill(0);
|
|
644
|
+
}
|
|
645
|
+
const header = {
|
|
646
|
+
...unsigned,
|
|
647
|
+
signature: {
|
|
648
|
+
algorithm: 'ed25519',
|
|
649
|
+
signerFingerprint: publicKeyFingerprint(publicKey),
|
|
650
|
+
value: signature,
|
|
651
|
+
},
|
|
652
|
+
};
|
|
653
|
+
writeHeaderAndCiphertext(outputPartial, header, ciphertextPath);
|
|
654
|
+
fs.renameSync(outputPartial, output);
|
|
655
|
+
const directory = fs.openSync(parent, fs.constants.O_RDONLY);
|
|
656
|
+
try {
|
|
657
|
+
fs.fsyncSync(directory);
|
|
658
|
+
}
|
|
659
|
+
finally {
|
|
660
|
+
fs.closeSync(directory);
|
|
661
|
+
}
|
|
662
|
+
const publicPath = path.join(scratch, 'verify-public.pem');
|
|
663
|
+
fs.writeFileSync(publicPath, publicKey.export({ type: 'spki', format: 'pem' }), { mode: 0o600, flag: 'wx' });
|
|
664
|
+
return verifyBackupArchive({
|
|
665
|
+
archivePath: output,
|
|
666
|
+
signingPublicKeyPath: publicPath,
|
|
667
|
+
encryptionKeyPath: options.encryptionKeyPath,
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
finally {
|
|
671
|
+
key.fill(0);
|
|
672
|
+
fs.rmSync(outputPartial, { force: true });
|
|
673
|
+
fs.rmSync(scratch, { recursive: true, force: true });
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
/** Decrypt and authenticate an archive into a caller-owned fresh directory. */
|
|
677
|
+
export const extractBackupPayload = (options) => {
|
|
678
|
+
const destination = path.resolve(options.destinationDirectory);
|
|
679
|
+
if (fs.existsSync(destination)) {
|
|
680
|
+
throw new Error('Backup extraction target must not exist.');
|
|
681
|
+
}
|
|
682
|
+
const parsed = verifyHeader(options.archivePath, options.signingPublicKeyPath);
|
|
683
|
+
try {
|
|
684
|
+
decryptInto(options.archivePath, parsed.payloadOffset, parsed.header, options.encryptionKeyPath, destination);
|
|
685
|
+
return {
|
|
686
|
+
header: parsed.header,
|
|
687
|
+
verification: {
|
|
688
|
+
header: parsed.header,
|
|
689
|
+
signatureVerified: true,
|
|
690
|
+
ciphertextVerified: true,
|
|
691
|
+
payloadVerified: true,
|
|
692
|
+
},
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
catch (error) {
|
|
696
|
+
fs.rmSync(destination, { recursive: true, force: true });
|
|
697
|
+
throw error;
|
|
698
|
+
}
|
|
699
|
+
};
|
|
700
|
+
export const createBackupArchive = async (options) => {
|
|
701
|
+
if (!options.offline) {
|
|
702
|
+
throw new Error('Integrated backup creation requires --offline after all application and worker processes are stopped.');
|
|
703
|
+
}
|
|
704
|
+
if (fs.existsSync(options.outputPath)) {
|
|
705
|
+
throw new Error('Backup output already exists.');
|
|
706
|
+
}
|
|
707
|
+
const resolvedDataDir = path.resolve(options.dataDir);
|
|
708
|
+
const resolvedOutput = path.resolve(options.outputPath);
|
|
709
|
+
const relativeOutput = path.relative(resolvedDataDir, resolvedOutput);
|
|
710
|
+
if (relativeOutput === '' ||
|
|
711
|
+
(!relativeOutput.startsWith(`..${path.sep}`) &&
|
|
712
|
+
relativeOutput !== '..' &&
|
|
713
|
+
!path.isAbsolute(relativeOutput))) {
|
|
714
|
+
throw new Error('Backup output must be outside the application data directory.');
|
|
715
|
+
}
|
|
716
|
+
const env = options.env ?? process.env;
|
|
717
|
+
if (env.LIBRE_PLATFORM_MODE?.trim().toLowerCase() === 'team' ||
|
|
718
|
+
env.DATABASE_BACKEND?.trim().toLowerCase() === 'postgres' ||
|
|
719
|
+
env.BLOB_STORE_BACKEND?.trim().toLowerCase() === 's3' ||
|
|
720
|
+
env.VECTOR_STORE_BACKEND?.trim().toLowerCase() === 'pgvector') {
|
|
721
|
+
throw new Error('The filesystem backup command is solo-only; use the coordinated team backup command.');
|
|
722
|
+
}
|
|
723
|
+
const inventory = await recoveryInventoryService.collect({
|
|
724
|
+
dataDir: options.dataDir,
|
|
725
|
+
env,
|
|
726
|
+
// Integrated archives stage only the configured data root. Historical
|
|
727
|
+
// package plugin locations are compatibility inputs supplied by the
|
|
728
|
+
// runtime image, not operator state to copy from the host package tree.
|
|
729
|
+
legacyPluginsDirectories: [],
|
|
730
|
+
});
|
|
731
|
+
if (!inventory.restoreReady) {
|
|
732
|
+
throw new Error(`Recovery inventory blocked backup creation: ${inventory.blockers.join('; ')}`);
|
|
733
|
+
}
|
|
734
|
+
const parent = path.dirname(path.resolve(options.outputPath));
|
|
735
|
+
fs.mkdirSync(parent, { recursive: true, mode: 0o700 });
|
|
736
|
+
const scratch = fs.mkdtempSync(path.join(parent, '.libre-backup-'));
|
|
737
|
+
const staged = path.join(scratch, 'payload');
|
|
738
|
+
try {
|
|
739
|
+
fs.mkdirSync(staged, { mode: 0o700 });
|
|
740
|
+
copyPhysicalTree(options.dataDir, path.join(staged, 'data'));
|
|
741
|
+
stageProtectedRuntimeConfiguration(staged, env);
|
|
742
|
+
assertSourceMatchesStagedData(options.dataDir, inspectFiles(staged));
|
|
743
|
+
const pkg = loadAppPackage(import.meta.url);
|
|
744
|
+
const manifest = {
|
|
745
|
+
format: 'libre-webui-integrated-backup',
|
|
746
|
+
version: 1,
|
|
747
|
+
backupId: crypto.randomUUID(),
|
|
748
|
+
createdAt: (options.now ?? new Date()).toISOString(),
|
|
749
|
+
application: {
|
|
750
|
+
name: 'libre-webui',
|
|
751
|
+
version: pkg.version || 'unknown',
|
|
752
|
+
nodeVersion: process.version,
|
|
753
|
+
},
|
|
754
|
+
source: {
|
|
755
|
+
platformMode: env.LIBRE_PLATFORM_MODE || 'solo',
|
|
756
|
+
databaseBackend: env.DATABASE_BACKEND || 'sqlite',
|
|
757
|
+
blobBackend: env.BLOB_STORE_BACKEND || 'local',
|
|
758
|
+
vectorBackend: env.VECTOR_STORE_BACKEND || 'embedded',
|
|
759
|
+
},
|
|
760
|
+
inventory: {
|
|
761
|
+
format: inventory.format,
|
|
762
|
+
version: inventory.version,
|
|
763
|
+
...(inventory.database.schema.fingerprint
|
|
764
|
+
? { schemaFingerprint: inventory.database.schema.fingerprint }
|
|
765
|
+
: {}),
|
|
766
|
+
...(inventory.encryption.fingerprint
|
|
767
|
+
? { encryptionKeyFingerprint: inventory.encryption.fingerprint }
|
|
768
|
+
: {}),
|
|
769
|
+
},
|
|
770
|
+
exclusions: [...inventory.exclusions],
|
|
771
|
+
};
|
|
772
|
+
return sealBackupPayload({
|
|
773
|
+
payloadDirectory: staged,
|
|
774
|
+
outputPath: options.outputPath,
|
|
775
|
+
encryptionKeyPath: options.encryptionKeyPath,
|
|
776
|
+
signingPrivateKeyPath: options.signingPrivateKeyPath,
|
|
777
|
+
manifest,
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
finally {
|
|
781
|
+
fs.rmSync(scratch, { recursive: true, force: true });
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
export const restoreBackupArchive = async (options) => {
|
|
785
|
+
const target = path.resolve(options.targetDirectory);
|
|
786
|
+
if (fs.existsSync(target)) {
|
|
787
|
+
const stat = assertPhysicalDirectory(target, 'Restore target');
|
|
788
|
+
if (stat && fs.readdirSync(target).length > 0) {
|
|
789
|
+
throw new Error('Restore target must not exist or must be empty.');
|
|
790
|
+
}
|
|
791
|
+
fs.rmdirSync(target);
|
|
792
|
+
}
|
|
793
|
+
const parent = path.dirname(target);
|
|
794
|
+
fs.mkdirSync(parent, { recursive: true, mode: 0o700 });
|
|
795
|
+
const verification = verifyBackupArchive({
|
|
796
|
+
archivePath: options.archivePath,
|
|
797
|
+
signingPublicKeyPath: options.signingPublicKeyPath,
|
|
798
|
+
});
|
|
799
|
+
const parsed = verifyHeader(options.archivePath, options.signingPublicKeyPath);
|
|
800
|
+
const scratch = fs.mkdtempSync(path.join(parent, '.libre-restore-'));
|
|
801
|
+
let applied = false;
|
|
802
|
+
try {
|
|
803
|
+
const payload = path.join(scratch, 'payload');
|
|
804
|
+
decryptInto(options.archivePath, parsed.payloadOffset, parsed.header, options.encryptionKeyPath, payload);
|
|
805
|
+
const inventory = await collectRestoreInventory(payload, options.env ?? process.env);
|
|
806
|
+
if (!inventory.restoreReady) {
|
|
807
|
+
throw new Error(`Restored payload failed recovery verification (${inventory.blockers.length} blocker(s)).`);
|
|
808
|
+
}
|
|
809
|
+
if (options.apply) {
|
|
810
|
+
fs.renameSync(payload, target);
|
|
811
|
+
const directory = fs.openSync(parent, fs.constants.O_RDONLY);
|
|
812
|
+
try {
|
|
813
|
+
fs.fsyncSync(directory);
|
|
814
|
+
}
|
|
815
|
+
finally {
|
|
816
|
+
fs.closeSync(directory);
|
|
817
|
+
}
|
|
818
|
+
applied = true;
|
|
819
|
+
}
|
|
820
|
+
return {
|
|
821
|
+
applied,
|
|
822
|
+
targetDirectory: target,
|
|
823
|
+
inventory,
|
|
824
|
+
verification: { ...verification, payloadVerified: true },
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
finally {
|
|
828
|
+
if (!applied)
|
|
829
|
+
fs.rmSync(target, { recursive: true, force: true });
|
|
830
|
+
fs.rmSync(scratch, { recursive: true, force: true });
|
|
831
|
+
}
|
|
832
|
+
};
|
|
833
|
+
export const verifyRestoredBackup = async (targetDirectory, env = process.env) => {
|
|
834
|
+
const target = path.resolve(targetDirectory);
|
|
835
|
+
assertPhysicalDirectory(target, 'Restored backup root');
|
|
836
|
+
const inventory = await collectRestoreInventory(target, env);
|
|
837
|
+
if (!inventory.restoreReady) {
|
|
838
|
+
throw new Error(`Restored environment failed verification (${inventory.blockers.length} blocker(s)).`);
|
|
839
|
+
}
|
|
840
|
+
return inventory;
|
|
841
|
+
};
|
|
842
|
+
//# sourceMappingURL=backupArchive.js.map
|