-
Notifications
You must be signed in to change notification settings - Fork 8
[Enhancement] SyGra Studio - UI Workflow Builder and Dashboard #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zephyrzilla
wants to merge
16
commits into
main
Choose a base branch
from
scratch/studio
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
59213cc
feat: add SyGra Studio
zephyrzilla 594294e
feat: refactor and show progress status in canvas
zephyrzilla d3e20a3
feat: UI refactor and progress tracking
zephyrzilla 45de2fd
feat: perf improvement and UI improvements
zephyrzilla e8a8b37
fix: graph save flow
zephyrzilla ef83d7e
feat: add graph export, collapsible minimap, auto-scroll logs, UI polish
zephyrzilla 0f50688
feat: add scalable execution storage and improve UI consistency
zephyrzilla db96de8
feat: redesign sidebar with output_keys, navigation, and panel compon…
zephyrzilla 34683fb
feat: multi-source data, inline preview, transforms, and global edito…
zephyrzilla 635b314
feat: add inline source preview, form validation, and improved LLM ou…
zephyrzilla 8055c91
feat: feat: enhance debugger with theme support
zephyrzilla d14a853
feat(ui): rebrand SyGra Studio with ServiceNow color palette
zephyrzilla a8535ed
fix(debugger): fix variables panel loading state and toolbar cleanup
zephyrzilla 72f8757
fix: code refactor
zephyrzilla 3365fb6
fix: resolve conflict in uv.lock
zephyrzilla f8e3c4f
fix: uv.lock sync
zephyrzilla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| """ | ||
| SyGra Studio Integration | ||
|
|
||
| This module provides seamless integration between SyGra workflows and Studio | ||
| UI visualization. It enables: | ||
| - Converting SyGra YAML configs to visualization-friendly graph format | ||
| - Running SyGra workflows from a web UI | ||
| - Real-time workflow execution monitoring | ||
|
|
||
| Usage: | ||
| # Start the UI server | ||
| from studio import run_server | ||
| run_server(tasks_dir="./tasks/examples", port=8000) | ||
|
|
||
| # Or use the CLI | ||
| python -m studio.server --tasks-dir ./tasks/examples | ||
|
|
||
| # Build graph from YAML | ||
| from studio import build_graph_from_yaml | ||
| graph = build_graph_from_yaml("./tasks/examples/glaive_code_assistant/graph_config.yaml") | ||
|
|
||
| # Convert to OpenFlow format | ||
| from studio import convert_sygra_to_openflow | ||
| openflow = convert_sygra_to_openflow("./tasks/examples/glaive_code_assistant/graph_config.yaml") | ||
| """ | ||
|
|
||
| from studio.converter import ( | ||
| SygraToStudioConverter, | ||
| convert_sygra_to_openflow, | ||
| ) | ||
| from studio.graph_builder import ( | ||
| SygraGraphBuilder, | ||
| build_graph_from_yaml, | ||
| build_graph_from_config, | ||
| ) | ||
| from studio.models import ( | ||
| WorkflowNode, | ||
| WorkflowEdge, | ||
| WorkflowGraph, | ||
| WorkflowExecution, | ||
| ExecutionStatus, | ||
| NodeType, | ||
| NodePosition, | ||
| NodeSize, | ||
| ModelConfig, | ||
| PromptMessage, | ||
| EdgeCondition, | ||
| NodeExecutionState, | ||
| WorkflowListItem, | ||
| ExecutionRequest, | ||
| ExecutionResponse, | ||
| ) | ||
| from studio.execution_manager import ( | ||
| ExecutionManager, | ||
| ExecutionCallback, | ||
| SygraExecutionRunner, | ||
| get_execution_manager, | ||
| ) | ||
|
|
||
| # Server components are lazily imported to avoid circular import warnings | ||
| # when running `python -m studio.server` | ||
|
|
||
| def create_server(*args, **kwargs): | ||
| """Create and return the Studio server instance (lazy import).""" | ||
| from studio.server import create_server as _create_server | ||
| return _create_server(*args, **kwargs) | ||
|
|
||
|
|
||
| def run_server(*args, **kwargs): | ||
| """Run the Studio server (lazy import).""" | ||
| from studio.server import run_server as _run_server | ||
| return _run_server(*args, **kwargs) | ||
|
|
||
| def create_app(*args, **kwargs): | ||
| """Create the FastAPI application (lazy import).""" | ||
| from studio.api import create_app as _create_app | ||
| return _create_app(*args, **kwargs) | ||
|
|
||
|
|
||
| def __getattr__(name): | ||
| """Lazy import for server components.""" | ||
| if name == "create_server": | ||
| from studio.server import create_server | ||
| return create_server | ||
| elif name == "run_server": | ||
| from studio.server import run_server | ||
| return run_server | ||
| elif name == "create_app": | ||
| from studio.api import create_app | ||
| return create_app | ||
| raise AttributeError(f"module {__name__!r} has no attribute {name!r}") | ||
|
|
||
| __all__ = [ | ||
| # Converter | ||
| "SygraToStudioConverter", | ||
| "convert_sygra_to_openflow", | ||
| # Graph Builder | ||
| "SygraGraphBuilder", | ||
| "build_graph_from_yaml", | ||
| "build_graph_from_config", | ||
| # Models | ||
| "WorkflowNode", | ||
| "WorkflowEdge", | ||
| "WorkflowGraph", | ||
| "WorkflowExecution", | ||
| "ExecutionStatus", | ||
| "NodeType", | ||
| "NodePosition", | ||
| "NodeSize", | ||
| "ModelConfig", | ||
| "PromptMessage", | ||
| "EdgeCondition", | ||
| "NodeExecutionState", | ||
| "WorkflowListItem", | ||
| "ExecutionRequest", | ||
| "ExecutionResponse", | ||
| # Execution | ||
| "ExecutionManager", | ||
| "ExecutionCallback", | ||
| "SygraExecutionRunner", | ||
| "get_execution_manager", | ||
| # Server | ||
| "create_server", | ||
| "run_server", | ||
github-code-quality[bot] marked this conversation as resolved.
Fixed
Show fixed
Hide fixed
|
||
| "create_app", | ||
github-code-quality[bot] marked this conversation as resolved.
Fixed
Show fixed
Hide fixed
|
||
| ] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.