content access

This commit is contained in:
lda
2026-06-03 00:32:50 +07:00 Verified
parent 6563ac9caf
commit 5af3f4428a
8 changed files with 298 additions and 128 deletions
-2
View File
@@ -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",
+2 -3
View File
@@ -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
]
-13
View File
@@ -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",