vikunja/veans/e2e
kolaente 6cee626383 refactor(veans): migrate API client from v1 to v2
veans is unreleased and targets bleeding-edge Vikunja, so the CLI now
speaks the Huma-backed /api/v2 exclusively (v1 is frozen and the kanban
bucket CRUD veans relies on only exists on v2).

- Transport: base path /api/v1 -> /api/v2 in Do/DoRaw; add a
  content-type-aware path (DoMerge for application/merge-patch+json).
- Pagination: drop the x-pagination-total-pages header reader; every v2
  list returns the {items,total,page,per_page,total_pages} envelope.
  Decode it with a generic Paginated[T]/doList[T] and page until
  page >= total_pages. Previously-single-GET lists (views, buckets,
  comments, bots) are enveloped too — unwrap .items.
- Verbs: creates flip PUT -> POST (projects, labels, tokens, bot users,
  shares, task create, comments, relations, assignees, label-attach,
  bucket create); the bucket-task move flips POST -> PUT with a bare
  {"task_id":N} body (URL owns project/view/bucket); task update moves
  to PATCH merge-patch with a partial body.
- Errors: parse the RFC 9457 problem+json body (detail/title/code)
  instead of v1's {code,message}; the status -> output.Code mapping is
  unchanged.
- Discovery probes /api/v2/info, which doubles as the "new enough" check.
- Label search param s -> q; add views_buckets_tasks_put to the bot's
  projects scope so the move is authorized regardless of route-init order.

Tests and the veans agent guide are updated for the new paths, verbs and
envelope. Verified end-to-end against a local v2 server: init, create,
show, list, claim, update and prime all work.
2026-06-26 11:23:14 +00:00
..
claim_test.go feat(veans): install agent hooks during init instead of just printing 2026-05-27 08:21:57 +00:00
helpers.go feat(veans): offer "create a new project" from init's picker 2026-05-27 08:21:57 +00:00
init_test.go refactor(veans): migrate API client from v1 to v2 2026-06-26 11:23:14 +00:00
main_test.go feat(veans): offer "create a new project" from init's picker 2026-05-27 08:21:57 +00:00
prime_test.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
shared_test.go feat(veans): offer "create a new project" from init's picker 2026-05-27 08:21:57 +00:00
tasks_test.go feat(veans): offer "create a new project" from init's picker 2026-05-27 08:21:57 +00:00