docs: replace file-reference lists with module tables (batch A)

Replace trailing File Reference sections in 7 docs with 3-4 row
module-level tables. Column schema: Module | Path | Purpose.
Adds 1-line grep hint at end of each section. Also fixes one
body .go:line citation in 05-channels-messaging.md.
This commit is contained in:
viettranx committed 2026-04-19 15:37:59 +07:00
1 parent d7e2883926
commit 653df6fb52
7 files changed
+55 -279

No files matched your search

+8 -30
View File
@@ -722,36 +722,14 @@ GoClaw v3 Wave 2 adds composable request middleware, error classification, per-m
## 14. File Reference
| File | Purpose |
|------|---------|
| `internal/providers/middleware.go` | RequestMiddleware type, ComposeMiddlewares, ApplyMiddlewares (zero-alloc fast path) |
| `internal/providers/middleware_cache.go` | CacheMiddleware for prompt caching |
| `internal/providers/middleware_service_tier.go` | ServiceTierMiddleware for routing hints |
| `internal/providers/error_classify.go` | ErrorClassifier, DefaultClassifier, 9 failover reasons, context overflow detection |
| `internal/providers/cooldown.go` | CooldownTracker: per-model:provider failure state, reason-dependent durations, probe intervals |
| `internal/providers/failover.go` | RunWithFailover[T]: 2-tier logic, profile rotation, model fallback, candidate exhaustion |
| `internal/providers/model_registry.go` | ModelRegistry, ModelSpec, InMemoryRegistry, forward-compat resolver, seeded defaults |
| `internal/providers/embedding_openai.go` | OpenAI embedding provider (text-embedding-3-small, 1536 dims, batch 2048) |
| `internal/providers/embedding_voyage.go` | Voyage AI embedding provider |
| `internal/providers/types.go` | Provider interface, ChatRequest, ChatResponse, Message, ToolCall, Usage types |
| `internal/providers/anthropic.go` | Anthropic provider: native HTTP + SSE, request/response marshaling |
| `internal/providers/anthropic_request.go` | Anthropic request builder: message formatting, tool schemas, system blocks |
| `internal/providers/anthropic_stream.go` | Anthropic SSE event parsing and response accumulation |
| `internal/providers/openai.go` | OpenAI-compatible provider: generic HTTP client for 10+ endpoints |
| `internal/providers/openai_types.go` | OpenAI request/response types and message formatting |
| `internal/providers/openai_gemini.go` | Gemini-specific compatibility: empty content handling, tool schema cleaning |
| `internal/providers/claude_cli.go` | ClaudeCLIProvider: orchestrates local claude CLI binary via stdio |
| `internal/providers/claude_cli_chat.go` | Chat/ChatStream implementation for CLI provider |
| `internal/providers/claude_cli_session.go` | Session management: per-session state, history, workspace |
| `internal/providers/claude_cli_mcp.go` | MCP configuration and server bridge for CLI provider |
| `internal/providers/codex.go` | CodexProvider: OAuth-based ChatGPT Responses API |
| `internal/providers/codex_build.go` | Codex request builder: message formatting, phase handling |
| `internal/providers/dashscope.go` | DashScope provider: OpenAI-compat wrapper with thinking budget, tools+streaming fallback |
| `internal/providers/acp_provider.go` | ACPProvider: orchestrates ACP-compatible agent subprocesses |
| `internal/providers/retry.go` | RetryDo[T] generic function, RetryConfig, IsRetryableError, backoff computation |
| `internal/providers/schema_cleaner.go` | CleanSchemaForProvider, CleanToolSchemas, recursive schema field removal |
| `internal/providers/registry.go` | Provider registry: registration, lookup, lifecycle management |
| `cmd/gateway_providers.go` | Provider registration from config and database during gateway startup |
| Module | Path | Purpose |
|---|---|---|
| Provider implementations | `internal/providers/` | Anthropic, OpenAI-compatible, Claude CLI, Codex, ACP, DashScope providers; retry logic; schema cleaning; model registry; embedding providers |
| Resilience middleware | `internal/providers/` | `middleware*.go`, `error_classify.go`, `cooldown.go`, `failover.go` — request middleware, error classification, 2-tier failover |
| Provider interface & types | `internal/providers/types.go` | `Provider` interface, `ChatRequest`, `ChatResponse`, `Message`, `ToolCall`, `Usage` |
| Gateway wiring | `cmd/gateway_providers.go` | Provider registration from config and database at startup |
Use `grep` or your editor's symbol search for specific files.
---