From 9930e5c55a625d27a0117917bd3c9d72ea0922e8 Mon Sep 17 00:00:00 2001 From: hanshaoshuai Date: Thu, 18 Jun 2026 12:16:01 +0800 Subject: [PATCH] chore: prepare v1.1.0 release --- README.md | 2 +- README.zh.md | 2 +- docs/markdown.md | 4 ++-- docs/reference.md | 2 +- docs/release-notes/v1.1.0.md | 14 ++++++++++++++ lark_channel/core/const.py | 2 +- .../test_documented_import_path.py | 4 ++-- tests/package_identity/test_import_identity.py | 4 ++-- 8 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 docs/release-notes/v1.1.0.md diff --git a/README.md b/README.md index cea68dc..51988a0 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ asyncio.run(channel.connect()) - [Webhook server adapter](docs/webhook-server.md) - [CardKit streaming](docs/cardkit-streaming.md) - [Deduplication architecture](docs/dedup-architecture.md) -- [Release notes](docs/release-notes/v1.0.0.md) +- [Release notes](docs/release-notes/v1.1.0.md) - [Echo bot sample](samples/channel/echo_bot.py) ## Migration from `lark_oapi.channel` diff --git a/README.zh.md b/README.zh.md index bdb9e04..a60a3e4 100644 --- a/README.zh.md +++ b/README.zh.md @@ -46,7 +46,7 @@ asyncio.run(channel.connect()) - [Webhook 服务适配](docs/webhook-server.md) - [CardKit 流式回复](docs/cardkit-streaming.md) - [去重架构](docs/dedup-architecture.md) -- [发布说明](docs/release-notes/v1.0.0.md) +- [发布说明](docs/release-notes/v1.1.0.md) - [Echo bot 示例](samples/channel/echo_bot.py) ## 从 `lark_oapi.channel` 迁移 diff --git a/docs/markdown.md b/docs/markdown.md index 2b034e6..46761c2 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -24,8 +24,8 @@ channel = FeishuChannel( | Mode | When to use | Rendering behavior | |---|---|---| -| `structured` (default) | Deterministic rendering across clients, code blocks, links, and SDK-side wire-format assertions | Parses markdown into explicit post nodes such as `tag:text`, `tag:a`, and `tag:code_block`. Feishu post has no native heading, blockquote, or nested-list nodes, so those constructs are flattened or approximated. | -| `native` | Richer user-facing markdown rendering in Feishu clients | Wraps markdown into `tag:md` nodes and lets the Feishu client render it. Headings, quotes, and lists render closer to native markdown, but exact output depends on client version. | +| `native` (default) | Richer user-facing markdown rendering in Feishu clients | Wraps markdown into `tag:md` nodes and lets the Feishu client render it. Headings, quotes, and lists render closer to native markdown, but exact output depends on client version. | +| `structured` | Deterministic rendering across clients, code blocks, links, and SDK-side wire-format assertions | Parses markdown into explicit post nodes such as `tag:text`, `tag:a`, and `tag:code_block`. Feishu post has no native heading, blockquote, or nested-list nodes, so those constructs are flattened or approximated. | `MarkdownConverter.enabled` exists for compatibility with the config schema. Do not rely on `enabled=False` to send plain text; use `{"text": ...}` instead. diff --git a/docs/reference.md b/docs/reference.md index 7efe4a3..19e6ea4 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -387,4 +387,4 @@ Known `FeishuChannelErrorCode` values: - [Streaming with CardKit](./cardkit-streaming.md) - [Markdown to post conversion](./markdown.md) - [Two-layer dedup architecture](./dedup-architecture.md) -- [Release notes](./release-notes/v1.0.0.md) +- [Release notes](./release-notes/v1.1.0.md) diff --git a/docs/release-notes/v1.1.0.md b/docs/release-notes/v1.1.0.md new file mode 100644 index 0000000..05b86ae --- /dev/null +++ b/docs/release-notes/v1.1.0.md @@ -0,0 +1,14 @@ +# lark-channel-sdk v1.1.0 + +This release improves post-message markdown handling and adds support for `content_v2`. + +## Changes + +- Added inbound post normalization support for `content_v2`. +- Markdown outbound messages now use native Feishu markdown rendering by default. +- Structured markdown conversion remains available with `MarkdownConverter(tag_md_mode="structured")`. + +## Compatibility + +- Plain text messages and prebuilt post AST payloads are not affected. +- If your integration asserts exact post AST nodes, set `tag_md_mode="structured"` explicitly. diff --git a/lark_channel/core/const.py b/lark_channel/core/const.py index 9fd0f34..201704b 100644 --- a/lark_channel/core/const.py +++ b/lark_channel/core/const.py @@ -1,6 +1,6 @@ # Info PROJECT = "channel-sdk-python" -VERSION = "1.0.0" +VERSION = "1.1.0" # Domain FEISHU_DOMAIN = "https://open.feishu.cn" diff --git a/tests/package_identity/test_documented_import_path.py b/tests/package_identity/test_documented_import_path.py index ec38aa5..fc4a75e 100644 --- a/tests/package_identity/test_documented_import_path.py +++ b/tests/package_identity/test_documented_import_path.py @@ -19,7 +19,7 @@ def test_documented_primary_import_path_is_package_root(): assert "pip install lark-channel-sdk" in text assert "docs/migration-from-lark-oapi.md" in text assert "docs/security.md" in text - assert "docs/release-notes/v1.0.0.md" in text + assert "docs/release-notes/v1.1.0.md" in text assert "pip install lark-oapi" not in text assert "lark-oapi[" not in text assert "from lark_channel.channel import" not in text @@ -36,7 +36,7 @@ def test_security_and_migration_docs_are_linked_and_actionable(): assert "docs/migration-from-lark-oapi.md" in readme assert "docs/security.md" in readme - assert "docs/release-notes/v1.0.0.md" in readme + assert "docs/release-notes/v1.1.0.md" in readme assert "from lark_channel import FeishuChannel" in migration assert "SecurityConfig(mode=\"audit\")" in migration assert "SecurityConfig(mode=\"audit\")" in security diff --git a/tests/package_identity/test_import_identity.py b/tests/package_identity/test_import_identity.py index df554a5..d17f34b 100644 --- a/tests/package_identity/test_import_identity.py +++ b/tests/package_identity/test_import_identity.py @@ -29,7 +29,7 @@ def test_transport_keepalive_config_imports_from_package_root(): assert KeepaliveConfig is ChannelKeepaliveConfig -def test_release_version_is_1_0_0(): +def test_release_version_is_1_1_0(): from lark_channel.core.const import VERSION - assert VERSION == "1.0.0" + assert VERSION == "1.1.0"