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.
Files changed (23) hide show
  1. {operator_agent-0.3.0/src/operator_agent.egg-info → operator_agent-0.4.0}/PKG-INFO +1 -1
  2. {operator_agent-0.3.0 → operator_agent-0.4.0}/pyproject.toml +1 -1
  3. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/providers/codex.py +3 -0
  4. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/providers/gemini.py +3 -0
  5. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/transports/telegram.py +28 -0
  6. {operator_agent-0.3.0 → operator_agent-0.4.0/src/operator_agent.egg-info}/PKG-INFO +1 -1
  7. {operator_agent-0.3.0 → operator_agent-0.4.0}/LICENSE +0 -0
  8. {operator_agent-0.3.0 → operator_agent-0.4.0}/README.md +0 -0
  9. {operator_agent-0.3.0 → operator_agent-0.4.0}/setup.cfg +0 -0
  10. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/__init__.py +0 -0
  11. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/cli.py +0 -0
  12. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/config.py +0 -0
  13. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/core.py +0 -0
  14. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/providers/__init__.py +0 -0
  15. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/providers/claude.py +0 -0
  16. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/system_prompt.md +0 -0
  17. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent/transports/__init__.py +0 -0
  18. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/SOURCES.txt +0 -0
  19. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/dependency_links.txt +0 -0
  20. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/entry_points.txt +0 -0
  21. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/requires.txt +0 -0
  22. {operator_agent-0.3.0 → operator_agent-0.4.0}/src/operator_agent.egg-info/top_level.txt +0 -0
  23. {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.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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "operator-agent"
3
- version = "0.3.0"
3
+ version = "0.4.0"
4
4
  description = "Personal AI agent that bridges Telegram to CLI agents (Claude, Codex, Gemini) running on your machine."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -111,5 +111,8 @@ class CodexProvider(BaseProvider):
111
111
 
112
112
  return events
113
113
 
114
+ def stdout_limit(self):
115
+ return 10 * 1024 * 1024
116
+
114
117
  def stderr_to_stdout(self):
115
118
  return True
@@ -49,6 +49,9 @@ def _format_status(event: dict) -> str | None:
49
49
  class GeminiProvider(BaseProvider):
50
50
  name = "gemini"
51
51
 
52
+ def stdout_limit(self):
53
+ return 10 * 1024 * 1024
54
+
52
55
  def build_command(self, prompt, model, session_id=None):
53
56
  cmd = [
54
57
  self.path,
@@ -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.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