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.
- overcode/__init__.py +5 -0
- overcode/cli.py +812 -0
- overcode/config.py +72 -0
- overcode/daemon.py +1184 -0
- overcode/daemon_claude_skill.md +180 -0
- overcode/daemon_state.py +113 -0
- overcode/data_export.py +257 -0
- overcode/dependency_check.py +227 -0
- overcode/exceptions.py +219 -0
- overcode/history_reader.py +448 -0
- overcode/implementations.py +214 -0
- overcode/interfaces.py +49 -0
- overcode/launcher.py +434 -0
- overcode/logging_config.py +193 -0
- overcode/mocks.py +152 -0
- overcode/monitor_daemon.py +808 -0
- overcode/monitor_daemon_state.py +358 -0
- overcode/pid_utils.py +225 -0
- overcode/presence_logger.py +454 -0
- overcode/protocols.py +143 -0
- overcode/session_manager.py +606 -0
- overcode/settings.py +412 -0
- overcode/standing_instructions.py +276 -0
- overcode/status_constants.py +190 -0
- overcode/status_detector.py +339 -0
- overcode/status_history.py +164 -0
- overcode/status_patterns.py +264 -0
- overcode/summarizer_client.py +136 -0
- overcode/summarizer_component.py +312 -0
- overcode/supervisor_daemon.py +1000 -0
- overcode/supervisor_layout.sh +50 -0
- overcode/tmux_manager.py +228 -0
- overcode/tui.py +2549 -0
- overcode/tui_helpers.py +495 -0
- overcode/web_api.py +279 -0
- overcode/web_server.py +138 -0
- overcode/web_templates.py +563 -0
- overcode-0.1.0.dist-info/METADATA +87 -0
- overcode-0.1.0.dist-info/RECORD +43 -0
- overcode-0.1.0.dist-info/WHEEL +5 -0
- overcode-0.1.0.dist-info/entry_points.txt +2 -0
- overcode-0.1.0.dist-info/licenses/LICENSE +21 -0
- 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
|
+
}
|