From 1312bfa98aedb7e17188ce24a8dea0b04644a936 Mon Sep 17 00:00:00 2001 From: Tharick Jairam Date: Mon, 19 Jan 2026 16:14:34 -0400 Subject: [PATCH 1/2] added content_type to save file --- __init__.py | 2 +- core/jivas/agent/action/action.jac | 4 ++-- .../agent/action/subgraph_action/state.jac | 3 +++ core/jivas/agent/core/agent.jac | 4 ++-- .../{2.1.24 => 2.1.25}/project/README.md | 0 .../project/actions/README.md | 0 .../{2.1.24 => 2.1.25}/project/daf/README.md | 0 .../{2.1.24 => 2.1.25}/project/env.example | 2 +- .../project/gitignore.example | 0 .../{2.1.24 => 2.1.25}/project/globals.jac | 0 .../{2.1.24 => 2.1.25}/project/main.jac | 0 .../project/tests/README.md | 0 .../sourcefiles/CHANGELOG.md | 0 .../{2.1.24 => 2.1.25}/sourcefiles/README.md | 0 .../sourcefiles/action_app.py | 0 .../sourcefiles/action_archetype.jac | 0 .../sourcefiles/action_info.yaml | 0 .../sourcefiles/action_lib.jac | 0 .../sourcefiles/agent_descriptor.yaml | 0 .../sourcefiles/agent_info.yaml | 0 .../sourcefiles/agent_knowledge.yaml | 0 .../sourcefiles/agent_memory.yaml | 0 .../sourcefiles/interact_action_archetype.jac | 0 jvserve/jvserve/lib/file_interface.py | 21 +++++++++++++------ 24 files changed, 24 insertions(+), 12 deletions(-) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/project/README.md (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/project/actions/README.md (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/project/daf/README.md (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/project/env.example (97%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/project/gitignore.example (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/project/globals.jac (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/project/main.jac (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/project/tests/README.md (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/CHANGELOG.md (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/README.md (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/action_app.py (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/action_archetype.jac (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/action_info.yaml (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/action_lib.jac (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/agent_descriptor.yaml (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/agent_info.yaml (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/agent_knowledge.yaml (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/agent_memory.yaml (100%) rename jvcli/jvcli/templates/{2.1.24 => 2.1.25}/sourcefiles/interact_action_archetype.jac (100%) diff --git a/__init__.py b/__init__.py index 4f09cac..ce482be 100644 --- a/__init__.py +++ b/__init__.py @@ -4,4 +4,4 @@ JIVAS is an Agentic Framework for rapidly prototyping and deploying graph-based, AI solutions. """ -__version__ = "2.1.24" +__version__ = "2.1.25" diff --git a/core/jivas/agent/action/action.jac b/core/jivas/agent/action/action.jac index c1c1c7a..be07b25 100644 --- a/core/jivas/agent/action/action.jac +++ b/core/jivas/agent/action/action.jac @@ -180,9 +180,9 @@ node Action(GraphNode) { return self.get_agent().get_file(f"{self.get_type()}/{path}"); } - def save_file(path: str, content: bytes) -> bool { + def save_file(path: str, content: bytes, content_type: str = "") -> bool { # saves a file associated with this action at the given path - return self.get_agent().save_file(f"{self.get_type()}/{path}", content); + return self.get_agent().save_file(f"{self.get_type()}/{path}", content, content_type); } def delete_file(path: str) -> bool { diff --git a/core/jivas/agent/action/subgraph_action/state.jac b/core/jivas/agent/action/subgraph_action/state.jac index e6702a7..97b1aa3 100644 --- a/core/jivas/agent/action/subgraph_action/state.jac +++ b/core/jivas/agent/action/subgraph_action/state.jac @@ -130,6 +130,9 @@ node State(GraphNode) { directive = directive + "\n They can choose from the list of options below\n" + str(options); } frame_node.data_set(key="directive", value=directive); + print("directive"); + print(directive); + return directive; } elif required == False { diff --git a/core/jivas/agent/core/agent.jac b/core/jivas/agent/core/agent.jac index c38dbbe..5e026e3 100644 --- a/core/jivas/agent/core/agent.jac +++ b/core/jivas/agent/core/agent.jac @@ -446,9 +446,9 @@ node Agent(GraphNode) { return file_interface.get_file(f"{self.id}/{path}"); } - def save_file(path: str, content: bytes) -> bool { + def save_file(path: str, content: bytes, content_type: str = "") -> bool { # Saves a file for this agent at the given path. - return file_interface.save_file(f"{self.id}/{path}", content); + return file_interface.save_file(f"{self.id}/{path}", content, content_type); } def delete_file(path: str) -> bool { diff --git a/jvcli/jvcli/templates/2.1.24/project/README.md b/jvcli/jvcli/templates/2.1.25/project/README.md similarity index 100% rename from jvcli/jvcli/templates/2.1.24/project/README.md rename to jvcli/jvcli/templates/2.1.25/project/README.md diff --git a/jvcli/jvcli/templates/2.1.24/project/actions/README.md b/jvcli/jvcli/templates/2.1.25/project/actions/README.md similarity index 100% rename from jvcli/jvcli/templates/2.1.24/project/actions/README.md rename to jvcli/jvcli/templates/2.1.25/project/actions/README.md diff --git a/jvcli/jvcli/templates/2.1.24/project/daf/README.md b/jvcli/jvcli/templates/2.1.25/project/daf/README.md similarity index 100% rename from jvcli/jvcli/templates/2.1.24/project/daf/README.md rename to jvcli/jvcli/templates/2.1.25/project/daf/README.md diff --git a/jvcli/jvcli/templates/2.1.24/project/env.example b/jvcli/jvcli/templates/2.1.25/project/env.example similarity index 97% rename from jvcli/jvcli/templates/2.1.24/project/env.example rename to jvcli/jvcli/templates/2.1.25/project/env.example index af63cc6..e4066c0 100644 --- a/jvcli/jvcli/templates/2.1.24/project/env.example +++ b/jvcli/jvcli/templates/2.1.25/project/env.example @@ -20,7 +20,7 @@ JIVAS_FILES_SHORT_URL=${JIVAS_BASE_URL}/f # JIVAS_S3_ENDPOINT=access_key_id # optional # JIVAS_S3_ACCESS_KEY_ID=access_key_id # JIVAS_S3_SECRET_ACCESS_KEY=secret_access_key -# JIVAS_S3_REGION=us-east-1 +# JIVAS_S3_REGION_NAME=us-east-1 # JIVAS_S3_BUCKET_NAME=my-bucket # Secrets Config diff --git a/jvcli/jvcli/templates/2.1.24/project/gitignore.example b/jvcli/jvcli/templates/2.1.25/project/gitignore.example similarity index 100% rename from jvcli/jvcli/templates/2.1.24/project/gitignore.example rename to jvcli/jvcli/templates/2.1.25/project/gitignore.example diff --git a/jvcli/jvcli/templates/2.1.24/project/globals.jac b/jvcli/jvcli/templates/2.1.25/project/globals.jac similarity index 100% rename from jvcli/jvcli/templates/2.1.24/project/globals.jac rename to jvcli/jvcli/templates/2.1.25/project/globals.jac diff --git a/jvcli/jvcli/templates/2.1.24/project/main.jac b/jvcli/jvcli/templates/2.1.25/project/main.jac similarity index 100% rename from jvcli/jvcli/templates/2.1.24/project/main.jac rename to jvcli/jvcli/templates/2.1.25/project/main.jac diff --git a/jvcli/jvcli/templates/2.1.24/project/tests/README.md b/jvcli/jvcli/templates/2.1.25/project/tests/README.md similarity index 100% rename from jvcli/jvcli/templates/2.1.24/project/tests/README.md rename to jvcli/jvcli/templates/2.1.25/project/tests/README.md diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/CHANGELOG.md b/jvcli/jvcli/templates/2.1.25/sourcefiles/CHANGELOG.md similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/CHANGELOG.md rename to jvcli/jvcli/templates/2.1.25/sourcefiles/CHANGELOG.md diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/README.md b/jvcli/jvcli/templates/2.1.25/sourcefiles/README.md similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/README.md rename to jvcli/jvcli/templates/2.1.25/sourcefiles/README.md diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/action_app.py b/jvcli/jvcli/templates/2.1.25/sourcefiles/action_app.py similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/action_app.py rename to jvcli/jvcli/templates/2.1.25/sourcefiles/action_app.py diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/action_archetype.jac b/jvcli/jvcli/templates/2.1.25/sourcefiles/action_archetype.jac similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/action_archetype.jac rename to jvcli/jvcli/templates/2.1.25/sourcefiles/action_archetype.jac diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/action_info.yaml b/jvcli/jvcli/templates/2.1.25/sourcefiles/action_info.yaml similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/action_info.yaml rename to jvcli/jvcli/templates/2.1.25/sourcefiles/action_info.yaml diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/action_lib.jac b/jvcli/jvcli/templates/2.1.25/sourcefiles/action_lib.jac similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/action_lib.jac rename to jvcli/jvcli/templates/2.1.25/sourcefiles/action_lib.jac diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/agent_descriptor.yaml b/jvcli/jvcli/templates/2.1.25/sourcefiles/agent_descriptor.yaml similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/agent_descriptor.yaml rename to jvcli/jvcli/templates/2.1.25/sourcefiles/agent_descriptor.yaml diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/agent_info.yaml b/jvcli/jvcli/templates/2.1.25/sourcefiles/agent_info.yaml similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/agent_info.yaml rename to jvcli/jvcli/templates/2.1.25/sourcefiles/agent_info.yaml diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/agent_knowledge.yaml b/jvcli/jvcli/templates/2.1.25/sourcefiles/agent_knowledge.yaml similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/agent_knowledge.yaml rename to jvcli/jvcli/templates/2.1.25/sourcefiles/agent_knowledge.yaml diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/agent_memory.yaml b/jvcli/jvcli/templates/2.1.25/sourcefiles/agent_memory.yaml similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/agent_memory.yaml rename to jvcli/jvcli/templates/2.1.25/sourcefiles/agent_memory.yaml diff --git a/jvcli/jvcli/templates/2.1.24/sourcefiles/interact_action_archetype.jac b/jvcli/jvcli/templates/2.1.25/sourcefiles/interact_action_archetype.jac similarity index 100% rename from jvcli/jvcli/templates/2.1.24/sourcefiles/interact_action_archetype.jac rename to jvcli/jvcli/templates/2.1.25/sourcefiles/interact_action_archetype.jac diff --git a/jvserve/jvserve/lib/file_interface.py b/jvserve/jvserve/lib/file_interface.py index b2ec336..75b5b97 100644 --- a/jvserve/jvserve/lib/file_interface.py +++ b/jvserve/jvserve/lib/file_interface.py @@ -28,7 +28,7 @@ def get_file(self, filename: str) -> bytes | None: pass @abstractmethod - def save_file(self, filename: str, content: bytes) -> bool: + def save_file(self, filename: str, content: bytes, content_type: str = "") -> bool: """Save content to a file in storage.""" pass @@ -58,7 +58,7 @@ def get_file(self, filename: str) -> bytes | None: return f.read() return None - def save_file(self, filename: str, content: bytes) -> bool: + def save_file(self, filename: str, content: bytes, content_type: str = "") -> bool: """Write content to a local file.""" file_path = os.path.join(self.__root_dir, filename) os.makedirs(os.path.dirname(file_path), exist_ok=True) @@ -124,13 +124,22 @@ def get_file(self, filename: str) -> bytes | None: except Exception: return None - def save_file(self, filename: str, content: bytes) -> bool: + def save_file(self, filename: str, content: bytes, content_type: str = "") -> bool: """Save file to S3 bucket.""" try: file_key = os.path.join(self.__root_dir, filename) - self.s3_client.put_object( - Bucket=self.bucket_name, Key=file_key, Body=content - ) + + if content_type: + self.s3_client.put_object( + Bucket=self.bucket_name, + Key=file_key, + Body=content, + ContentType=content_type, + ) + else: + self.s3_client.put_object( + Bucket=self.bucket_name, Key=file_key, Body=content + ) return True except Exception: return False From be433a8eb5e1aad2ebb1824095685e1c6ab6698f Mon Sep 17 00:00:00 2001 From: Tharick Jairam Date: Mon, 19 Jan 2026 16:20:25 -0400 Subject: [PATCH 2/2] remove logs --- core/jivas/agent/action/subgraph_action/state.jac | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/jivas/agent/action/subgraph_action/state.jac b/core/jivas/agent/action/subgraph_action/state.jac index 97b1aa3..67d2228 100644 --- a/core/jivas/agent/action/subgraph_action/state.jac +++ b/core/jivas/agent/action/subgraph_action/state.jac @@ -130,8 +130,6 @@ node State(GraphNode) { directive = directive + "\n They can choose from the list of options below\n" + str(options); } frame_node.data_set(key="directive", value=directive); - print("directive"); - print(directive); return directive; }