From 9576fa6d6443a6dcf6447eb5755d526c0cdb6a9a Mon Sep 17 00:00:00 2001 From: Shihan Pan Date: Mon, 5 Jan 2026 11:11:25 -0800 Subject: [PATCH 1/3] Add support for agentic asset types Added 5 new agentic asset types to workato-api-spec.yaml: - agentic_genie - agentic_skill - data_pipeline - decision_engine_model - agentic_knowledge_base Updated Asset and AssetReference Pydantic models to accept the new types. Fixes DEVP-625 --- .../client/workato_api/models/asset.py | 4 ++-- .../client/workato_api/models/asset_reference.py | 4 ++-- workato-api-spec.yaml | 10 ++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/workato_platform_cli/client/workato_api/models/asset.py b/src/workato_platform_cli/client/workato_api/models/asset.py index 55b6b34..16f05b5 100644 --- a/src/workato_platform_cli/client/workato_api/models/asset.py +++ b/src/workato_platform_cli/client/workato_api/models/asset.py @@ -42,8 +42,8 @@ class Asset(BaseModel): @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint']): - raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint')") + if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base']): + raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base')") return value @field_validator('status') diff --git a/src/workato_platform_cli/client/workato_api/models/asset_reference.py b/src/workato_platform_cli/client/workato_api/models/asset_reference.py index e32f57f..dcceea4 100644 --- a/src/workato_platform_cli/client/workato_api/models/asset_reference.py +++ b/src/workato_platform_cli/client/workato_api/models/asset_reference.py @@ -40,8 +40,8 @@ class AssetReference(BaseModel): @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint']): - raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint')") + if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base']): + raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base')") return value model_config = ConfigDict( diff --git a/workato-api-spec.yaml b/workato-api-spec.yaml index f94b3f3..28360cc 100644 --- a/workato-api-spec.yaml +++ b/workato-api-spec.yaml @@ -1698,6 +1698,11 @@ components: topic, api_group, api_endpoint, + agentic_genie, + agentic_skill, + data_pipeline, + decision_engine_model, + agentic_knowledge_base, ] example: "recipe" version: @@ -1804,6 +1809,11 @@ components: topic, api_group, api_endpoint, + agentic_genie, + agentic_skill, + data_pipeline, + decision_engine_model, + agentic_knowledge_base, ] checked: type: boolean From a9e720fe32d7257a0dbee7b760b804d56919d62a Mon Sep 17 00:00:00 2001 From: Shihan Pan Date: Wed, 7 Jan 2026 15:33:22 -0800 Subject: [PATCH 2/3] Add support for mcp_server asset type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added mcp_server to Asset and AssetReference type enums in workato-api-spec.yaml - Updated Pydantic models to accept mcp_server as a valid asset type - Fixes validation error when pulling projects containing MCP servers This extends DEVP-625 to include the new mcp_server asset type alongside the previously added agentic asset types. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/workato_platform_cli/client/workato_api/models/asset.py | 4 ++-- .../client/workato_api/models/asset_reference.py | 4 ++-- workato-api-spec.yaml | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/workato_platform_cli/client/workato_api/models/asset.py b/src/workato_platform_cli/client/workato_api/models/asset.py index 16f05b5..06f091a 100644 --- a/src/workato_platform_cli/client/workato_api/models/asset.py +++ b/src/workato_platform_cli/client/workato_api/models/asset.py @@ -42,8 +42,8 @@ class Asset(BaseModel): @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base']): - raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base')") + if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base', 'mcp_server']): + raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base', 'mcp_server')") return value @field_validator('status') diff --git a/src/workato_platform_cli/client/workato_api/models/asset_reference.py b/src/workato_platform_cli/client/workato_api/models/asset_reference.py index dcceea4..04d9a57 100644 --- a/src/workato_platform_cli/client/workato_api/models/asset_reference.py +++ b/src/workato_platform_cli/client/workato_api/models/asset_reference.py @@ -40,8 +40,8 @@ class AssetReference(BaseModel): @field_validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base']): - raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base')") + if value not in set(['recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base', 'mcp_server']): + raise ValueError("must be one of enum values ('recipe', 'connection', 'lookup_table', 'workato_db_table', 'account_property', 'project_property', 'workato_schema', 'workato_template', 'lcap_app', 'lcap_page', 'custom_adapter', 'topic', 'api_group', 'api_endpoint', 'agentic_genie', 'agentic_skill', 'data_pipeline', 'decision_engine_model', 'agentic_knowledge_base', 'mcp_server')") return value model_config = ConfigDict( diff --git a/workato-api-spec.yaml b/workato-api-spec.yaml index 28360cc..c909859 100644 --- a/workato-api-spec.yaml +++ b/workato-api-spec.yaml @@ -1703,6 +1703,7 @@ components: data_pipeline, decision_engine_model, agentic_knowledge_base, + mcp_server, ] example: "recipe" version: @@ -1814,6 +1815,7 @@ components: data_pipeline, decision_engine_model, agentic_knowledge_base, + mcp_server, ] checked: type: boolean From e5db1041079dc6f9ffa3bd4a2493f6179807c2d6 Mon Sep 17 00:00:00 2001 From: Shihan Pan Date: Wed, 7 Jan 2026 17:15:12 -0800 Subject: [PATCH 3/3] Added unit tests for the Asset and AssetReference to ensure enums are correctly added --- tests/unit/models/__init__.py | 1 + tests/unit/models/test_asset.py | 57 +++++++++++++++++++++++ tests/unit/models/test_asset_reference.py | 53 +++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 tests/unit/models/__init__.py create mode 100644 tests/unit/models/test_asset.py create mode 100644 tests/unit/models/test_asset_reference.py diff --git a/tests/unit/models/__init__.py b/tests/unit/models/__init__.py new file mode 100644 index 0000000..f10bf98 --- /dev/null +++ b/tests/unit/models/__init__.py @@ -0,0 +1 @@ +# Model validation tests diff --git a/tests/unit/models/test_asset.py b/tests/unit/models/test_asset.py new file mode 100644 index 0000000..3b3e924 --- /dev/null +++ b/tests/unit/models/test_asset.py @@ -0,0 +1,57 @@ +import pytest +from workato_platform_cli.client.workato_api.models.asset import Asset + +def test_asset_accepts_all_valid_types(): + """Test that Asset model accepts all valid asset types.""" + valid_types = [ + "recipe", + "connection", + "lookup_table", + "workato_db_table", + "account_property", + "project_property", + "workato_schema", + "workato_template", + "lcap_app", + "lcap_page", + "custom_adapter", + "topic", + "api_group", + "api_endpoint", + "agentic_genie", + "agentic_skill", + "data_pipeline", + "decision_engine_model", + "agentic_knowledge_base", + "mcp_server", + ] + + for asset_type in valid_types: + asset_data = { + "id": 1, + "name": f"Test {asset_type}", + "type": asset_type, + "zip_name": "test.zip", + "checked": True, + "root_folder": False, + } + + # Should not raise ValueError + asset = Asset.from_dict(asset_data) + assert asset.type == asset_type + + +def test_asset_rejects_invalid_type(): + """Test that Asset model rejects invalid types.""" + asset_data = { + "id": 12345, + "name": "Test Asset", + "type": "invalid_type", + "zip_name": "test.zip", + "checked": True, + "root_folder": False, + } + + with pytest.raises(ValueError, match="must be one of enum values"): + Asset.from_dict(asset_data) + diff --git a/tests/unit/models/test_asset_reference.py b/tests/unit/models/test_asset_reference.py new file mode 100644 index 0000000..9201098 --- /dev/null +++ b/tests/unit/models/test_asset_reference.py @@ -0,0 +1,53 @@ +import pytest +from workato_platform_cli.client.workato_api.models.asset_reference import ( + AssetReference, +) + +def test_asset_reference_accepts_all_valid_types(): + """Test that AssetReference model accepts all valid asset types.""" + valid_types = [ + "recipe", + "connection", + "lookup_table", + "workato_db_table", + "account_property", + "project_property", + "workato_schema", + "workato_template", + "lcap_app", + "lcap_page", + "custom_adapter", + "topic", + "api_group", + "api_endpoint", + "agentic_genie", + "agentic_skill", + "data_pipeline", + "decision_engine_model", + "agentic_knowledge_base", + "mcp_server", + ] + + for asset_type in valid_types: + asset_ref_data = { + "id": 1, + "type": asset_type, + "absolute_path": f"/test/{asset_type}", + } + + # Should not raise ValueError + asset_ref = AssetReference.from_dict(asset_ref_data) + assert asset_ref.type == asset_type + + +def test_asset_reference_rejects_invalid_type(): + """Test that AssetReference model rejects invalid types.""" + asset_ref_data = { + "id": 12345, + "type": "invalid_type", + "absolute_path": "/test/invalid", + } + + with pytest.raises(ValueError, match="must be one of enum values"): + AssetReference.from_dict(asset_ref_data) +