operator-agent 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {operator_agent-0.3.0/src/operator_agent.egg-info → operator_agent-0.4.0}/PKG-INFO +1 -1
- {operator_agent-0.3.0 → operator_agent-0.4.0}/pyproject.toml +1 -1
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/providers/codex.py +3 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/providers/gemini.py +3 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/transports/telegram.py +28 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0/src/operator_agent.egg-info}/PKG-INFO +1 -1
- {operator_agent-0.3.0 → operator_agent-0.4.0}/LICENSE +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/README.md +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/setup.cfg +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/__init__.py +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/cli.py +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/config.py +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/core.py +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/providers/__init__.py +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/providers/claude.py +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/system_prompt.md +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/transports/__init__.py +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/SOURCES.txt +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/dependency_links.txt +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/entry_points.txt +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/requires.txt +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/top_level.txt +0 -0
- {operator_agent-0.3.0 → operator_agent-0.4.0}/tests/test_integration.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: operator-agent
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Personal AI agent that bridges Telegram to CLI agents (Claude, Codex, Gemini) running on your machine.
|
|
5
5
|
Author-email: Gavin Vickery <gavin@geekforbrains.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -150,6 +150,7 @@ class TelegramTransport:
|
|
|
150
150
|
"!clear - Clear current provider session\n"
|
|
151
151
|
"!clear all - Clear all provider sessions\n"
|
|
152
152
|
"!restart - Restart the bot\n"
|
|
153
|
+
"!logs - Show last 25 log entries\n"
|
|
153
154
|
"!help - Show this message"
|
|
154
155
|
)
|
|
155
156
|
return
|
|
@@ -159,6 +160,10 @@ class TelegramTransport:
|
|
|
159
160
|
asyncio.get_event_loop().call_later(1, _restart)
|
|
160
161
|
return
|
|
161
162
|
|
|
163
|
+
if text == "!logs":
|
|
164
|
+
await self._handle_logs(update)
|
|
165
|
+
return
|
|
166
|
+
|
|
162
167
|
if text.startswith("!"):
|
|
163
168
|
await update.message.reply_text("Unknown command. Try !help")
|
|
164
169
|
return
|
|
@@ -414,3 +419,26 @@ class TelegramTransport:
|
|
|
414
419
|
rt.save_state()
|
|
415
420
|
msg = "Cleared all providers!" if clear_all else "Cleared current provider!"
|
|
416
421
|
await update.message.reply_text(f"{msg}\n" + "\n".join(parts))
|
|
422
|
+
|
|
423
|
+
async def _handle_logs(self, update: Update):
|
|
424
|
+
log_path = os.path.join(os.path.expanduser("~/.operator"), "operator.log")
|
|
425
|
+
if not os.path.exists(log_path):
|
|
426
|
+
await update.message.reply_text("No log file found.")
|
|
427
|
+
return
|
|
428
|
+
|
|
429
|
+
try:
|
|
430
|
+
with open(log_path, "rb") as f:
|
|
431
|
+
# Read last ~32KB to find the last 25 lines
|
|
432
|
+
f.seek(0, 2)
|
|
433
|
+
size = f.tell()
|
|
434
|
+
f.seek(max(0, size - 32768))
|
|
435
|
+
tail = f.read().decode(errors="replace")
|
|
436
|
+
|
|
437
|
+
lines = tail.splitlines()[-25:]
|
|
438
|
+
text = "\n".join(lines) if lines else "(empty)"
|
|
439
|
+
# Telegram message limit is 4096 chars
|
|
440
|
+
if len(text) > 4000:
|
|
441
|
+
text = text[-4000:]
|
|
442
|
+
await update.message.reply_text(text)
|
|
443
|
+
except Exception as exc:
|
|
444
|
+
await update.message.reply_text(f"Error reading logs: {exc}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: operator-agent
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Personal AI agent that bridges Telegram to CLI agents (Claude, Codex, Gemini) running on your machine.
|
|
5
5
|
Author-email: Gavin Vickery <gavin@geekforbrains.com>
|
|
6
6
|
License-Expression: MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|