use json schema for state schema

This commit is contained in:
lda
2026-05-20 19:14:00 +07:00 Verified
parent 7322e7ad5f
commit 9f265c3f80
16 changed files with 758 additions and 170 deletions
+4 -1
View File
@@ -42,7 +42,10 @@ async def run_example() -> dict[str, object]:
"properties": {"text": {"type": "string"}},
"required": ["text"],
},
"state_schema": {"fields": {"echoed": {"type": "string"}}},
"state_schema": {
"type": "object",
"properties": {"echoed": {"type": "string"}},
},
"output_schema": {
"type": "object",
"properties": {"echoed": {"type": "string"}},
+6 -6
View File
@@ -15,13 +15,13 @@ def build_raw_canonical_workflow() -> Workflow:
"required": ["text"],
},
"state_schema": {
"fields": [
{
"path": "state.message",
"schema": {"type": "string"},
"reducer": {"name": "wf.std.replace"},
"type": "object",
"properties": {
"message": {
"type": "string",
"reducer": "wf.std.replace",
}
]
},
},
"output_schema": {
"type": "object",