mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 16:59:21 +08:00
refactor(api): use standalone graphon package (#34209)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,6 @@ root_packages =
|
||||
core
|
||||
constants
|
||||
context
|
||||
graphon
|
||||
configs
|
||||
controllers
|
||||
extensions
|
||||
@@ -13,152 +12,3 @@ root_packages =
|
||||
tasks
|
||||
services
|
||||
include_external_packages = True
|
||||
|
||||
[importlinter:contract:workflow]
|
||||
name = Workflow
|
||||
type=layers
|
||||
layers =
|
||||
graph_engine
|
||||
graph_events
|
||||
graph
|
||||
nodes
|
||||
node_events
|
||||
runtime
|
||||
entities
|
||||
containers =
|
||||
graphon
|
||||
ignore_imports =
|
||||
graphon.nodes.base.node -> graphon.graph_events
|
||||
graphon.nodes.iteration.iteration_node -> graphon.graph_events
|
||||
graphon.nodes.loop.loop_node -> graphon.graph_events
|
||||
|
||||
graphon.nodes.iteration.iteration_node -> graphon.graph_engine
|
||||
graphon.nodes.loop.loop_node -> graphon.graph_engine
|
||||
# TODO(QuantumGhost): fix the import violation later
|
||||
graphon.entities.pause_reason -> graphon.nodes.human_input.entities
|
||||
|
||||
[importlinter:contract:workflow-external-imports]
|
||||
name = Workflow External Imports
|
||||
type = forbidden
|
||||
source_modules =
|
||||
graphon
|
||||
forbidden_modules =
|
||||
constants
|
||||
configs
|
||||
context
|
||||
controllers
|
||||
extensions
|
||||
factories
|
||||
libs
|
||||
models
|
||||
services
|
||||
tasks
|
||||
core.agent
|
||||
core.app
|
||||
core.base
|
||||
core.callback_handler
|
||||
core.datasource
|
||||
core.db
|
||||
core.entities
|
||||
core.errors
|
||||
core.extension
|
||||
core.external_data_tool
|
||||
core.file
|
||||
core.helper
|
||||
core.hosting_configuration
|
||||
core.indexing_runner
|
||||
core.llm_generator
|
||||
core.logging
|
||||
core.mcp
|
||||
core.memory
|
||||
core.moderation
|
||||
core.ops
|
||||
core.plugin
|
||||
core.prompt
|
||||
core.provider_manager
|
||||
core.rag
|
||||
core.repositories
|
||||
core.schemas
|
||||
core.tools
|
||||
core.trigger
|
||||
core.variables
|
||||
|
||||
[importlinter:contract:workflow-third-party-imports]
|
||||
name = Workflow Third-Party Imports
|
||||
type = forbidden
|
||||
source_modules =
|
||||
graphon
|
||||
forbidden_modules =
|
||||
sqlalchemy
|
||||
|
||||
[importlinter:contract:rsc]
|
||||
name = RSC
|
||||
type = layers
|
||||
layers =
|
||||
graph_engine
|
||||
response_coordinator
|
||||
containers =
|
||||
graphon.graph_engine
|
||||
|
||||
[importlinter:contract:worker]
|
||||
name = Worker
|
||||
type = layers
|
||||
layers =
|
||||
graph_engine
|
||||
worker
|
||||
containers =
|
||||
graphon.graph_engine
|
||||
|
||||
[importlinter:contract:graph-engine-architecture]
|
||||
name = Graph Engine Architecture
|
||||
type = layers
|
||||
layers =
|
||||
graph_engine
|
||||
orchestration
|
||||
command_processing
|
||||
event_management
|
||||
error_handler
|
||||
graph_traversal
|
||||
graph_state_manager
|
||||
worker_management
|
||||
domain
|
||||
containers =
|
||||
graphon.graph_engine
|
||||
|
||||
[importlinter:contract:domain-isolation]
|
||||
name = Domain Model Isolation
|
||||
type = forbidden
|
||||
source_modules =
|
||||
graphon.graph_engine.domain
|
||||
forbidden_modules =
|
||||
graphon.graph_engine.worker_management
|
||||
graphon.graph_engine.command_channels
|
||||
graphon.graph_engine.layers
|
||||
graphon.graph_engine.protocols
|
||||
|
||||
[importlinter:contract:worker-management]
|
||||
name = Worker Management
|
||||
type = forbidden
|
||||
source_modules =
|
||||
graphon.graph_engine.worker_management
|
||||
forbidden_modules =
|
||||
graphon.graph_engine.orchestration
|
||||
graphon.graph_engine.command_processing
|
||||
graphon.graph_engine.event_management
|
||||
|
||||
|
||||
[importlinter:contract:graph-traversal-components]
|
||||
name = Graph Traversal Components
|
||||
type = layers
|
||||
layers =
|
||||
edge_processor
|
||||
skip_propagator
|
||||
containers =
|
||||
graphon.graph_engine.graph_traversal
|
||||
|
||||
[importlinter:contract:command-channels]
|
||||
name = Command Channels Independence
|
||||
type = independence
|
||||
modules =
|
||||
graphon.graph_engine.command_channels.in_memory_channel
|
||||
graphon.graph_engine.command_channels.redis_channel
|
||||
|
||||
Reference in New Issue
Block a user