fix: add import path support for python sources

This commit is contained in:
lda
2026-06-12 09:07:05 +07:00 Verified
parent 4bd321e905
commit a0bc27b051
9 changed files with 135 additions and 2 deletions
+28
View File
@@ -0,0 +1,28 @@
from __future__ import annotations
from pydantic import BaseModel
from wf_authoring import node
class EchoInput(BaseModel):
text: str
class EchoOutput(BaseModel):
echoed: str
@node(name="echo")
def echo(payload: EchoInput) -> EchoOutput:
"""Return the submitted text through a project-local Python source."""
return EchoOutput(echoed=payload.text)
@node(name="authoring.upper")
def upper(payload: EchoInput) -> EchoOutput:
"""Upper-case text while exercising authoring-name qualification."""
return EchoOutput(echoed=payload.text.upper())
registry = [echo, upper]