gitFlow/internal/ai
dimitar b83a4baebd refactor: M1 — extract shared HTTP client from AI package
Pull the private `client`/`postJSON` from `internal/ai` into a standalone
`internal/httpclient` package so both the AI providers and the upcoming
webhook senders can share the same bounded-reader, timeout-guarded JSON
HTTP client without introducing a dependency cycle.

Changes:
- internal/httpclient: Client struct with PostJSON(ctx, url, headers,
  payload, out), functional options WithTimeout/WithTransport, a 4 MiB
  response cap, and a 60s default timeout
- internal/ai: three providers (OpenAI, Ollama, Anthropic) now embed an
  `*httpclient.Client` (field renamed from `client` to `http`); the old
  `client.go` is deleted
- All 11 test packages pass (ai tests are byte-for-byte unaffected)

This zero-behaviour refactor unblocks the webhook package distributed in
M5, which needs the exact same JSON-post-and-decode helper.
2026-08-02 09:04:12 +02:00
..
ai_test.go feat: phase 5 — AI agent integration (OpenAI, Ollama, Anthropic) 2026-08-02 08:48:27 +02:00
ai.go feat: phase 5 — AI agent integration (OpenAI, Ollama, Anthropic) 2026-08-02 08:48:27 +02:00
anthropic.go refactor: M1 — extract shared HTTP client from AI package 2026-08-02 09:04:12 +02:00
execute_test.go feat: phase 5 — AI agent integration (OpenAI, Ollama, Anthropic) 2026-08-02 08:48:27 +02:00
execute.go feat: phase 5 — AI agent integration (OpenAI, Ollama, Anthropic) 2026-08-02 08:48:27 +02:00
ollama.go refactor: M1 — extract shared HTTP client from AI package 2026-08-02 09:04:12 +02:00
openai.go refactor: M1 — extract shared HTTP client from AI package 2026-08-02 09:04:12 +02:00
parse.go feat: phase 5 — AI agent integration (OpenAI, Ollama, Anthropic) 2026-08-02 08:48:27 +02:00
prompt.go feat: phase 5 — AI agent integration (OpenAI, Ollama, Anthropic) 2026-08-02 08:48:27 +02:00