vikunja/veans/internal/client
Tink bot 814b2a635f feat(veans): install agent hooks during init instead of just printing
Adds a final step to bootstrap.Init that offers to wire `veans prime`
into Claude Code and OpenCode automatically. Per-agent yes/no prompts
default to "yes" for Claude Code and "no" for OpenCode; --install-claude
/ --install-opencode flags skip the prompt for scripted contexts;
--no-hooks falls back to the previous behaviour of just printing the
snippets.

Claude Code:
  - Writes/merges .claude/settings.json
  - JSON merge preserves existing keys (model, permissions, other hooks)
    and only appends a `veans prime` command entry under SessionStart
    and PreCompact if one isn't already there
  - Idempotent: re-running reports "Already configured" without
    duplicating entries

OpenCode:
  - Writes .opencode/plugin/veans-prime.ts with the standard handler
    skeleton
  - Existing files are left alone (no TS-merge story for v0)

Failures during hook install are non-fatal: the repo is already
configured, so the user gets a warning + the printed snippets as a
fallback path.

Unit tests cover the merge logic (fresh file, idempotent rerun,
preserving user's other hooks/keys), the install actions
("Wrote"/"Updated"/"Already configured"), and the offer flow
(flags-bypass-prompt vs prompt-when-unset vs no-hooks).
2026-05-27 08:21:57 +00:00
..
assignees.go feat(veans): install agent hooks during init instead of just printing 2026-05-27 08:21:57 +00:00
auth.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
buckets.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
client.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
comments.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
info.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
labels.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
projects.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
relations.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
routes.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
routes_test.go chore(veans): apply veans golangci pass across sources 2026-05-27 08:21:57 +00:00
tasks.go feat(veans): install agent hooks during init instead of just printing 2026-05-27 08:21:57 +00:00
tokens.go feat(veans): install agent hooks during init instead of just printing 2026-05-27 08:21:57 +00:00
types.go feat(veans): install agent hooks during init instead of just printing 2026-05-27 08:21:57 +00:00
users.go feat(veans): install agent hooks during init instead of just printing 2026-05-27 08:21:57 +00:00