From 46e91df050d2866e699762d0b3627e1d3f3ff7cf Mon Sep 17 00:00:00 2001 From: jagadeeswaran-zipstack Date: Fri, 19 Sep 2025 12:19:21 +0530 Subject: [PATCH 1/2] UN-2805 Add user_data parameter for API deployment variable replacement overrides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added USER_DATA constant to MetadataKey class for user data handling - Updated BaseTool to extract and store user_data from execution metadata - Version bump to v0.77.2 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/unstract/sdk/__init__.py | 2 +- src/unstract/sdk/constants.py | 1 + src/unstract/sdk/tool/base.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/unstract/sdk/__init__.py b/src/unstract/sdk/__init__.py index 3f9c0f1..2639151 100644 --- a/src/unstract/sdk/__init__.py +++ b/src/unstract/sdk/__init__.py @@ -1,4 +1,4 @@ -__version__ = "v0.77.1" +__version__ = "v0.77.2" def get_sdk_version() -> str: diff --git a/src/unstract/sdk/constants.py b/src/unstract/sdk/constants.py index 477680f..72930d9 100644 --- a/src/unstract/sdk/constants.py +++ b/src/unstract/sdk/constants.py @@ -135,6 +135,7 @@ class MetadataKey: OUTPUT = "output" OUTPUT_TYPE = "output_type" LLM_PROFILE_ID = "llm_profile_id" + USER_DATA = "user_data" class ToolSettingsKey: diff --git a/src/unstract/sdk/tool/base.py b/src/unstract/sdk/tool/base.py index 67f587d..0389dc4 100644 --- a/src/unstract/sdk/tool/base.py +++ b/src/unstract/sdk/tool/base.py @@ -94,6 +94,7 @@ def from_tool_args(cls, args: list[str]) -> "BaseTool": tool.source_file_name = tool._exec_metadata.get(MetadataKey.SOURCE_NAME, "") tool.org_id = tool._exec_metadata.get(MetadataKey.ORG_ID) tool.llm_profile_id = tool._exec_metadata.get(MetadataKey.LLM_PROFILE_ID) + tool.user_data = tool._exec_metadata.get(MetadataKey.USER_DATA, {}) return tool def elapsed_time(self) -> float: @@ -132,7 +133,9 @@ def _get_file_from_data_dir(self, file_to_get: str, raise_err: bool = False) -> base_path = self.execution_dir file_path = base_path / file_to_get if raise_err and not self.workflow_filestorage.exists(path=file_path): - self.stream_error_and_exit(f"{file_to_get} is missing in EXECUTION_DATA_DIR") + self.stream_error_and_exit( + f"{file_to_get} is missing in EXECUTION_DATA_DIR" + ) return str(file_path) From 0988d3a49306f406b2502a93a0a62389f1855907 Mon Sep 17 00:00:00 2001 From: jagadeeswaran-zipstack Date: Mon, 22 Sep 2025 17:14:16 +0530 Subject: [PATCH 2/2] UN-2805 Rename user_data to custom_data for consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renamed USER_DATA constant to CUSTOM_DATA in MetadataKey class - Updated BaseTool to use custom_data instead of user_data - Version bump to v0.77.3 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/unstract/sdk/__init__.py | 2 +- src/unstract/sdk/constants.py | 2 +- src/unstract/sdk/tool/base.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/unstract/sdk/__init__.py b/src/unstract/sdk/__init__.py index 2639151..3e0452c 100644 --- a/src/unstract/sdk/__init__.py +++ b/src/unstract/sdk/__init__.py @@ -1,4 +1,4 @@ -__version__ = "v0.77.2" +__version__ = "v0.77.3" def get_sdk_version() -> str: diff --git a/src/unstract/sdk/constants.py b/src/unstract/sdk/constants.py index 72930d9..0f149e4 100644 --- a/src/unstract/sdk/constants.py +++ b/src/unstract/sdk/constants.py @@ -135,7 +135,7 @@ class MetadataKey: OUTPUT = "output" OUTPUT_TYPE = "output_type" LLM_PROFILE_ID = "llm_profile_id" - USER_DATA = "user_data" + CUSTOM_DATA = "custom_data" class ToolSettingsKey: diff --git a/src/unstract/sdk/tool/base.py b/src/unstract/sdk/tool/base.py index 0389dc4..063139f 100644 --- a/src/unstract/sdk/tool/base.py +++ b/src/unstract/sdk/tool/base.py @@ -94,7 +94,7 @@ def from_tool_args(cls, args: list[str]) -> "BaseTool": tool.source_file_name = tool._exec_metadata.get(MetadataKey.SOURCE_NAME, "") tool.org_id = tool._exec_metadata.get(MetadataKey.ORG_ID) tool.llm_profile_id = tool._exec_metadata.get(MetadataKey.LLM_PROFILE_ID) - tool.user_data = tool._exec_metadata.get(MetadataKey.USER_DATA, {}) + tool.custom_data = tool._exec_metadata.get(MetadataKey.CUSTOM_DATA, {}) return tool def elapsed_time(self) -> float: