fix: harden Python workflow client boundary

This commit is contained in:
lda
2026-08-31 19:51:43 +07:00 Verified
parent b377311a6e
commit 4f946a35ef
35 changed files with 1257 additions and 302 deletions
-21
View File
@@ -8,10 +8,8 @@ from typing import Any, Literal, Protocol
from wf_api.models import (
CapabilityCallResult,
InspectCapabilityResult,
ListArtifactsResult,
ListCapabilitiesResult,
ListDeploymentsResult,
ListRunsResult,
RunResult,
RunTraceResult,
SaveArtifactResult,
@@ -55,15 +53,6 @@ class WorkflowClientPort(Protocol):
deployment_id: str | None = None,
) -> CapabilityCallResult: ...
async def list_artifacts(
self,
*,
query: str | None = None,
kind: Literal["workflow", "wrapper"] | None = None,
cursor: str | None = None,
limit: int = 50,
) -> ListArtifactsResult: ...
async def inspect_artifact(
self,
*,
@@ -71,8 +60,6 @@ class WorkflowClientPort(Protocol):
version: int,
) -> WorkflowArtifactPayload: ...
async def save_artifact(self, artifact: dict[str, Any]) -> SaveArtifactResult: ...
async def create_artifact_from_plan(
self,
*,
@@ -117,14 +104,6 @@ class WorkflowClientPort(Protocol):
live_check: bool = False,
) -> ValidateDeploymentResult: ...
async def list_runs(
self,
*,
status: str | None = None,
cursor: str | None = None,
limit: int = 50,
) -> ListRunsResult: ...
async def run_deployment(
self,
*,