WeKnora/internal
wizardchen 234110b540 refactor(router): split the 2390-line router.go by domain and dedupe the file proxies
router.go now holds only engine assembly (RouterParams / NewRouter /
trustedProxies, 300 lines); the Register* functions move to domain files —
routes_auth_tenant.go, routes_knowledge.go, routes_chat.go, routes_agent.go,
routes_infra.go — and the five file-proxy surfaces (/files, KB-scoped files,
presigned, presigned-preview, /r/:token grants) move to files.go with the
frontend SPA server in static.go. Pure moves; every route, guard chain and
API-key policy declaration is unchanged, as verified by the existing route
tests and the startup policy self-check.

files.go additionally consolidates the plumbing the four handlers each
hand-rolled: LOCAL_STORAGE_BASE_DIR resolution (localStorageAbsDir),
backend-ID/provider parsing (parseStorageTarget), file_path query validation
(requireFilePathQuery), resource-catalog tenancy mapping
(resolveCatalogResource), tenant-storage resolution with and without the
global-service fallback, and the shared success response including HEAD
short-circuit (streamStoredFile).

Also reattaches the RegisterMCPServiceRoutes doc comment that had been
stranded on top of RegisterSystemAdminRoutes, drops the swagger blank import
duplicated into every split file, and documents why AllowCredentials is
inert under the wildcard CORS origin.
2026-07-27 11:25:23 +08:00
..
agent fix(agent): harden search-target scope and model-handle policies 2026-07-27 11:05:43 +08:00
application fix(agent): harden search-target scope and model-handle policies 2026-07-27 11:05:43 +08:00
assets feat(assets): add ASR test audio file and embed it in the application 2026-04-02 21:27:27 +08:00
common fix(redis): harden TLS tests and surface TLS config at startup 2026-07-06 23:04:52 +08:00
config refactor(terminology): rename user-facing tenant labels to workspace 2026-07-14 16:14:43 +08:00
container fix(tasks): dequeue work for deleted knowledge bases 2026-07-23 12:17:14 +08:00
database feat(system-info): surface DB migration errors with troubleshooting links 2026-05-14 16:34:50 +08:00
datasource feat(knowledge): add scoped activity audit trail 2026-07-23 10:50:32 +08:00
errors refactor(terminology): rename user-facing tenant labels to workspace 2026-07-14 16:14:43 +08:00
event feat(mcp): prompt and resume OAuth authorization mid-conversation 2026-06-29 23:22:28 +08:00
handler fix(org): disambiguate shared-space terms and tighten invite search 2026-07-24 11:42:27 +08:00
im fix(im): harden Yunzhijia image download and prune dead validation 2026-07-23 12:41:19 +08:00
infrastructure feat(web-search): add Zhipu AI web search provider support 2026-07-20 12:15:35 +08:00
logger feat(tracing): migrate langfuse client to OTLP/OTel wire protocol 2026-07-17 16:30:45 +08:00
mcp fix(mcp): coordinate OAuth token refresh and authorization polling 2026-07-23 15:35:24 +08:00
middleware refactor(auth): unify session-context attachment and split the Auth middleware 2026-07-27 11:25:23 +08:00
modelcontext fix(agent): harden search-target scope and model-handle policies 2026-07-27 11:05:43 +08:00
models refactor(agent): introduce modelcontext registry and fix handle-codec bugs 2026-07-27 11:05:43 +08:00
ratelimit feat(embed): add backend embed channels with auth and rate limiting (#1657) 2026-06-12 23:10:39 +08:00
router refactor(router): split the 2390-line router.go by domain and dedupe the file proxies 2026-07-27 11:25:23 +08:00
runtime fix(redis): harden TLS tests and surface TLS config at startup 2026-07-06 23:04:52 +08:00
sandbox perf(sandbox): compile command-substitution regexps once 2026-06-16 19:51:32 +08:00
searchutil fix(chat): use Markdown for LLM image context and normalize legacy XML 2026-07-15 18:10:31 +08:00
storageallowlist fix(storage): align default provider fallback with STORAGE_ALLOW_LIST 2026-07-15 11:05:00 +08:00
stream feat(redis): support TLS for Redis connections (#1930) 2026-07-06 23:02:02 +08:00
tracing/langfuse feat(llm): add prompt-cache observability and wiki cache-friendly prompts 2026-07-23 19:17:30 +08:00
types refactor(agent): introduce modelcontext registry and fix handle-codec bugs 2026-07-27 11:05:43 +08:00
utils fix(agent): harden search-target scope and model-handle policies 2026-07-27 11:05:43 +08:00