feat: Generic file storage abstraction layer#13
Draft
falfaddaghi wants to merge 6 commits intoadw/feature-workspace-recent-changes-panel-857b7bc9from
Draft
feat: Generic file storage abstraction layer#13falfaddaghi wants to merge 6 commits intoadw/feature-workspace-recent-changes-panel-857b7bc9from
falfaddaghi wants to merge 6 commits intoadw/feature-workspace-recent-changes-panel-857b7bc9from
Conversation
d8622a3 to
76a90b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a pluggable
StorageProviderabstraction layer for all server-side file I/O in Nexus Workflow Studio. The current tight coupling tonode:fs/promisesin workspace, brain, snapshot, and collaboration modules is replaced by a single interface with aLocalFilesystemProviderdefault. Adding new storage backends (S3, Azure Blob, SharePoint) will require only implementing the interface and registering the provider — no changes to any consumer.Implementation plan: docs/tasks/feature-generic-file-storage-b8dbb4a6/plan-feature-generic-file-storage-b8dbb4a6.md
ADW tracking ID:
b8dbb4a6Checklist
StorageProviderinterface and supporting types (StorageMetadata,StorageProviderType) insrc/lib/storage/types.tsNEXUS_STORAGE_PROVIDERandNEXUS_STORAGE_ROOTenv var supportLocalFilesystemProviderwrapping currentfsbehavior with path traversal guardregisterStorageProvider()for extensibilitysrc/lib/storage/index.tsLocalFilesystemProvider(all interface methods + edge cases)workspace/server.tsto useStorageProvider(remove directfsimports)workspace/snapshots.tsto useStorageProviderbrain/server.tsto useStorageProvidercollaboration/object-store.tsto accept aStorageProviderbun run typecheck,bun run lint,bun run buildall passKey Changes
src/lib/storage/module withtypes.ts,local-provider.ts,factory.ts,config.ts,index.tsworkspace/server.ts,workspace/snapshots.ts,brain/server.ts,collaboration/object-store.ts) migrated off directnode:fs/promisesimportsregisterStorageProvider()API enables third-party storage backends with zero core changeswriteAtomic()method preserves crash-safe temp-file-then-rename behavior used by snapshots and collab stateUint8Array) supported viareadBytes()/writeBytes()for collaboration state