dify/dify-agent/src/dify_agent/protocol/__init__.py
盐粒 Yanli 92df792e4a
refactor(agent): replace workspace inspector with sandbox API (#37349)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-12 02:46:31 +00:00

102 lines
2.5 KiB
Python

"""Public run-protocol exports shared by the Dify Agent server and clients.
Stub-specific protocol DTOs live under ``dify_agent.agent_stub.protocol`` so the
run API package boundary stays explicit.
"""
from .schemas import (
DIFY_AGENT_HISTORY_LAYER_ID,
DIFY_AGENT_MODEL_LAYER_ID,
DIFY_AGENT_OUTPUT_LAYER_ID,
RUN_EVENT_ADAPTER,
BaseRunEvent,
CancelRunRequest,
CancelRunResponse,
CreateRunRequest,
CreateRunResponse,
DeferredToolCallPayload,
DeferredToolResultsPayload,
EmptyRunEventData,
LayerExitSignals,
PydanticAIStreamRunEvent,
RunCancelledEvent,
RunCancelledEventData,
RunEvent,
RunComposition,
RunEventType,
RunEventsResponse,
RunFailedEvent,
RunFailedEventData,
RunPurpose,
RunLayerSpec,
RunStartedEvent,
RunStatus,
RunStatusResponse,
RunSucceededEvent,
RunSucceededEventData,
normalize_composition,
utc_now,
)
from .sandbox import (
RuntimeLayerSpec,
SandboxFileEntry,
SandboxListRequest,
SandboxListResponse,
SandboxLocator,
SandboxReadRequest,
SandboxReadResponse,
SandboxUploadRequest,
SandboxUploadResponse,
SandboxUploadedFile,
build_sandbox_locator_from_layer_specs,
build_sandbox_locator_from_run_request,
extract_runtime_layer_specs,
)
__all__ = [
"BaseRunEvent",
"CancelRunRequest",
"CancelRunResponse",
"CreateRunRequest",
"CreateRunResponse",
"DeferredToolCallPayload",
"DeferredToolResultsPayload",
"DIFY_AGENT_HISTORY_LAYER_ID",
"DIFY_AGENT_MODEL_LAYER_ID",
"DIFY_AGENT_OUTPUT_LAYER_ID",
"EmptyRunEventData",
"LayerExitSignals",
"PydanticAIStreamRunEvent",
"RUN_EVENT_ADAPTER",
"RunCancelledEvent",
"RunCancelledEventData",
"RunComposition",
"RunEvent",
"RunEventType",
"RunEventsResponse",
"RunFailedEvent",
"RunFailedEventData",
"RunPurpose",
"RunLayerSpec",
"RunStartedEvent",
"RunStatus",
"RunStatusResponse",
"RunSucceededEvent",
"RunSucceededEventData",
"RuntimeLayerSpec",
"SandboxFileEntry",
"SandboxListRequest",
"SandboxListResponse",
"SandboxLocator",
"SandboxReadRequest",
"SandboxReadResponse",
"SandboxUploadRequest",
"SandboxUploadResponse",
"SandboxUploadedFile",
"build_sandbox_locator_from_layer_specs",
"build_sandbox_locator_from_run_request",
"extract_runtime_layer_specs",
"normalize_composition",
"utc_now",
]