mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
some cleanups
This commit is contained in:
parent
ab5c9fc37b
commit
c82741c3d8
15 changed files with 911 additions and 56 deletions
|
|
@ -139,7 +139,7 @@ def terminal_tool(
|
|||
"exit_code": -1,
|
||||
"error": f"Terminal tool is disabled due to import error: {import_error}",
|
||||
"status": "disabled"
|
||||
})
|
||||
}, ensure_ascii=False)
|
||||
|
||||
# Get configuration from environment
|
||||
vm_lifetime_seconds = int(os.getenv("HECATE_VM_LIFETIME_SECONDS", "300"))
|
||||
|
|
@ -155,7 +155,7 @@ def terminal_tool(
|
|||
"exit_code": -1,
|
||||
"error": "MORPH_API_KEY environment variable not set",
|
||||
"status": "disabled"
|
||||
})
|
||||
}, ensure_ascii=False)
|
||||
|
||||
# Get or create VM instance and execution context
|
||||
# This is critical for interactive session support - the context must persist!
|
||||
|
|
@ -219,7 +219,7 @@ def terminal_tool(
|
|||
"status": "active" if result.get("session_id") else "ended"
|
||||
}
|
||||
|
||||
return json.dumps(formatted_result)
|
||||
return json.dumps(formatted_result, ensure_ascii=False)
|
||||
|
||||
except Exception as e:
|
||||
return json.dumps({
|
||||
|
|
@ -229,7 +229,7 @@ def terminal_tool(
|
|||
"exit_code": -1,
|
||||
"error": f"Failed to execute terminal command: {str(e)}",
|
||||
"status": "error"
|
||||
})
|
||||
}, ensure_ascii=False)
|
||||
|
||||
def check_hecate_requirements() -> bool:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue