Context
Artifact Studio's Workspace Storage v1 milestone should use this layering:
Artifact Studio tenant/binding/crypto policy
-> @nestm/storage capability workspace and CAS
-> Files SDK generic data plane
-> FS / S3
Files SDK already owns generic adapters, file operations, capabilities, retries, transfer/sync, plugins, and a framework-neutral gateway. @nestm/storage should remain the hardened NestJS 12 and workspace-capability layer, not a second generic storage SDK.
Official references: Files SDK, plugins, gateway, and capabilities.
Current alpha.8 correctness gap
Normal operations pass through the configured Files instance, but conditional operations call adapter extensions directly:
Workspace mutations use those conditional paths (workspace writes). Consequently, Files SDK transforming, veto, and observation plugins do not consistently see workspace operations. Enabling encryption, validation, audit, versioning, or soft-delete plugins could produce split behavior between ordinary and conditional calls.
Alpha.8 already enforces prefix, read-only mode, key budgets, and default operation controls for these extensions. This issue is about the missing common policy/plugin boundary; it must not weaken CAS by emulating conditional writes with head-then-write.
Scope
- Define one documented transformation/veto/observation boundary covering ordinary and conditional read/write/delete/promotion operations.
- Make plugin compatibility explicit. Unsupported combinations must fail closed at construction or invocation, never silently bypass protection.
- Preserve native create-only, compare-and-replace, exact-read, compare-and-delete, and promotion guarantees.
- Delegate generic transfer/sync, provider loading, and gateway mechanics to Files SDK where its contract is equivalent; keep only NestM policy or compatibility code.
- Retain NestJS 12 named-store DI,
StorageWorkspace permissions/limits/CAS, safe AI tools, and bounded public errors.
- Treat Files SDK conditional capabilities as an upstream contribution target; retain local FS/S3 extensions until upstream offers equivalent guarantees.
Acceptance criteria
Context
Artifact Studio's Workspace Storage v1 milestone should use this layering:
Files SDK already owns generic adapters, file operations, capabilities, retries, transfer/sync, plugins, and a framework-neutral gateway.
@nestm/storageshould remain the hardened NestJS 12 and workspace-capability layer, not a second generic storage SDK.Official references: Files SDK, plugins, gateway, and capabilities.
Current alpha.8 correctness gap
Normal operations pass through the configured
Filesinstance, but conditional operations call adapter extensions directly:Workspace mutations use those conditional paths (workspace writes). Consequently, Files SDK transforming, veto, and observation plugins do not consistently see workspace operations. Enabling encryption, validation, audit, versioning, or soft-delete plugins could produce split behavior between ordinary and conditional calls.
Alpha.8 already enforces prefix, read-only mode, key budgets, and default operation controls for these extensions. This issue is about the missing common policy/plugin boundary; it must not weaken CAS by emulating conditional writes with head-then-write.
Scope
StorageWorkspacepermissions/limits/CAS, safe AI tools, and bounded public errors.Acceptance criteria