Вынести сценарий в JSON и добавить динамический loader.
Переключает запуск workflow на загрузку сценария из файлового хранилища по scenario_id и собирает шаги выполнения из definition.steps вместо хардкода в раннере.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"scenarios": {
|
||||
"news_source_discovery_v1": "news_source_discovery/v1.json"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"schema_version": "1",
|
||||
"scenario_id": "news_source_discovery_v1",
|
||||
"name": "News Source Discovery V1",
|
||||
"description": "Find earliest news source using sequential stub tools.",
|
||||
"input_schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "URL of source news article"
|
||||
}
|
||||
}
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "search_news_sources",
|
||||
"type": "tool"
|
||||
},
|
||||
{
|
||||
"name": "parse_articles_batch",
|
||||
"type": "tool"
|
||||
},
|
||||
{
|
||||
"name": "extract_publication_date_batch",
|
||||
"type": "tool"
|
||||
},
|
||||
{
|
||||
"name": "rank_sources_by_date",
|
||||
"type": "tool"
|
||||
},
|
||||
{
|
||||
"name": "generate_summary",
|
||||
"type": "tool"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user