WeKnora deployment source with the reviewed wiki identity, summary and recovery fixes
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-weknora) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (latest, advisory) (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Build & Publish (dsh-weknora) / Publish to npm (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-weknora) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-weknora) / End-to-end inside dsh (latest, advisory) (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Build & Publish (dsh-weknora) / Publish to npm (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package docreader;
|
||||
|
||||
option go_package = "github.com/Tencent/WeKnora/internal/docreader/proto";
|
||||
|
||||
service DocReader {
|
||||
rpc Read(ReadRequest) returns (ReadResponse) {}
|
||||
// ReadStream is the streaming counterpart of Read. It first emits one
|
||||
// ReadStreamResponse carrying the parse metadata (markdown / metadata /
|
||||
// error), then emits one message per image. This keeps every gRPC message
|
||||
// small so large scanned PDFs (hundreds of page images, far exceeding the
|
||||
// unary message-size cap) can be returned without RESOURCE_EXHAUSTED and
|
||||
// with bounded memory on both ends.
|
||||
rpc ReadStream(ReadRequest) returns (stream ReadStreamResponse) {}
|
||||
rpc ListEngines(ListEnginesRequest) returns (ListEnginesResponse) {}
|
||||
}
|
||||
|
||||
message ReadConfig {
|
||||
string parser_engine = 1;
|
||||
map<string, string> parser_engine_overrides = 2;
|
||||
// image_storage removed: image persistence is now handled entirely by the Go App.
|
||||
// Field number 3 is reserved for backward compatibility.
|
||||
reserved 3;
|
||||
}
|
||||
|
||||
// Unified read request: set file_content for file mode, url for URL mode.
|
||||
message ReadRequest {
|
||||
bytes file_content = 1;
|
||||
string file_name = 2;
|
||||
string file_type = 3;
|
||||
string url = 4;
|
||||
string title = 5;
|
||||
ReadConfig config = 6;
|
||||
string request_id = 7;
|
||||
}
|
||||
|
||||
message ImageRef {
|
||||
string filename = 1;
|
||||
string original_ref = 2;
|
||||
string mime_type = 3;
|
||||
string storage_key = 4; // download URL from shared storage
|
||||
bytes image_data = 5; // inline bytes fallback
|
||||
}
|
||||
|
||||
message ReadResponse {
|
||||
string markdown_content = 1;
|
||||
repeated ImageRef image_refs = 2;
|
||||
string image_dir_path = 3;
|
||||
map<string, string> metadata = 4;
|
||||
string error = 5;
|
||||
}
|
||||
|
||||
// Metadata header for a streamed read. Sent exactly once, before any image.
|
||||
message ReadStreamMeta {
|
||||
string markdown_content = 1;
|
||||
string image_dir_path = 2;
|
||||
map<string, string> metadata = 3;
|
||||
string error = 4;
|
||||
uint32 image_count = 5; // best-effort total image count (0 if unknown)
|
||||
}
|
||||
|
||||
// One frame of a ReadStream. The first frame carries `meta`; every subsequent
|
||||
// frame carries a single `image`.
|
||||
message ReadStreamResponse {
|
||||
oneof payload {
|
||||
ReadStreamMeta meta = 1;
|
||||
ImageRef image = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message ListEnginesRequest {
|
||||
map<string, string> config_overrides = 1;
|
||||
}
|
||||
|
||||
message ParserEngineInfo {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
repeated string file_types = 3;
|
||||
bool available = 4;
|
||||
string unavailable_reason = 5;
|
||||
}
|
||||
|
||||
message ListEnginesResponse {
|
||||
repeated ParserEngineInfo engines = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user