overcode 0.1.0__py3-none-any.whl

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 (43) hide show
  1. overcode/__init__.py +5 -0
  2. overcode/cli.py +812 -0
  3. overcode/config.py +72 -0
  4. overcode/daemon.py +1184 -0
  5. overcode/daemon_claude_skill.md +180 -0
  6. overcode/daemon_state.py +113 -0
  7. overcode/data_export.py +257 -0
  8. overcode/dependency_check.py +227 -0
  9. overcode/exceptions.py +219 -0
  10. overcode/history_reader.py +448 -0
  11. overcode/implementations.py +214 -0
  12. overcode/interfaces.py +49 -0
  13. overcode/launcher.py +434 -0
  14. overcode/logging_config.py +193 -0
  15. overcode/mocks.py +152 -0
  16. overcode/monitor_daemon.py +808 -0
  17. overcode/monitor_daemon_state.py +358 -0
  18. overcode/pid_utils.py +225 -0
  19. overcode/presence_logger.py +454 -0
  20. overcode/protocols.py +143 -0
  21. overcode/session_manager.py +606 -0
  22. overcode/settings.py +412 -0
  23. overcode/standing_instructions.py +276 -0
  24. overcode/status_constants.py +190 -0
  25. overcode/status_detector.py +339 -0
  26. overcode/status_history.py +164 -0
  27. overcode/status_patterns.py +264 -0
  28. overcode/summarizer_client.py +136 -0
  29. overcode/summarizer_component.py +312 -0
  30. overcode/supervisor_daemon.py +1000 -0
  31. overcode/supervisor_layout.sh +50 -0
  32. overcode/tmux_manager.py +228 -0
  33. overcode/tui.py +2549 -0
  34. overcode/tui_helpers.py +495 -0
  35. overcode/web_api.py +279 -0
  36. overcode/web_server.py +138 -0
  37. overcode/web_templates.py +563 -0
  38. overcode-0.1.0.dist-info/METADATA +87 -0
  39. overcode-0.1.0.dist-info/RECORD +43 -0
  40. overcode-0.1.0.dist-info/WHEEL +5 -0
  41. overcode-0.1.0.dist-info/entry_points.txt +2 -0
  42. overcode-0.1.0.dist-info/licenses/LICENSE +21 -0
  43. overcode-0.1.0.dist-info/top_level.txt +1 -0
overcode/config.py ADDED
@@ -0,0 +1,72 @@
1
+ """
2
+ Configuration loading for overcode.
3
+
4
+ Config file location: ~/.overcode/config.yaml
5
+
6
+ Example config:
7
+ default_standing_instructions: "Approve file read/write permission requests"
8
+ tmux_session: "agents"
9
+ """
10
+
11
+ from pathlib import Path
12
+ from typing import Optional
13
+ import yaml
14
+
15
+
16
+ CONFIG_PATH = Path.home() / ".overcode" / "config.yaml"
17
+
18
+
19
+ def load_config() -> dict:
20
+ """Load configuration from ~/.overcode/config.yaml.
21
+
22
+ Returns empty dict if file doesn't exist or is invalid.
23
+ """
24
+ if not CONFIG_PATH.exists():
25
+ return {}
26
+
27
+ try:
28
+ with open(CONFIG_PATH) as f:
29
+ config = yaml.safe_load(f)
30
+ return config if isinstance(config, dict) else {}
31
+ except (yaml.YAMLError, IOError):
32
+ return {}
33
+
34
+
35
+ def get_default_standing_instructions() -> str:
36
+ """Get default standing instructions from config.
37
+
38
+ Returns empty string if not configured.
39
+ """
40
+ config = load_config()
41
+ return config.get("default_standing_instructions", "")
42
+
43
+
44
+ def get_relay_config() -> Optional[dict]:
45
+ """Get relay configuration for pushing state to cloud.
46
+
47
+ Returns None if relay is not configured or disabled.
48
+
49
+ Config format in ~/.overcode/config.yaml:
50
+ relay:
51
+ enabled: true
52
+ url: https://your-worker.workers.dev/update
53
+ api_key: your-secret-key
54
+ interval: 30 # seconds between pushes (optional, default 30)
55
+ """
56
+ config = load_config()
57
+ relay = config.get("relay", {})
58
+
59
+ if not relay.get("enabled", False):
60
+ return None
61
+
62
+ url = relay.get("url")
63
+ api_key = relay.get("api_key")
64
+
65
+ if not url or not api_key:
66
+ return None
67
+
68
+ return {
69
+ "url": url,
70
+ "api_key": api_key,
71
+ "interval": relay.get("interval", 30),
72
+ }