diff --git a/docs/pipeline-migration-config-map.zh-CN.md b/docs/pipeline-migration-config-map.zh-CN.md index d3c90077c..672a6c8c7 100644 --- a/docs/pipeline-migration-config-map.zh-CN.md +++ b/docs/pipeline-migration-config-map.zh-CN.md @@ -1,6 +1,6 @@ # 旧流水线迁移:配置去向与语义变更 -本文对应迁移规划器 v3。原生行为基线:`9b7ba0d64708496ace30a82866f6dbc185f089dc`。 +本文对应迁移规划器 v4。原生行为基线:`9b7ba0d64708496ace30a82866f6dbc185f089dc`。 ## 迁移边界 @@ -26,17 +26,17 @@ ## 插件版本要求 -以下是本次本地源码的目标版本;本表不代表插件已经发布。旧版本即使名称相同,也不能作为新迁移能力的证明。 +以下是迁移器要求的已发布 Certified Plugin 版本。旧版本即使名称相同,也不能作为当前 Cloud 迁移能力的证明。 -- `local-agent` → `LocalAgent` **0.1.6**。 -- `dify-service-api` → `DifyAgent` **0.1.7**。 -- `coze-api` → `CozeAgent` **0.1.7**。 -- `dashscope-app-api` → `DashScopeAgent` **0.1.7**。 -- `n8n-service-api` → `N8nAgent` **0.1.7**。 -- `langflow-api` → `LangflowAgent` **0.1.7**。 -- `deerflow-api` → `DeerFlowAgent` **0.1.7**。 -- `tbox-app-api` → `TboxAgent` **0.1.5**。 -- `weknora-api` → `WeKnoraAgent` **0.1.7**。 +- `local-agent` → `LocalAgent` **0.1.10**。 +- `dify-service-api` → `DifyAgent` **0.1.10**。 +- `coze-api` → `CozeAgent` **0.1.10**。 +- `dashscope-app-api` → `DashScopeAgent` **0.1.10**。 +- `n8n-service-api` → `N8nAgent` **0.1.10**。 +- `langflow-api` → `LangflowAgent` **0.1.10**。 +- `deerflow-api` → `DeerFlowAgent` **0.1.10**。 +- `tbox-app-api` → `TboxAgent` **0.1.8**。 +- `weknora-api` → `WeKnoraAgent` **0.1.10**。 ## 逐字段完整清单 diff --git a/src/langbot/pkg/pipeline/legacy_config_migration.py b/src/langbot/pkg/pipeline/legacy_config_migration.py index d893eb0e1..8f99cce84 100644 --- a/src/langbot/pkg/pipeline/legacy_config_migration.py +++ b/src/langbot/pkg/pipeline/legacy_config_migration.py @@ -19,18 +19,18 @@ import re from urllib.parse import urlsplit from string import Formatter -PLANNER_VERSION = '3' +PLANNER_VERSION = '4' _TARGETS = { - 'local-agent': ('LocalAgent', '0.1.7'), - 'dify-service-api': ('DifyAgent', '0.1.7'), - 'coze-api': ('CozeAgent', '0.1.7'), - 'dashscope-app-api': ('DashScopeAgent', '0.1.7'), - 'n8n-service-api': ('N8nAgent', '0.1.7'), - 'langflow-api': ('LangflowAgent', '0.1.7'), - 'deerflow-api': ('DeerFlowAgent', '0.1.7'), - 'tbox-app-api': ('TboxAgent', '0.1.5'), - 'weknora-api': ('WeKnoraAgent', '0.1.7'), + 'local-agent': ('LocalAgent', '0.1.10'), + 'dify-service-api': ('DifyAgent', '0.1.10'), + 'coze-api': ('CozeAgent', '0.1.10'), + 'dashscope-app-api': ('DashScopeAgent', '0.1.10'), + 'n8n-service-api': ('N8nAgent', '0.1.10'), + 'langflow-api': ('LangflowAgent', '0.1.10'), + 'deerflow-api': ('DeerFlowAgent', '0.1.10'), + 'tbox-app-api': ('TboxAgent', '0.1.8'), + 'weknora-api': ('WeKnoraAgent', '0.1.10'), } _DEERFLOW_FIELDS = { 'api-base', diff --git a/tests/unit_tests/pipeline/test_legacy_config_migration.py b/tests/unit_tests/pipeline/test_legacy_config_migration.py index 1658354f8..7355400f1 100644 --- a/tests/unit_tests/pipeline/test_legacy_config_migration.py +++ b/tests/unit_tests/pipeline/test_legacy_config_migration.py @@ -11,15 +11,15 @@ import pytest FIXTURES = json.loads((Path(__file__).parents[2] / 'fixtures/pipeline_migration/synthetic_legacy.json').read_text()) TARGETS = { - 'local-agent': ('LocalAgent', '0.1.7', None), - 'dify-service-api': ('DifyAgent', '0.1.7', None), - 'coze-api': ('CozeAgent', '0.1.7', None), - 'dashscope-app-api': ('DashScopeAgent', '0.1.7', None), - 'n8n-service-api': ('N8nAgent', '0.1.7', None), - 'langflow-api': ('LangflowAgent', '0.1.7', None), - 'deerflow-api': ('DeerFlowAgent', '0.1.7', None), - 'tbox-app-api': ('TboxAgent', '0.1.5', None), - 'weknora-api': ('WeKnoraAgent', '0.1.7', None), + 'local-agent': ('LocalAgent', '0.1.10', None), + 'dify-service-api': ('DifyAgent', '0.1.10', None), + 'coze-api': ('CozeAgent', '0.1.10', None), + 'dashscope-app-api': ('DashScopeAgent', '0.1.10', None), + 'n8n-service-api': ('N8nAgent', '0.1.10', None), + 'langflow-api': ('LangflowAgent', '0.1.10', None), + 'deerflow-api': ('DeerFlowAgent', '0.1.10', None), + 'tbox-app-api': ('TboxAgent', '0.1.8', None), + 'weknora-api': ('WeKnoraAgent', '0.1.10', None), } @@ -976,10 +976,10 @@ def test_default_local_agent_blocks_instead_of_inventing_round_translation(): } original = copy.deepcopy(source) result = planner().plan_legacy_pipeline(source) - assert planner().PLANNER_VERSION == '3' + assert planner().PLANNER_VERSION == '4' assert result['state'] == 'blocked' assert result['target_runner_id'] == 'plugin:langbot-team/LocalAgent/default' - assert result['target_plugin'] == {'author': 'langbot-team', 'name': 'LocalAgent', 'version': '0.1.7'} + assert result['target_plugin'] == {'author': 'langbot-team', 'name': 'LocalAgent', 'version': '0.1.10'} assert {'code': 'missing_field', 'field': 'ai.local-agent.prompt'} in result['blockers'] assert result['config'] is None assert source == original diff --git a/web/tests/e2e/fixtures/runner-migration-contract.json b/web/tests/e2e/fixtures/runner-migration-contract.json index 4998ea66e..5acd29ce2 100644 --- a/web/tests/e2e/fixtures/runner-migration-contract.json +++ b/web/tests/e2e/fixtures/runner-migration-contract.json @@ -1,5 +1,5 @@ { - "planner_version": "3", + "planner_version": "4", "fixture_only": true, "legacy_sections": { "local-agent": { @@ -86,7 +86,7 @@ "metadata": { "author": "langbot-team", "name": "LocalAgent", - "version": "0.1.7", + "version": "0.1.10", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/LocalAgent", "label": { "en_US": "Local Agent", @@ -588,7 +588,7 @@ "metadata": { "author": "langbot-team", "name": "DifyAgent", - "version": "0.1.7", + "version": "0.1.10", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/dify-agent", "label": { "en_US": "Dify Agent", @@ -958,7 +958,7 @@ "metadata": { "author": "langbot-team", "name": "CozeAgent", - "version": "0.1.7", + "version": "0.1.10", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/coze-agent", "label": { "en_US": "Coze Agent", @@ -1269,7 +1269,7 @@ "metadata": { "author": "langbot-team", "name": "DashScopeAgent", - "version": "0.1.7", + "version": "0.1.10", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/dashscope-agent", "label": { "en_US": "Dashscope Agent", @@ -1562,7 +1562,7 @@ "metadata": { "author": "langbot-team", "name": "N8nAgent", - "version": "0.1.7", + "version": "0.1.10", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/n8n-agent", "label": { "en_US": "N8n Agent", @@ -2038,7 +2038,7 @@ "metadata": { "author": "langbot-team", "name": "LangflowAgent", - "version": "0.1.7", + "version": "0.1.10", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/langflow-agent", "label": { "en_US": "Langflow Agent", @@ -2316,7 +2316,7 @@ "metadata": { "author": "langbot-team", "name": "DeerFlowAgent", - "version": "0.1.7", + "version": "0.1.10", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/deerflow-agent", "label": { "en_US": "DeerFlow Agent", @@ -2598,7 +2598,7 @@ "metadata": { "author": "langbot-team", "name": "TboxAgent", - "version": "0.1.5", + "version": "0.1.8", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/tbox-agent", "label": { "en_US": "Tbox Agent", @@ -2766,7 +2766,7 @@ "metadata": { "author": "langbot-team", "name": "WeKnoraAgent", - "version": "0.1.7", + "version": "0.1.10", "repository": "https://github.com/langbot-app/langbot-plugins/tree/main/Runner/weknora-agent", "label": { "en_US": "WeKnora Agent", @@ -3155,7 +3155,7 @@ "target_plugin": { "author": "langbot-team", "name": "LocalAgent", - "version": "0.1.7" + "version": "0.1.10" }, "config": { "trigger": { @@ -3459,7 +3459,7 @@ "target_plugin": { "author": "langbot-team", "name": "DifyAgent", - "version": "0.1.7" + "version": "0.1.10" }, "config": { "trigger": { @@ -3742,7 +3742,7 @@ "target_plugin": { "author": "langbot-team", "name": "CozeAgent", - "version": "0.1.7" + "version": "0.1.10" }, "config": { "trigger": { @@ -4025,7 +4025,7 @@ "target_plugin": { "author": "langbot-team", "name": "DashScopeAgent", - "version": "0.1.7" + "version": "0.1.10" }, "config": { "trigger": { @@ -4299,7 +4299,7 @@ "target_plugin": { "author": "langbot-team", "name": "N8nAgent", - "version": "0.1.7" + "version": "0.1.10" }, "config": { "trigger": { @@ -4584,7 +4584,7 @@ "target_plugin": { "author": "langbot-team", "name": "LangflowAgent", - "version": "0.1.7" + "version": "0.1.10" }, "config": { "trigger": { @@ -4862,7 +4862,7 @@ "target_plugin": { "author": "langbot-team", "name": "DeerFlowAgent", - "version": "0.1.7" + "version": "0.1.10" }, "config": { "trigger": { @@ -5131,7 +5131,7 @@ "target_plugin": { "author": "langbot-team", "name": "TboxAgent", - "version": "0.1.5" + "version": "0.1.8" }, "config": { "trigger": { @@ -5402,7 +5402,7 @@ "target_plugin": { "author": "langbot-team", "name": "WeKnoraAgent", - "version": "0.1.7" + "version": "0.1.10" }, "config": { "trigger": {