feat(sync): auto-discover backends, per-backend auth, S3 backend

Problem: sync backends were hardcoded in `SYNC_BACKENDS` list in
`init.lua`, auth routed directly through `oauth.google_client`, and
adding a non-OAuth backend required editing multiple files.

Solution: replace hardcoded list with `discover_backends()` that globs
`lua/pending/sync/*.lua` at runtime. Rewrite `M.auth()` to dispatch
to per-backend `auth()` methods with `vim.ui.select` fallback. Add
`lua/pending/sync/s3.lua` with push/pull/sync via AWS CLI, per-task
merge by `_s3_sync_id` (UUID), and `pending.S3Config` type.
This commit is contained in:
Barrett Ruth 2026-03-08 19:50:58 -04:00
parent 27190fd26c
commit a83f500144
8 changed files with 1000 additions and 42 deletions

View file

@ -5,6 +5,10 @@ local log = require('pending.log')
---@field stdout string
---@field stderr string
---@class pending.CountPart
---@field [1] integer
---@field [2] string
---@class pending.sync.util
local M = {}
@ -61,7 +65,7 @@ function M.finish(s)
end
end
---@param parts [integer, string][]
---@param parts pending.CountPart[]
---@return string
function M.fmt_counts(parts)
local items = {}