Directories
¶
| Path | Synopsis |
|---|---|
|
cli
module
|
|
|
client
module
|
|
|
cmd
|
|
|
desktop
command
|
|
|
download/duckdb
command
|
|
|
milvus-migrate
command
milvus-migrate 将旧版 Milvus Collection 复制为支持中英文 BM25 的新 Collection。
|
milvus-migrate 将旧版 Milvus Collection 复制为支持中英文 BM25 的新 Collection。 |
|
server
command
Bootstrap-time hooks that run after the DI container is built but before the HTTP server starts listening.
|
Bootstrap-time hooks that run after the DI container is built but before the HTTP server starts listening. |
|
docreader
|
|
|
client
Package client provides a docreader gRPC client and the shared TLS / token authentication helpers used by both the standalone Go SDK in this package and the internal docparser wrapper.
|
Package client provides a docreader gRPC client and the shared TLS / token authentication helpers used by both the standalone Go SDK in this package and the internal docparser wrapper. |
|
Package docs Code generated by swaggo/swag.
|
Package docs Code generated by swaggo/swag. |
|
poc/docker-sandbox
module
|
|
|
internal
|
|
|
agent/approval
Package approval implements human-in-the-loop gating for dangerous MCP tool calls (issue #1173).
|
Package approval implements human-in-the-loop gating for dangerous MCP tool calls (issue #1173). |
|
agent/compaction
Package compaction keeps an agent turn inside the model's context window by replacing older conversation with a structured summary.
|
Package compaction keeps an agent turn inside the model's context window by replacing older conversation with a structured summary. |
|
agent/skills
Package skills provides Agent Skills functionality following Claude's Progressive Disclosure pattern.
|
Package skills provides Agent Skills functionality following Claude's Progressive Disclosure pattern. |
|
agent/token
Package token provides token estimation for LLM context window management.
|
Package token provides token estimation for LLM context window management. |
|
agent/tools
Package tools — capability requirements for built-in agent tools.
|
Package tools — capability requirements for built-in agent tools. |
|
application/access
Package access resolves resource permissions independently of HTTP routing.
|
Package access resolves resource permissions independently of HTTP routing. |
|
application/attachment
Package attachment owns session-authorized attachment reads.
|
Package attachment owns session-authorized attachment reads. |
|
application/repository
Package repository persists sandbox backend configuration.
|
Package repository persists sandbox backend configuration. |
|
application/repository/retriever/elasticsearch/v7
Package v7 implements the Elasticsearch v7 retriever engine repository It provides functionality for storing and retrieving embeddings using Elasticsearch v7 The repository supports both single and batch operations for saving and deleting embeddings It also supports retrieving embeddings using different retrieval methods The repository is used to store and retrieve embeddings for different tasks It is used to store and retrieve embeddings for different tasks
|
Package v7 implements the Elasticsearch v7 retriever engine repository It provides functionality for storing and retrieving embeddings using Elasticsearch v7 The repository supports both single and batch operations for saving and deleting embeddings It also supports retrieving embeddings using different retrieval methods The repository is used to store and retrieve embeddings for different tasks It is used to store and retrieve embeddings for different tasks |
|
application/repository/retriever/elasticsearch/v8
Package v8 implements retrieval against its configured vector backend.
|
Package v8 implements retrieval against its configured vector backend. |
|
application/repository/retriever/milvus
Package milvus implements the Milvus retrieve engine, including multilingual BM25.
|
Package milvus implements the Milvus retrieve engine, including multilingual BM25. |
|
application/repository/retriever/opensearch
Package opensearch implements the RetrieveEngineRepository interface for OpenSearch k-NN native vector search.
|
Package opensearch implements the RetrieveEngineRepository interface for OpenSearch k-NN native vector search. |
|
application/repository/retriever/postgres
Package postgres implements retrieval against its configured vector backend.
|
Package postgres implements retrieval against its configured vector backend. |
|
application/repository/retriever/qdrant
Package qdrant implements vector retrieval and metadata updates in Qdrant.
|
Package qdrant implements vector retrieval and metadata updates in Qdrant. |
|
application/repository/retriever/sqlite
Package sqlite implements local retrieval with SQLite FTS and vectors.
|
Package sqlite implements local retrieval with SQLite FTS and vectors. |
|
application/repository/retriever/tencentvectordb
Package tencentvectordb implements retrieval against its configured vector backend.
|
Package tencentvectordb implements retrieval against its configured vector backend. |
|
application/repository/retriever/weaviate
Package weaviate implements retrieval and metadata updates in Weaviate.
|
Package weaviate implements retrieval and metadata updates in Weaviate. |
|
application/service
Package service - artifact collector.
|
Package service - artifact collector. |
|
application/service/memory
Package memory implements cross-session long-term memory: what the system remembers about one principal inside one workspace, independently of any single chat session.
|
Package memory implements cross-session long-term memory: what the system remembers about one principal inside one workspace, independently of any single chat session. |
|
browserskill
Package browserskill connects authenticated users to an unmodified BrowserSkill daemon.
|
Package browserskill connects authenticated users to an unmodified BrowserSkill daemon. |
|
common/redislock
Package redislock provides token-owned Redis locks with atomic renewal and release.
|
Package redislock provides token-owned Redis locks with atomic renewal and release. |
|
config
Package config loads WeKnora runtime configuration.
|
Package config loads WeKnora runtime configuration. |
|
container
Package container implements dependency injection container setup Provides centralized configuration for services, repositories, and handlers This package is responsible for wiring up all dependencies and ensuring proper lifecycle management
|
Package container implements dependency injection container setup Provides centralized configuration for services, repositories, and handlers This package is responsible for wiring up all dependencies and ensuring proper lifecycle management |
|
datasource/connector/confluence
Package confluence imports Confluence Server/Data Center and Cloud spaces as Markdown.
|
Package confluence imports Confluence Server/Data Center and Cloud spaces as Markdown. |
|
datasource/connector/dingtalk
Package dingtalk implements the DingTalk document data source connector.
|
Package dingtalk implements the DingTalk document data source connector. |
|
datasource/connector/feishu/core
Package feishu implements the Feishu (飞书/Lark) data source connector for WeKnora.
|
Package feishu implements the Feishu (飞书/Lark) data source connector for WeKnora. |
|
datasource/connector/ima
Package ima implements the WeKnora data source connector for Tencent IMA (ima.qq.com), syncing documents and files out of IMA knowledge bases via the /openapi/wiki/v1 OpenAPI.
|
Package ima implements the WeKnora data source connector for Tencent IMA (ima.qq.com), syncing documents and files out of IMA knowledge bases via the /openapi/wiki/v1 OpenAPI. |
|
datasource/connector/notion
Package notion implements the Notion data source connector for WeKnora.
|
Package notion implements the Notion data source connector for WeKnora. |
|
datasource/connector/rss
Package rss implements the RSS/Atom data source connector for WeKnora.
|
Package rss implements the RSS/Atom data source connector for WeKnora. |
|
datasource/connector/seafile
Package seafile implements the WeKnora data source connector for Seafile Server (community edition 10.0.1, api2).
|
Package seafile implements the WeKnora data source connector for Seafile Server (community edition 10.0.1, api2). |
|
datasource/connector/yuque
Package yuque implements the Yuque (语雀) data source connector for WeKnora.
|
Package yuque implements the Yuque (语雀) data source connector for WeKnora. |
|
embedpolicy
Package embedpolicy separates browser framing policy from API transport origins.
|
Package embedpolicy separates browser framing policy from API transport origins. |
|
errors
Package errors: parse stage error codes.
|
Package errors: parse stage error codes. |
|
filetransport
Package filetransport streams already-authorized files.
|
Package filetransport streams already-authorized files. |
|
handler
Package handler — chunker_debug.go exposes a read-only preview endpoint that runs the adaptive chunker on supplied text without touching the DB or generating embeddings.
|
Package handler — chunker_debug.go exposes a read-only preview endpoint that runs the adaptive chunker on supplied text without touching the DB or generating embeddings. |
|
handler/dto
Package dto holds response shapes for handler responses that need to differ from the persisted GORM model — most notably, response types that must NOT carry secret fields.
|
Package dto holds response shapes for handler responses that need to differ from the persisted GORM model — most notably, response types that must NOT carry secret fields. |
|
handler/session
Package session provides RFB (VNC) client-stream parsing for the sandbox desktop relay.
|
Package session provides RFB (VNC) client-stream parsing for the sandbox desktop relay. |
|
im/feishu
Package feishu implements the Feishu (飞书) IM adapter for WeKnora, and with it the Lark adapter: Feishu and Lark are the same product on two isolated clouds (open.feishu.cn and open.larksuite.com) sharing one API surface, so a single implementation serves both.
|
Package feishu implements the Feishu (飞书) IM adapter for WeKnora, and with it the Lark adapter: Feishu and Lark are the same product on two isolated clouds (open.feishu.cn and open.larksuite.com) sharing one API surface, so a single implementation serves both. |
|
im/wechat
Adapter implements im.Adapter and im.FileDownloader for WeChat personal accounts via the Tencent iLink Bot API.
|
Adapter implements im.Adapter and im.FileDownloader for WeChat personal accounts via the Tencent iLink Bot API. |
|
im/wecom
WeCom Intelligent Bot long connection client.
|
WeCom Intelligent Bot long connection client. |
|
infrastructure/chunker
Package chunker - header_tracker.go implements context-preserving header tracking for document chunking, ported from docreader/splitter/header_hook.py.
|
Package chunker - header_tracker.go implements context-preserving header tracking for document chunking, ported from docreader/splitter/header_hook.py. |
|
infrastructure/docparser
Package docparser turns uploaded files and URLs into Markdown plus the images they contain, which is the input the chunking and multimodal stages downstream expect.
|
Package docparser turns uploaded files and URLs into Markdown plus the images they contain, which is the input the chunking and multimodal stages downstream expect. |
|
infrastructure/docparser/anydoc
Package anydoc converts office documents to Markdown inside the Go process, without the Python docreader service.
|
Package anydoc converts office documents to Markdown inside the Go process, without the Python docreader service. |
|
infrastructure/web_fetch
Package web_fetch provides a public URL content fetcher with SSRF protection.
|
Package web_fetch provides a public URL content fetcher with SSRF protection. |
|
ipclass
Package ipclass categorises IP addresses for outbound-request policy.
|
Package ipclass categorises IP addresses for outbound-request policy. |
|
localsandbox
Package localsandbox runs untrusted commands on the user's own machine under OS-enforced restrictions.
|
Package localsandbox runs untrusted commands on the user's own machine under OS-enforced restrictions. |
|
localsandbox/adapter
Package adapter connects the local sandbox to the agent's existing capability interfaces.
|
Package adapter connects the local sandbox to the agent's existing capability interfaces. |
|
localsandbox/core
Package core holds the platform-neutral sandbox contract: policy, path checks, workspace identity, and denial classification.
|
Package core holds the platform-neutral sandbox contract: policy, path checks, workspace identity, and denial classification. |
|
localsandbox/seatbelt
Package seatbelt implements the sandbox backend for macOS on top of /usr/bin/sandbox-exec.
|
Package seatbelt implements the sandbox backend for macOS on top of /usr/bin/sandbox-exec. |
|
localsandbox/skilltree
Package skilltree manages Lite's on-disk skill install tree:
|
Package skilltree manages Lite's on-disk skill install tree: |
|
localsandbox/winhost
Package winhost is the Windows sandbox backend.
|
Package winhost is the Windows sandbox backend. |
|
mcpserver
Package mcpserver hosts WeKnora's own MCP server surface: the Streamable HTTP endpoint that external MCP clients (Claude Desktop, Cursor, VS Code Copilot, ...) connect to.
|
Package mcpserver hosts WeKnora's own MCP server surface: the Streamable HTTP endpoint that external MCP clients (Claude Desktop, Cursor, VS Code Copilot, ...) connect to. |
|
middleware
Package middleware: authentication for browser WebSocket upgrades.
|
Package middleware: authentication for browser WebSocket upgrades. |
|
middleware/asynqdl
Package asynqdl provides an asynq middleware that records every task whose retry budget is exhausted into the generic task_dead_letters table.
|
Package asynqdl provides an asynq middleware that records every task whose retry budget is exhausted into the generic task_dead_letters table. |
|
modelcontext
citations.go owns the public-citation surface of the model context: the system protocol prompt, expansion of private <ref/> handles into canonical <kb/> / <web/> tags, re-compaction of canonical tags replayed from history, and the stream expander that keeps partial tags off the wire.
|
citations.go owns the public-citation surface of the model context: the system protocol prompt, expansion of private <ref/> handles into canonical <kb/> / <web/> tags, re-compaction of canonical tags replayed from history, and the stream expander that keeps partial tags off the wire. |
|
models
Package models defines shared, credential-free model metadata.
|
Package models defines shared, credential-free model metadata. |
|
models/api
Package api holds the protocol-neutral request model shared by every wire protocol implementation (OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, Google Generative AI, Ollama) plus the helpers those implementations share: SSE reading, the SSRF-safe transport, streaming tool-call assembly, prompt-cache bookkeeping and usage logging.
|
Package api holds the protocol-neutral request model shared by every wire protocol implementation (OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, Google Generative AI, Ollama) plus the helpers those implementations share: SSE reading, the SSRF-safe transport, streaming tool-call assembly, prompt-cache bookkeeping and usage logging. |
|
models/api/anthropicmessages
Package anthropicmessages implements the Anthropic Messages wire protocol (https://docs.anthropic.com/en/api/messages).
|
Package anthropicmessages implements the Anthropic Messages wire protocol (https://docs.anthropic.com/en/api/messages). |
|
models/api/arkembeddings
Package arkembeddings implements Volcengine Ark's multimodal embedding shape: an input array of typed parts answering a single `data` object.
|
Package arkembeddings implements Volcengine Ark's multimodal embedding shape: an input array of typed parts answering a single `data` object. |
|
models/api/cohererank
Package cohererank implements the rerank shape Cohere defined and almost every other vendor copied: POST {base}/rerank with {model, query, documents} answering {results: [{index, relevance_score, document}]}.
|
Package cohererank implements the rerank shape Cohere defined and almost every other vendor copied: POST {base}/rerank with {model, query, documents} answering {results: [{index, relevance_score, document}]}. |
|
models/api/dashscopeembeddings
Package dashscopeembeddings implements Alibaba Model Studio's native multimodal embedding shape: input.contents, parameters.dimension, and results under output.embeddings.
|
Package dashscopeembeddings implements Alibaba Model Studio's native multimodal embedding shape: input.contents, parameters.dimension, and results under output.embeddings. |
|
models/api/dashscoperank
Package dashscoperank implements Alibaba Model Studio's native text-rerank shape: the same fields as the Cohere dialect, wrapped in input/parameters and answered under output.
|
Package dashscoperank implements Alibaba Model Studio's native text-rerank shape: the same fields as the Cohere dialect, wrapped in input/parameters and answered under output. |
|
models/api/googleembeddings
Package googleembeddings implements Gemini's batchEmbedContents: one POST carrying a request per text, answering embeddings[].values in order.
|
Package googleembeddings implements Gemini's batchEmbedContents: one POST carrying a request per text, answering embeddings[].values in order. |
|
models/api/googlegenai
Package googlegenai implements the native Google Gemini generateContent wire protocol (https://ai.google.dev/api/generate-content).
|
Package googlegenai implements the native Google Gemini generateContent wire protocol (https://ai.google.dev/api/generate-content). |
|
models/api/nimrerank
Package nimrerank implements NVIDIA NIM's retrieval reranking shape: a query object, a passages array, and rankings carrying a logit.
|
Package nimrerank implements NVIDIA NIM's retrieval reranking shape: a query object, a passages array, and rankings carrying a logit. |
|
models/api/openaichataudio
Package openaichataudio implements speech recognition served through the chat completions endpoint: one user message whose only content part is {"type": "input_audio", "input_audio": {"data": "data:<mime>;base64,..."}}, answered by an assistant message whose content is the transcript.
|
Package openaichataudio implements speech recognition served through the chat completions endpoint: one user message whose only content part is {"type": "input_audio", "input_audio": {"data": "data:<mime>;base64,..."}}, answered by an assistant message whose content is the transcript. |
|
models/api/openaicompletions
Package openaicompletions implements the OpenAI Chat Completions wire protocol.
|
Package openaicompletions implements the OpenAI Chat Completions wire protocol. |
|
models/api/openaiembeddings
Package openaiembeddings implements the embedding shape OpenAI defined and every compatible gateway copied: POST {base}/embeddings with {model, input} answering {data: [{embedding, index}]}.
|
Package openaiembeddings implements the embedding shape OpenAI defined and every compatible gateway copied: POST {base}/embeddings with {model, input} answering {data: [{embedding, index}]}. |
|
models/api/openairesponses
Package openairesponses implements the OpenAI Responses wire protocol (POST /responses).
|
Package openairesponses implements the OpenAI Responses wire protocol (POST /responses). |
|
models/api/openaitranscriptions
Package openaitranscriptions implements the speech-to-text shape OpenAI defined and the compatible servers copied: a multipart POST to {base}/audio/transcriptions carrying file and model, answering {text}, or {text, segments} when response_format is verbose_json.
|
Package openaitranscriptions implements the speech-to-text shape OpenAI defined and the compatible servers copied: a multipart POST to {base}/audio/transcriptions carrying file and model, answering {text}, or {text, segments} when response_format is verbose_json. |
|
models/api/pineconerank
Package pineconerank implements Pinecone Inference's standalone rerank API.
|
Package pineconerank implements Pinecone Inference's standalone rerank API. |
|
models/api/teirank
Package teirank implements the native Text Embeddings Inference rerank protocol.
|
Package teirank implements the native Text Embeddings Inference rerank protocol. |
|
models/api/tencentlkeap
Package tencentlkeap implements Tencent RunRerank through its official SDK.
|
Package tencentlkeap implements Tencent RunRerank through its official SDK. |
|
models/api/volcengineknowledge
Package volcengineknowledge implements Volcengine Knowledge Service rerank through its official SDK.
|
Package volcengineknowledge implements Volcengine Knowledge Service rerank through its official SDK. |
|
models/catalog
Package catalog loads and queries model metadata.
|
Package catalog loads and queries model metadata. |
|
models/chat
Package chat exposes the Chat interface used by the application layer and builds the right protocol client for a configured model.
|
Package chat exposes the Chat interface used by the application layer and builds the right protocol client for a configured model. |
|
models/imageprep
Package imageprep turns stored image bytes into an image a model will take: converted to a format the vendor documents and shrunk to its size limit.
|
Package imageprep turns stored image bytes into an image a model will take: converted to a format the vendor documents and shrunk to its size limit. |
|
models/internal/configcopy
Package configcopy copies exported configuration data and immutable function values.
|
Package configcopy copies exported configuration data and immutable function values. |
|
models/limiter
Package limiter provides a distributed, per-key concurrency governor for outbound model-provider calls.
|
Package limiter provides a distributed, per-key concurrency governor for outbound model-provider calls. |
|
models/providers
Package providers registers Alibaba Cloud Model Studio (Bailian / DashScope) through its OpenAI-compatible mode.
|
Package providers registers Alibaba Cloud Model Studio (Bailian / DashScope) through its OpenAI-compatible mode. |
|
models/rerank
Package rerank adapts rerank protocols to application batching and score semantics.
|
Package rerank adapts rerank protocols to application batching and score semantics. |
|
models/runtime
Package runtime resolves one model's effective settings and assembles its authenticated endpoint.
|
Package runtime resolves one model's effective settings and assembles its authenticated endpoint. |
|
ratelimit
Package ratelimit provides a Redis-backed sliding-window rate limiter with a local in-memory fallback when Redis is unavailable (Lite / single-instance).
|
Package ratelimit provides a Redis-backed sliding-window rate limiter with a local in-memory fallback when Redis is unavailable (Lite / single-instance). |
|
reranking
Package reranking is the single rerank stage shared by the chat pipeline, the agent search_knowledge tool and the retrieval APIs: passage building, model scoring, threshold filtering with degradation, composite scoring and MMR selection.
|
Package reranking is the single rerank stage shared by the chat pipeline, the agent search_knowledge tool and the retrieval APIs: passage building, model scoring, threshold filtering with degradation, composite scoring and MMR selection. |
|
runtime
Package runtime 提供应用程序运行时的依赖注入容器 该包使用 uber 的 dig 库来管理依赖项注入
|
Package runtime 提供应用程序运行时的依赖注入容器 该包使用 uber 的 dig 库来管理依赖项注入 |
|
sandbox
Package sandbox: session-scoped capability interfaces.
|
Package sandbox: session-scoped capability interfaces. |
|
sourceloc
Package sourceloc maps parsed Markdown back to positions in the original file: it re-aims parser-reported source blocks after the ingestion pipeline rewrites the text, aligns parser output to the structure of office files, and derives the per-chunk locators that citations open.
|
Package sourceloc maps parsed Markdown back to positions in the original file: it re-aims parser-reported source blocks after the ingestion pipeline rewrites the text, aligns parser output to the structure of office files, and derives the per-chunk locators that citations open. |
|
storageurl
Package storageurl converts internal storage references into HTTP(S) URLs an external client can load directly.
|
Package storageurl converts internal storage references into HTTP(S) URLs an external client can load directly. |
|
textconv
Package textconv provides the text conversion used by FAQ normalization.
|
Package textconv provides the text conversion used by FAQ normalization. |
|
tracing/langfuse
Package langfuse implements WeKnora's Langfuse/LiteFuse LLM tracing client on top of the OpenTelemetry Go SDK.
|
Package langfuse implements WeKnora's Langfuse/LiteFuse LLM tracing client on top of the OpenTelemetry Go SDK. |
|
types
Package types defines data structures and types used throughout the system These types are shared across different service modules to ensure data consistency
|
Package types defines data structures and types used throughout the system These types are shared across different service modules to ensure data consistency |
|
types/interfaces
Package interfaces defines the interface contracts for custom agent management
|
Package interfaces defines the interface contracts for custom agent management |
|
pluginsdk
module
|
Click to show internal directories.
Click to hide internal directories.