656b07027a
Syncs personal and team Yuque knowledge bases into WeKnora as Markdown, with full and incremental sync + deletion detection. Mirrors the Feishu connector pattern; fetches V2Doc.body directly (no async export step). Config: api_token (required) + base_url (optional, defaults to public cloud). 401/403 wraps ErrInvalidCredentials; 429 honors Retry-After; filters to status=1 Doc-type at list stage to conserve API quota. Body is trusted as Markdown for format=markdown|lake — empirically verified against the v2 API: Lake XML lives separately in body_lake, body itself is the Markdown view. Other formats (e.g. html) are skipped with a placeholder item so they surface in sync logs instead of silently feeding HTML to the parser. v2Doc.status accepts both int and string shapes — Yuque's OpenAPI spec declares string but the live API returns int. sanitizeFileName truncates at a UTF-8 rune boundary so multi-byte titles don't emit invalid UTF-8 that downstream filename validation rejects. Also adds logger.SetOutput test hook, used by the token-redaction test.