list and save artifact/deployments tools hooked

This commit is contained in:
lda
2026-05-11 16:01:27 +07:00 Verified
parent 949d461c83
commit 08136189b5
4 changed files with 135 additions and 0 deletions
+28
View File
@@ -59,3 +59,31 @@ def test_file_store_round_trips_deployment(tmp_path) -> None:
assert loaded.id == "summarize_docs.personal"
assert loaded.artifact_id == "summarize_docs"
assert loaded.bindings["context7"] == "context7.personal"
def test_file_store_lists_deployments_in_id_order(tmp_path) -> None:
store = FileWorkflowArtifactStore(tmp_path)
store.save_deployment(
WorkflowDeployment(
id="summarize_docs.work",
artifact_id="summarize_docs",
artifact_version=1,
bindings={"context7": "context7.work"},
)
)
store.save_deployment(
WorkflowDeployment(
id="summarize_docs.personal",
artifact_id="summarize_docs",
artifact_version=1,
bindings={"context7": "context7.personal"},
)
)
deployments = store.list_deployments()
assert [deployment.id for deployment in deployments] == [
"summarize_docs.personal",
"summarize_docs.work",
]
assert deployments[0].bindings["context7"] == "context7.personal"