| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
🐛 Fix(AIDP): correct knowledge-detail pagination and wrap-up gaps (#4143) * 🐛 Fix(AIDP): correct knowledge-detail pagination and wrap-up gaps Problem: - AIDP returns next_link on every page, including the last one, so a filtered list with fewer than page_size rows still enabled "next". - The detail page rendered fields AIDP never returns, kept the legacy GET /documents list route, and resized columns differently from the knowledge-base list. - Failed task reasons arrive as JSON strings, and HTML uploads could not be previewed. Fix: - Derive has_more from a reliable Count/total or the page row count, and remove the legacy GET /documents route; migrate the E2E cases to /files and assert the filtered short-page contract. - Remove rerank/graph-topk fields, hide the absent update time, resolve the embedding display_name through ModelService, and use the list's adjacent-column resize model on both detail tabs. - Render file delete status, parse AIDP failure reasons, preview HTML as plain text, and align the mock with the live contract. Verification: - pytest test/ext_components/aidp/test_aidp_mgmt_app.py test/ext_components/aidp/test_aidp_mgmt_mock_server.py: 158 passed - npm run type-check: passed - vitest AIDP + preview component suites: 41 passed - Pre-commit ruff skipped only because the upstream import order in aidp_mgmt_app.py predates this change and CI does not run ruff. * chore: add the required copyright headers * test(aidp): assert the live detail shape in the create contract * test(ext-knowledge): align AIDP FAQ reset count with the new seed * 🐛 Fix(AIDP): remove the unsupported update-time row * 🐛 Fix(AIDP): address detail review findings Problem: - Batch deletion left stale selected keys after rows flipped to deleting, so the button stayed enabled and the submit became a silent no-op. - The detail header could fall back to a filtered lower bound as the KB total when document_count was missing. - The failure drawer still read a top-level error_code that AIDP never returns; the failed-task summary copy still said "ingestion failed". Fix: - Derive the deletable UUID set once and share it between the batch button and submit. - Only use the list total when the query is unfiltered and reliable. - Read only the parsed failure code and use the neutral "processing failed" copy for the summary. - Restore the base import formatting and remove the frontend UT additions per the no-new-tests policy. * 🧪 Test(AIDP): align pagination contracts with live AIDP - Trust History total_record_count only for unfiltered or keyword-only (status 0) queries; status-filtered queries keep row-count pagination. - Update the E2E specs to stop implying a Count-failure degradation, and make the keyword filter test wait for the uploaded file and assert a non-empty match. - Make the mock History report page-local total_count and compute total_record_count after keyword but before status. - Remove the mock top-level error_code for the Chinese demo and align the create/FAQ assertions. * 💄 UI(AIDP): label the file status column as Status * 🧪 Test(AIDP): set update_time on mock uploads * ✨ Feature(AIDP): align chunk settings with AIDP defaults Use 512-token chunks with 10% overlap (51 tokens), similarity 0 and Top K 10 when creating a knowledge base. Remove the duplicated per-section default hints, show the missing chunk token/overlap fields on the detail page in create order, and reuse the create page's chunk-mode cards in the detail edit modal. Allow chunk token and overlap updates through the backend and mock. * 📄 Docs(AIDP): add the missing copyright header | 4 天前 | |
✨Feature: Enhance AIDP knowledge base management and integration features (#3508) * Release/v2.2.1 (#3269) * add_greeting_fields_to_agent-develop * feat(knowledge-base): add preserve_source_file and post-index source cleanup Let knowledge bases opt out of keeping uploaded MinIO copies after indexing while retaining Elasticsearch chunks for retrieval. Default behavior remains preserve_source_file=true for backward compatibility. - Add preserve_source_file column (init.sql + v2.2.0_0601 migration) - Accept preserve_source_file on create/update and northbound/vector APIs - Support document DELETE scope=source_only and source_available in listings - Run cleanup_source Celery task when preserve_source_file is false - UI: create-KB toggle, list tag, knowledge-base preview when copy is missing - Update vector-database SDK docs and backend tests * test(data_process): stub knowledge_db, redis_service, and redis in test_worker Align setup_mocks_for_worker with test_tasks so importing backend.data_process.worker loads package __init__ without real DB/redis deps. * test(data_process): shim cleanup_source for submit_process_forward_chain tests * remove duplicate import * fix: update unit tests for greeting_message and example_questions fields * add init.sql to sonar.properites * ♻️ Improvement: API to MCP conversion service supports configuring headers. (#3194) * ♻️ Improvement: API to MCP conversion service supports configuring headers. [Specification Details] 1. Front-end and back-end modifications * ♻️ Improvement: API to MCP conversion service supports configuring headers. [Specification Details] 1. Modify the frontend, after adding, set the HTTP headers to empty. 2. Modify test cases. * ♻️ Improvement: Enhance processing of ES index names in memory banks. (#3196) [Specification Details] 1. Replace all symbols in the index name that do not meet the rules with "_". 2. Modify test cases. * feat: add active memory tools (StoreMemoryTool, SearchMemoryTool) (#3197) - Implement StoreMemoryTool for explicit memory storage during agent reasoning - Implement SearchMemoryTool for on-demand memory retrieval during conversations - Integrate tools into agent creation flow (create_agent_info.py) - Register tools in nexent_agent.py and tools/__init__.py - Add MEMORY_OPERATION tool sign for proper categorization - Fix memory_core.py cache key to include event loop ID (prevents cross-loop conflicts) - Add comprehensive test coverage for both tools - Add procedural memory verification documentation Tools follow existing patterns: lazy imports, observer integration, error handling, and respect user memory preferences (agent_share_option, disabled_agent_ids). Co-authored-by: Dallas98 <40557804+Dallas98@users.noreply.github.com> * 🐛 Bugfix: skill names and descriptions never load to context (#3205) * 🐛 Bugfix: skill names and descriptions never load to context * 🐛 Bugfix: skill names and descriptions never load to context * 🐛 Bugfix: skill names and descriptions never load to context * 🐛 Bugfix: official skills not copied to target directory * 🐛 Bugfix: official skills not copied to target directory * Feat: add selected count badges to tool/skill pool labels (#3206) Co-authored-by: chase <byzhangxin11@126.com> * 🐛 Bugfix: Fix attribution error when tool calling error (#3208) * ✨ Feat: Add support for Word document generation, preview, and download (#3191) * Feat: Add support for Word document generation, preview, and download * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Restrict uploads to a known safe workspace/output directory * 修改单元测试 * 修复单元测试 * Bugfix: Store uploaded files in Minio for conversation messages to enable file visibility in history --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * ✨Feat:Enhance prompt optimization by integrating openjiuwen and fix related bugs (#3190) * ✨Feat:add prompt optimization * 🐛Bugfix: dockerbuild failed when running pipefail in python3_11 * 🔨Optimize: Optimize prompt optimization display page and interaction methods * 🐛Bugfix: fix dependencies replication * 🎨:Optimize frontend prompts and loading interface * 🔧 Refactor: Update imports and remove redundant ENABLE_JIUWEN_SDK import in prompt_service.py * 🔧 Refactor: Correct import path for NexentCapabilityError and enhance test coverage for prompt optimization service * 🔧 Refactor: Update import paths for exception handling and improve logging formatting in prompt_service.py * 🔧 Refactor: Simplify lazy imports in jiuwen_sdk_adapter.py and update import paths in prompt_service.py * 🔧 Refactor: Enhance Jiuwen SDK adapter handling and improve test stubs in prompt_service.py and related test files * 🧪test:Pydantic model for PromptTemplateRequest in test_prompt_template_app.py * 🔧 Refactor: Remove unnecessary dependency exclusions from pyproject.toml * 🔧 Update: Upgrade huggingface_hub dependency version in pyproject.toml * 🔧 Update: Exclude unnecessary transitive dependencies and adjust huggingface_hub version in pyproject.toml * 🔧 Test: Add mock modules for unstructured inference and set up package paths in test files * 🔧 Test: Enhance test setup by adding optional SDK mocks and cleaning up module imports in data processing tests * 🔧 Test: Consolidate mock module setup for unstructured inference across multiple test files * 🔧 Test: Remove unused optional SDK mocks from test configuration * 🔧 Refactor: Clean up imports and enhance dynamic loading of fastmcp components in Docker client * 📦update:sdk dependence update * Add CAS SSO integration and improve logout handling (#3072) * feat: add CAS SSO integration * Skip CAS logout when CAS_LOGOUT_URL is unset * 取消转义 * Improve CAS logout handling and confirm user logout * Disable account deletion for CAS users * Add CAS session init SQL and k8s config * clean code * Remove agent guardrails design doc from tracking * 补充文档 --------- Co-authored-by: hhhhsc <name> * 🐛Bugfix: Remove unnecessary dependency exclusions and upgrade huggingface_hub version in pyproject.toml (#3211) * refactor: move current time from system prompt to user message for prompt cache stability (#3203) Remove {{time}} from all 4 prompt YAML templates (manager/managed × en/zh) and strip time_str from the context_utils pipeline (_format_app_context, build_skeleton_header_component, build_context_components, build_app_context_string). Also remove time from create_agent_info render kwargs and build_context_components call. In CoreAgent.run, prepend [Current time: ...] to self.task so the timestamp travels with the user message instead of being baked into the system prompt. This makes the rendered system prompt fully deterministic per (agent_id, tenant_id, version_no, language) — enabling prompt/KV cache hits across requests for the same agent config. Sync test_context_utils.py: drop time_str= from 3 test cases. Remove unused datetime imports from context_utils.py and create_agent_info.py. * 🐛 Bugfix: Fixed the issue of being unable to add MCP services via containerization. (#3213) [Specification Details] 1. Modify the DEFAULT_NETWORK_NAME when starting the MCP service in the container to match the name in docker-compose. 2. Modify the parameters passed to the add_mcp_service method; custom_headers defaults to None. * 🐛 Bugfix: Fixed the issue where uploaded text files could not be parsed during a session. (#3219) * 🐛 Bugfix: Fixed the issue where uploaded text files could not be parsed during a session. [Specification Details] 1. The return parameter of the file_process method has changed and needs to be unpacked. * 🐛 Bugfix: Fixed the issue where uploaded text files could not be parsed during a session. [Specification Details] 1. Modify test case. * 🐛 Bugfix: Fixed an issue where the MCP service could not be added correctly after updating the FastMCP version. (#3222) [Specification Details] 1. Add `kwargs` to the `create_httpx_client` function to accept all additional parameters. * 🐛 Bugfix: Fix incomplete display of tenant resources page after window resize (#3215) * Move non-shadcn ui component to other folder * Bugfix: Fix incomplete display of tenant resources page after window resize * Bugfix: Fix incomplete display of tenant resources page after window resize * Add agent marketplace repository and version pinning for sub-agents (#3239) * feat: add agent marketplace repository and pin sub-agent versions at publish Introduce ag_agent_repository_t with list/status/publish/import APIs for frozen agent snapshots. Pin selected_agent_version_no on agent relations when publishing so sub-agents resolve to a fixed version at runtime. Extend agent export/import to bundle skills in ZIP payloads and add embedding model fallback when no model name is provided. * feat: add agent marketplace repository and pin sub-agent versions at publish Introduce ag_agent_repository_t with list/status/publish/import APIs for frozen agent snapshots. Pin selected_agent_version_no on agent relations when publishing so sub-agents resolve to a fixed version at runtime. Extend agent export/import to bundle skills in ZIP payloads and add embedding model fallback when no model name is provided. * feat: add agent marketplace repository and pin sub-agent versions at publish Introduce ag_agent_repository_t with list/status/publish/import APIs for frozen agent snapshots. Pin selected_agent_version_no on agent relations when publishing so sub-agents resolve to a fixed version at runtime. Extend agent export/import to bundle skills in ZIP payloads and add embedding model fallback when no model name is provided. * feat: add agent marketplace repository and pin sub-agent versions at publish Introduce ag_agent_repository_t with list/status/publish/import APIs for frozen agent snapshots. Pin selected_agent_version_no on agent relations when publishing so sub-agents resolve to a fixed version at runtime. Extend agent export/import to bundle skills in ZIP payloads and add embedding model fallback when no model name is provided. * feat(agent): add verification configuration for agents and update related components (#3174) * feat(agent): add verification configuration for agents and update related components * feat(model): update model type labels and add monitoring dashboard translations * 🐛 Bugfix: Fix inability to select agent from agent space to edit (#3240) * Move non-shadcn ui component to other folder * Bugfix: Fix incomplete display of tenant resources page after window resize * Bugfix: Fix incomplete display of tenant resources page after window resize * Bugfix: Fix inability to select agent from agent space to edit * Bugfix: Display correct version info when viewing agent details * Update data agent and ME CAS integration documentation (#3242) * 补充dataagent对接文档 * 补充ME cas对接文档 * 补充ME cas对接文档 --------- Co-authored-by: hhhhsc <name> * ✨ Add several northbound apis (#3223) * ✨ Add several northbound apis * ✨ Add several northbound apis * ✨ Add several northbound apis * ✨ Add several northbound apis * ✨ Add several northbound apis * refactor: simplify deployment script by removing unused variables and functions (#3245) * feat(agent): add verification configuration for agents and update related components * feat(model): update model type labels and add monitoring dashboard translations * refactor(build_offline_package): simplify deployment script by removing unused variables and functions * 🐛 Bugfix: Adjust agent detail UI layout to accommodate newly added "self-verification" field (#3246) * Move non-shadcn ui component to other folder * Bugfix: Fix incomplete display of tenant resources page after window resize * Bugfix: Fix incomplete display of tenant resources page after window resize * Bugfix: Fix inability to select agent from agent space to edit * Bugfix: Display correct version info when viewing agent details * Bugfix: Adjust agent detail UI layout to accommodate newly added "self-verification" field * 补充sql (#3248) * 补充sql * 扩大limit限制 * 🐛 Bugfix: Fixed an issue where the MCP service failed to start in a Kubernetes container. (#3254) [Specification Details] 1. Modify the pod naming logic to convert all non-compliant characters to -. 2. Modify test cases. * 🐛 Bugfix: knowledge_base_search_tool called with TypeError: argument of type 'FieldInfo' is not iterable (#3259) * 🐛 Bugfix: Fixed an issue where the one-click rename function failed after importing an agent. (#3258) [Specification Details] 1. The frontend does not pass `agent_id` when calling the `regenerate_name` API. * Bugfix: Exclude attachments from assistant when saving conversation history (#3261) * Bump APP_VERSION from v2.2.0 to v2.2.1 (#3268) The default setting for client-side self-validation is "False". --------- Co-authored-by: chase <byzhangxin11@126.com> Co-authored-by: Chenlifeng <174292121+Lifeng-Chen@users.noreply.github.com> Co-authored-by: Dallas98 <40557804+Dallas98@users.noreply.github.com> Co-authored-by: Jason Wang <56037774+JasonW404@users.noreply.github.com> Co-authored-by: Xia Yichen <iamjasonxia@126.com> Co-authored-by: JeffWu <45140512+jeffwu-1999@users.noreply.github.com> Co-authored-by: WMC001 <46217886+WMC001@users.noreply.github.com> Co-authored-by: xuyaqi <xuyaqist@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: DongJiBao2001 <120021235+DongJiBao2001@users.noreply.github.com> Co-authored-by: hhhhsc701 <56435672+hhhhsc701@users.noreply.github.com> Co-authored-by: Dallas98 <990259227@qq.com> Co-authored-by: frr <64584192+wuyuanfr@users.noreply.github.com> * Revert "Release/v2.2.1 (#3269)" (#3272) This reverts commit 9ff420ecce6b2ca21a67ce51053205860a76e41a. * docs: add aidp knowledge base adapter design * feat: add aidp knowledge base adapter * Update .gitignore to include .omo directory for better file management * ✨ Feature: Implement AIDP Management App with CRUD operations for knowledge bases * 🐛 Fix: Correct file upload format in AIDP service and adjust headers in frontend to support multipart requests * 🔧 Refactor: Simplify existing knowledge base name extraction and restore form values on modal remount * ✨ Feature: Enhance AIDP knowledge base creation with default values and improved document handling * 🔧 Refactor: Simplify AidpKnowledgeConfiguration by removing unused state and optimizing data fetching * ✨ Feature: Introduce AIDP knowledge base management with dynamic routing and configuration options, including CRUD operations and feature flag integration for frontend visibility. * ✨ Feature: Enhance AIDP knowledge base management with pagination support, total count retrieval, and improved document handling in the frontend. Implement server-side pagination and update UI components to reflect total items and availability of more pages. * ✨ Feature: Implement AIDP document count retrieval and enhance pagination logic in the frontend. Introduce reliable total count handling for documents and knowledge bases, improving user experience with accurate pagination and display of total items. * ✨ Feature: Refactor AIDP integration to read server URL and API key from environment variables, simplifying frontend components and enhancing security by removing direct credential handling. Update related services and components to streamline knowledge base management and document handling. * ✨ Feature: Add support for listing AIDP models in the management app, enhancing knowledge base creation with dynamic VLM model selection. Update frontend components to fetch and display available models based on user input, improving user experience in multimodal knowledge base configuration. * fix: add missing comma in common.json for toolConfig validation message * ✨ feat: update AIDP knowledge base integration and routing * ✨ feat: enhance AIDP knowledge base permissions and integration * ✨ feat: implement AIDP permission subsystem exception handling and enhance knowledge base access control * ✨ feat: enhance AIDP knowledge selector with pagination and total item count display * ✨ feat: enhance AIDP integration with improved metadata handling, multimodal inference, and robust error logging * ✨ Update AIDP integration: enhance search tools documentation, add AIDP search capabilities, and persist mock server state. * ✨ Enhance AidpUpdateKbModal: Add group selection and permission management features, improving user experience for knowledge base updates. * 🔒 Security: Improve API key handling and URL validation in AIDP services to prevent credential leakage and potential attacks. * 🔒 Security: Enhance URL validation in AIDP image fetching to prevent SSRF vulnerabilities and improve defensive coding practices. Add comprehensive unit tests for AIDP client and exception handling to ensure robustness. * 🔧 Refactor timestamp conversion logic in AIDP service: update handling of numeric zero and boolean values to correctly return Unix epoch timestamps. Enhance unit tests to verify behavior for edge cases, ensuring accurate conversion for various input types. * Fix AIDP image tests: add AIDP_SERVER_URL monkeypatch The stricter URL validation in _validate_and_reconstruct_aidp_url() requires tests to explicitly set AIDP_SERVER_URL, otherwise the validation rejects all URLs before reaching the API key/header logic. * 🔒 Security: Refactor AIDP URL validation to enhance SSRF protection. The new `_validate_and_reconstruct_aidp_url` function ensures strict checks and re-serialization of URLs, improving safety against potential attacks. Update `_fetch_aidp_image` to utilize the new validation method, reinforcing defensive coding practices. * Add ext_components path to test target paths * test: comprehensive coverage improvements across AIDP, agents, and core services Achieved 100% coverage for app_factory.py (AIDP exception handlers), group_db.py (query functions), nexent_agent.py (all tool branches), and AIDP search_tool.py. Key coverage improvements: - backend/apps/app_factory.py: 73% → 100% (17 lines) Added tests for all AIDP exception handlers including QuotaExceededError, AidpKbNotFoundError, AidpKbPermissionDeniedError, AidpKbConflictError, AidpKbSyncError, AidpGroupValidationError, ImportError fallback, and NexentCapabilityError. - backend/database/group_db.py: 92% → 100% (10 lines) Added 14 tests covering query_group_ids_by_user_in_tenant and filter_tenant_group_ids with success, empty input, and soft-delete filtering scenarios. - sdk/nexent/core/agents/nexent_agent.py: 82% → 100% (86 lines) Added 24 tests invoking monitoring wrappers, covering AidpSearchTool branch, CreatePlan/UpdatePlanStep tools, sandbox executor setup, plan tool wiring, token usage extraction, and MinIO sandbox cleanup. - sdk/nexent/core/ext_components/aidp/aidp_search_tool.py: 75% → 100% Added tests for all search tool branches including error handling and configuration validation. - backend/ext_components/aidp/: Achieved 100% coverage across all AIDP modules (mgmt_app, permission_db, permission_service) with 55+ new tests covering permission checks, group validation, and edge cases. - backend/services/tool_configuration_service.py: 84% → 96% Added 13 tests for AIDP permission validation, tool validation, and error handling paths. - backend/agents/create_agent_info.py: 84% → 93% Added 12 tests for memory formatting, memory service error handling, and AIDP credential injection during agent creation. Total: 1097 tests pass across all modified files. --------- Co-authored-by: panyehong <91180085+YehongPan@users.noreply.github.com> Co-authored-by: chase <byzhangxin11@126.com> Co-authored-by: Chenlifeng <174292121+Lifeng-Chen@users.noreply.github.com> Co-authored-by: Dallas98 <40557804+Dallas98@users.noreply.github.com> Co-authored-by: Jason Wang <56037774+JasonW404@users.noreply.github.com> Co-authored-by: Xia Yichen <iamjasonxia@126.com> Co-authored-by: JeffWu <45140512+jeffwu-1999@users.noreply.github.com> Co-authored-by: WMC001 <46217886+WMC001@users.noreply.github.com> Co-authored-by: xuyaqi <xuyaqist@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: hhhhsc701 <56435672+hhhhsc701@users.noreply.github.com> Co-authored-by: Dallas98 <990259227@qq.com> Co-authored-by: frr <64584192+wuyuanfr@users.noreply.github.com> Co-authored-by: cang-xue <3232085039@qq.com> | 2 个月前 |