Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Commit 30d4015

Browse files
committed
🔨 build: installation cmd
1 parent 2fb3b55 commit 30d4015

11 files changed

Lines changed: 339 additions & 39 deletions

‎.dmcodeignore‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Compiled Python files.
2+
*.pyc
3+
*.pyo
4+
*.pyd
5+
6+
# Python cache directories.
7+
__pycache__
8+
9+
# Virtual environments.
10+
venv
11+
.venv
12+
env
13+
.env
14+
15+
# Build and distribution directories.
16+
build
17+
dist
18+
*.egg-info
19+
20+
# IDE and editor directories.
21+
.idea
22+
.vscode
23+
*.swp
24+
*.swo
25+
26+
# Claude Code local configurations.
27+
.claude
28+
29+
# Astro framework.
30+
.astro
31+
32+
# Node.JS/npm directories.
33+
node_modules
34+
35+
# Git directory.
36+
.git
37+
38+
# Test and coverage.
39+
.pytest_cache
40+
.coverage
41+
htmlcov
42+
.tox
43+
44+
# OS generated files.
45+
.DS_Store
46+
Thumbs.db

‎dymo-code.spec‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ hiddenimports = [
9797
'src.context_manager',
9898
'src.utils',
9999
'src.utils.basics',
100+
'src.ignore_patterns',
100101
# Cloudscraper bypass modules
101102
'src.utils.bypasses',
102103
'src.utils.bypasses.cloudscraper',

‎requirements-dev.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ pyinstaller>=6.0.0
77
# Optional: for code quality
88
# ruff>=0.1.0
99
# black>=23.0.0
10-
# mypy>=1.0.0
10+
# mypy>=1.0.0

‎requirements.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ rich>=13.0.0
77
prompt_toolkit>=3.0.0
88
questionary>=2.0.0
99
certifi>=2023.0.0
10-
requests>=2.31.0
10+
requests>=2.32.5
1111
requests-toolbelt>=1.0.0
12-
brotli>=1.1.0
12+
brotli>=1.1.0

‎src/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@
4444
"get_db_path",
4545
"get_history_directory",
4646
"get_logs_directory",
47-
"ensure_directories",
47+
"ensure_directories"
4848
]

‎src/agents.py‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ def create_task(
231231
with self.lock:
232232
self.tasks[task_id] = task
233233

234-
if parent_task_id and parent_task_id in self.tasks:
235-
self.tasks[parent_task_id].subtasks.append(task_id)
234+
if parent_task_id and parent_task_id in self.tasks: self.tasks[parent_task_id].subtasks.append(task_id)
236235

237236
return task
238237

@@ -266,18 +265,17 @@ def execute_and_cleanup():
266265

267266
if run_async:
268267
future = self.executor.submit(execute_and_cleanup)
269-
with self.lock:
268+
with self.lock:
270269
self.task_futures[task.id] = future
271270
return task.id
272271
else: return execute_and_cleanup()
273272

274273
def _handle_progress(self, task: AgentTask):
275274
"""Handle task progress updates"""
276-
with self.lock:
275+
with self.lock:
277276
self.tasks[task.id] = task
278277

279-
if self.on_task_update:
280-
self.on_task_update(task)
278+
if self.on_task_update: self.on_task_update(task)
281279

282280
def get_task(self, task_id: str) -> Optional[AgentTask]:
283281
"""Get a task by ID"""
@@ -313,9 +311,8 @@ def cancel_task(self, task_id: str) -> bool:
313311
worker.cancel()
314312
break
315313

316-
# Cancel future if exists
317-
if task_id in self.task_futures:
318-
self.task_futures[task_id].cancel()
314+
# Cancel future if exists.
315+
if task_id in self.task_futures: self.task_futures[task_id].cancel()
319316

320317
return True
321318
return False
@@ -324,8 +321,7 @@ def cancel_all_tasks(self):
324321
"""Cancel all running and queued tasks"""
325322
with self.lock:
326323
for task in self.tasks.values():
327-
if task.status in [AgentStatus.QUEUED, AgentStatus.RUNNING]:
328-
task.status = AgentStatus.CANCELLED
324+
if task.status in [AgentStatus.QUEUED, AgentStatus.RUNNING]: task.status = AgentStatus.CANCELLED
329325

330326
for worker in self.workers.values():
331327
worker.cancel()
@@ -339,10 +335,8 @@ def wait_for_task(self, task_id: str, timeout: float = None) -> Optional[AgentTa
339335
future = self.task_futures.get(task_id)
340336

341337
if future:
342-
try:
343-
future.result(timeout=timeout)
344-
except Exception:
345-
pass
338+
try: future.result(timeout=timeout)
339+
except Exception: pass
346340

347341
return self.get_task(task_id)
348342

‎src/api_key_manager.py‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
from .logger import log_debug, log_error
1717

18-
1918
class KeyStatus(Enum):
2019
"""Status of an API key"""
2120
ACTIVE = "active"
@@ -30,13 +29,11 @@ class RotationStrategy(Enum):
3029
SEQUENTIAL = "sequential" # Use one key until limit, then switch
3130
LOAD_BALANCER = "load_balancer" # Distribute requests across all keys
3231

33-
3432
# Callbacks for notifications
3533
_on_key_rotated: Optional[Callable[[str, str, str], None]] = None # provider, old_key, new_key
3634
_on_model_fallback: Optional[Callable[[str, str, str], None]] = None # provider, old_model, new_model
3735
_on_provider_exhausted: Optional[Callable[[str], None]] = None # provider
3836

39-
4037
def set_rotation_callbacks(
4138
on_key_rotated: Optional[Callable] = None,
4239
on_model_fallback: Optional[Callable] = None,
@@ -48,7 +45,6 @@ def set_rotation_callbacks(
4845
_on_model_fallback = on_model_fallback
4946
_on_provider_exhausted = on_provider_exhausted
5047

51-
5248
@dataclass
5349
class APIKeyInfo:
5450
"""Information about an API key"""
@@ -75,12 +71,9 @@ def display_name(self) -> str:
7571

7672
def is_available(self) -> bool:
7773
"""Check if key is currently available for use"""
78-
if self.status == KeyStatus.INVALID:
79-
return False
80-
if self.status == KeyStatus.EXHAUSTED:
81-
return False
82-
if self.cooldown_until and datetime.now() < self.cooldown_until:
83-
return False
74+
if self.status == KeyStatus.INVALID: return False
75+
if self.status == KeyStatus.EXHAUSTED: return False
76+
if self.cooldown_until and datetime.now() < self.cooldown_until: return False
8477
return True
8578

8679

0 commit comments

Comments
 (0)