plugins/file/commands/upload architecture

Implements the upload subcommand for the file plugin, defining its CLI metadata and handling the full pipeline of validating arguments, resolving workspace-relative paths, and encrypting files for Blossom upload with NIP-44 key sharing and publishing a replaceable Nostr file event.

Architectural role

Outbound leaf of the secure-transfer pair (complement to download) within the file plugin's command aggregation. Operates as a dispatched leaf beneath adapter.ts/handleFile and init.ts registration, reusing the shared workspace-containment validation before executing the encrypt-upload-publish chain. Provides the workspace-to-recipient direction of the Nostr/Blossom NIP-44 flow with hash-based deduplication via replaceable FILE_KIND events, which download reverses.

Source map

Integration details