[PR #28914] feat: add workflow and agent utility services #32236

Closed
opened 2026-02-21 20:51:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/28914

State: closed
Merged: No


Summary

This PR adds four new utility services to enhance workflow execution, agent streaming, document chunking, and conversation access control.

Changes

1. WorkflowTaskMonitorService

  • Task state tracking and transitions
  • Timeout and stuck task detection
  • Checkpoint management for recovery
  • Priority-based task scheduling
  • Related: improve dict check in py (#15500)

2. AgentStreamingService

  • Proper ordering of streaming events
  • Tool call tracking and deduplication
  • Multi-turn conversation handling
  • Event buffering and delivery
  • Related: Intermittent 503 (#16220)

3. DocumentChunkingService

4. ConversationAccessService

Testing

  • All services pass ruff check and basedpyright type checking
  • Services are designed for easy unit testing with dependency injection

Contribution by Gittensor, learn more at https://gittensor.io/

**Original Pull Request:** https://github.com/langgenius/dify/pull/28914 **State:** closed **Merged:** No --- ## Summary This PR adds four new utility services to enhance workflow execution, agent streaming, document chunking, and conversation access control. ## Changes ### 1. WorkflowTaskMonitorService - Task state tracking and transitions - Timeout and stuck task detection - Checkpoint management for recovery - Priority-based task scheduling - Related: #15500 ### 2. AgentStreamingService - Proper ordering of streaming events - Tool call tracking and deduplication - Multi-turn conversation handling - Event buffering and delivery - Related: #16220 ### 3. DocumentChunkingService - Storing and retrieving chunking configurations - Generating chunk previews for UI display - Synchronizing API and UI chunking details - Related: #16486 ### 4. ConversationAccessService - Verifying user access to conversations - Managing conversation ownership - Enforcing access policies - Auditing access attempts - Related: #18410 ## Testing - All services pass `ruff check` and `basedpyright` type checking - Services are designed for easy unit testing with dependency injection --- *Contribution by Gittensor, learn more at https://gittensor.io/*
yindo added the pull-request label 2026-02-21 20:51:01 -05:00
yindo closed this issue 2026-02-21 20:51:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32236