feat: agent resources upgrade

This commit is contained in:
Shivering Ocelot committed 2026-10-02 20:37:58 -05:00
1 parent 659b7497fb
commit ee323fe660
6 files changed
+170 -71

No files matched your search

+9 -1
View File
@@ -126,13 +126,21 @@ class AgentMixin:
async def save_agent_resource(self, agent_id, kind, key, value):
await db.AgentResource.update_or_create(
{'value': value},
agent_id=agent_id,
kind=kind,
key=key,
value=value,
)
print(f"Saved agent resource: {agent_id} - {kind} - {key}")
async def delete_agent_resource(self, agent_id, kind, key):
await db.AgentResource.filter(
agent_id=agent_id,
kind=kind,
key=key,
).delete()
print(f"Deleted agent resource: {agent_id} - {kind} - {key}")
# --- Control & Actions ---
async def get_agent_control(self, agent_id):