content access
This commit is contained in:
@@ -30,7 +30,6 @@ from .wrapper_hints import (
|
||||
)
|
||||
|
||||
from .operation_context import (
|
||||
WorkflowArtifactCataloger,
|
||||
WorkflowEventRecorder,
|
||||
WorkflowLiveSourceChecker,
|
||||
WorkflowOperationContext,
|
||||
@@ -62,7 +61,6 @@ __all__ = [
|
||||
"WorkflowApi",
|
||||
"WorkflowArtifactApi",
|
||||
"WorkflowCapabilityApi",
|
||||
"WorkflowArtifactCataloger",
|
||||
"WorkflowDeploymentApi",
|
||||
"WorkflowDraftApi",
|
||||
"WorkflowEventRecorder",
|
||||
|
||||
@@ -13,6 +13,7 @@ from wf_artifacts import (
|
||||
ArtifactKind,
|
||||
RequiredCapability,
|
||||
WorkflowArtifact,
|
||||
artifact_catalog_entry,
|
||||
create_workflow_artifact_from_plan as build_workflow_artifact_from_plan,
|
||||
)
|
||||
|
||||
@@ -56,9 +57,7 @@ class WorkflowArtifactApi:
|
||||
if self.context.artifact_store is None:
|
||||
return paged_list_payload("nodes", [], cursor=cursor, limit=limit)
|
||||
entries = [
|
||||
self.context.artifacts.workflow_artifact_catalog_entry(artifact).model_dump(
|
||||
mode="json"
|
||||
)
|
||||
artifact_catalog_entry(artifact).model_dump(mode="json")
|
||||
for artifact in self.context.artifact_store.list_artifacts()
|
||||
if kind is None or artifact.kind == kind
|
||||
]
|
||||
|
||||
@@ -9,7 +9,6 @@ from wf_artifacts import (
|
||||
DraftWorkspaceStore,
|
||||
RunStore,
|
||||
WorkflowArtifact,
|
||||
WorkflowArtifactCatalogEntry,
|
||||
WorkflowArtifactStore,
|
||||
WorkflowDeployment,
|
||||
)
|
||||
@@ -52,16 +51,6 @@ class WorkflowSpecProvider(Protocol):
|
||||
...
|
||||
|
||||
|
||||
class WorkflowArtifactCataloger(Protocol):
|
||||
"""Formats saved workflow artifacts for list/detail surfaces."""
|
||||
|
||||
def workflow_artifact_catalog_entry(
|
||||
self, artifact: WorkflowArtifact
|
||||
) -> WorkflowArtifactCatalogEntry:
|
||||
"""Return the catalog entry representation for one saved artifact."""
|
||||
...
|
||||
|
||||
|
||||
class WorkflowRuntimeRunner(Protocol):
|
||||
"""Runs and resumes workflow plans using an adapter-owned runtime backend."""
|
||||
|
||||
@@ -119,13 +108,11 @@ class WorkflowOperationContext:
|
||||
capability_sources: Mapping[str, CapabilitySource]
|
||||
events: WorkflowEventRecorder
|
||||
specs: WorkflowSpecProvider
|
||||
artifacts: WorkflowArtifactCataloger
|
||||
runtime: WorkflowRuntimeRunner
|
||||
live_sources: WorkflowLiveSourceChecker | None = None
|
||||
|
||||
|
||||
__all__ = [
|
||||
"WorkflowArtifactCataloger",
|
||||
"WorkflowEventRecorder",
|
||||
"WorkflowLiveSourceChecker",
|
||||
"WorkflowOperationContext",
|
||||
|
||||
Reference in New Issue
Block a user