diff --git a/api/app/models/file_metadata_model.py b/api/app/models/file_metadata_model.py index baf9bd97..28e87367 100644 --- a/api/app/models/file_metadata_model.py +++ b/api/app/models/file_metadata_model.py @@ -35,7 +35,7 @@ class FileMetadata(Base): id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, index=True) tenant_id = Column(UUID(as_uuid=True), nullable=False, index=True, comment="Tenant ID") - workspace_id = Column(UUID(as_uuid=True), nullable=False, index=True, comment="Workspace ID") + workspace_id = Column(UUID(as_uuid=True), nullable=True, index=True, comment="Workspace ID") file_key = Column(String(512), nullable=False, unique=True, index=True, comment="Storage file key") file_name = Column(String(255), nullable=False, comment="Original file name") file_ext = Column(String(32), nullable=False, comment="File extension") diff --git a/api/app/services/file_storage_service.py b/api/app/services/file_storage_service.py index 672e1cff..bb9f1894 100644 --- a/api/app/services/file_storage_service.py +++ b/api/app/services/file_storage_service.py @@ -26,7 +26,7 @@ logger = get_business_logger() def generate_file_key( tenant_id: uuid.UUID, - workspace_id: uuid.UUID, + workspace_id: uuid.UUID | None, file_id: uuid.UUID, file_ext: str, ) -> str: @@ -56,8 +56,9 @@ def generate_file_key( # Ensure file_ext starts with a dot if file_ext and not file_ext.startswith('.'): file_ext = f'.{file_ext}' - - return f"{tenant_id}/{workspace_id}/{file_id}{file_ext}" + if workspace_id: + return f"{tenant_id}/{workspace_id}/{file_id}{file_ext}" + return f"{tenant_id}/{file_id}{file_ext}" class FileStorageService: @@ -96,7 +97,7 @@ class FileStorageService: async def upload_file( self, tenant_id: uuid.UUID, - workspace_id: uuid.UUID, + workspace_id: uuid.UUID | None, file_id: uuid.UUID, file_ext: str, content: bytes, diff --git a/api/app/version_info.json b/api/app/version_info.json index 991369d7..aea03dcd 100644 --- a/api/app/version_info.json +++ b/api/app/version_info.json @@ -1,4 +1,38 @@ { + "v0.2.4": { + "introduction": { + "codeName": "智远", + "releaseDate": "2026-2-11", + "upgradePosition": "🐻 生产级稳健性升级版本,智慧致远,从容应对复杂场景", + "coreUpgrades": [ + "1. Skills 技能框架 🛠️
* Skills 支持:引入全新的Skills技能系统,支持可扩展的能力模块,可在Agent和工作流中动态加载与编排", + "2. 多模态与交互 💬
* 文件多模态支持:全面支持消息输入、LLM处理和输出渲染中的多模态文件处理,实现更丰富的媒体感知对话
* 语音交互:语音交互功能正在积极开发中,为免提对话体验奠定基础(开发中)", + "3. 知识库集成 📚
* 飞书知识库:无缝对接飞书文档库,支持企业知识检索
* 语雀知识库:原生连接语雀文档平台,扩展对国内企业工具生态的覆盖
* Web站点知识库:通用Web站点抓取与索引,支持从公开网页内容构建知识库
* 视觉模型选择优化:知识库视觉模型配置现已支持LLM和Chat两种模型类型,移除了此前仅限Chat类型的限制", + "4. 记忆智能 🧠
* 本体工程(二期):基于本体工程的高级记忆场景分类与萃取,实现结构化、领域感知的记忆组织,提升分类准确性
* 默认模型配置:情绪分析、反思和记忆萃取模块现默认使用空间级模型,确保开箱即用的一致性行为
* 智能模型回退:当已配置的情绪或反思模型为空或不可用时,系统自动回退至空间默认模型,避免静默失败
* 记忆模型回退兜底:当记忆中配置的模型为空或不可用时,系统优雅降级至空间默认模型", + "5. 性能与扩展 ⚡
* 模型并发(model_api_keys):支持并发模型API Key管理,实现并行模型调用,提升高负载场景下的吞吐能力", + "6. 稳健性与缺陷修复 🔧
* 记忆配置版本固定:修复用户记忆配置未跟随应用版本发布固定的问题,消除跨部署的行为不一致
* 空间默认记忆保护:空间级默认记忆配置现不可删除;用户级配置仍可删除
* Agent与工作流配置兜底:解决Agent和工作流节点中记忆配置可能为空、或已选择但未配置的边界情况——全面的回退处理现可防止运行时错误
* 隐形记忆字段重命名:将隐形记忆接口JSON响应中的user_id修正为end_user_id,与规范数据模型对齐
* 记忆配置ID迁移:将Agent和工作流记忆配置中的memory_content重命名为memory_config_id,保持API一致性
* Worker-Memory告警解决:解决worker-memory服务中的告警级别问题,提升运维监控清晰度
* 双语接口修复:修复记忆相关API接口的中英文不一致问题
* 新用户记忆配置自动回填:新创建的EndUser若memory_config_id为None,系统自动从最新Release获取memory_config_id并回填
* 存量用户记忆配置自动回填:已有EndUser若memory_config_id为None,系统同样从最新Release获取并回填,确保向后兼容,无需手动迁移", + "
", + "Memory Bear v0.2.4 向生产级稳健性迈进,Skills框架与多模态支持开启认知平台新篇章。", + "记忆熊,智慧致远,从容应对真实世界的多样性。🐻✨" + ] + }, + "introduction_en": { + "codeName": "ZhiYuan", + "releaseDate": "2026-2-11", + "upgradePosition": "🐻 Production-grade resilience release — Wisdom Reaching Far, gracefully handling complex scenarios", + "coreUpgrades": [ + "1. Skills Framework 🛠️
* Skills Support: Introduced a new Skills system, enabling extensible capability modules that can be dynamically loaded and orchestrated within agents and workflows", + "2. Multimodal & Interaction 💬
* File Multimodal Support: Full multimodal file handling across message input, LLM processing, and output rendering — supporting richer, media-aware conversations
* Voice Interaction: Voice-based interaction capabilities are under active development, laying the groundwork for hands-free conversational experiences (In Progress)", + "3. Knowledge Base Integration 📚
* Feishu Knowledge Base: Seamless integration with Feishu (Lark) document repositories for enterprise knowledge retrieval
* Yuque Knowledge Base: Native connector for Yuque documentation platforms, expanding coverage of Chinese enterprise tooling
* Web Site Knowledge Base: General-purpose web site crawling and indexing for knowledge base construction from public web content
* Visual Model Selection: Knowledge base visual model configuration now supports both LLM and Chat model types, removing the previous restriction to Chat-only selection", + "4. Memory Intelligence 🧠
* Ontology Engineering (Phase 2): Advanced memory scene classification and extraction powered by ontology engineering — enabling structured, domain-aware memory organization with improved categorization accuracy
* Default Model Configuration: Emotion analysis, reflection, and memory extraction modules now default to the space-level model, ensuring consistent behavior out of the box
* Intelligent Model Fallback: If configured emotion or reflection models are empty or unavailable, the system automatically falls back to the space default model — preventing silent failures
* Memory Config Fallback for Models: When any memory-configured model is empty or unavailable, the system gracefully degrades to the space default model", + "5. Performance & Scalability ⚡
* Model Concurrency (model_api_keys): Support for concurrent model API key management, enabling parallel model invocations and improved throughput for high-load scenarios", + "6. Robustness & Bug Fixes 🔧
* Memory Config Version Pinning: Fixed an issue where user memory configurations were not pinned to application release versions, causing inconsistent behavior across deployments
* Space Default Memory Protection: Space-level default memory configurations are now protected from deletion; user-level configurations remain deletable
* Agent & Workflow Config Fallback: Resolved edge cases in Agent and Workflow nodes where memory config could be empty or selected but unconfigured — comprehensive fallback handling now prevents runtime errors
* Implicit Memory Field Rename: Corrected user_id to end_user_id in JSON responses from implicit memory interfaces, aligning with the canonical data model
* Memory Config ID Migration: Renamed memory_content to memory_config_id in Agent and Workflow memory configurations for API consistency
* Worker-Memory Alerts: Resolved warning-level alerts in the worker-memory service, improving operational monitoring clarity
* Bilingual Interface Fixes: Fixed Chinese/English language inconsistencies across memory-related API interfaces
* EndUser Memory Config Auto-Backfill (New Users): When a newly created EndUser has memory_config_id as None, the system automatically fetches the latest release's memory_config_id and backfills it
* EndUser Memory Config Auto-Backfill (Existing Users): For existing EndUsers with memory_config_id as None, the system similarly retrieves and backfills from the latest release — ensuring backward compatibility without manual migration", + "
", + "Memory Bear v0.2.4 advances toward production-grade resilience, with the Skills framework and multimodal support opening a new chapter for the cognitive platform.", + "MemoryBear — Wisdom Reaching Far, gracefully handling real-world variability. 🐻✨" + ] + } + }, "v0.2.3": { "introduction": { "codeName": "归墟",