yncli 1.0.6__tar.gz → 1.0.8__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.
- {yncli-1.0.6 → yncli-1.0.8}/PKG-INFO +1 -1
- {yncli-1.0.6 → yncli-1.0.8}/pyproject.toml +1 -1
- {yncli-1.0.6 → yncli-1.0.8}/setup.py +1 -1
- {yncli-1.0.6 → yncli-1.0.8}/yncli/client.py +4 -2
- {yncli-1.0.6 → yncli-1.0.8}/yncli/tui.py +30 -17
- yncli-1.0.8/yncli/version.py +1 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli.egg-info/PKG-INFO +1 -1
- yncli-1.0.6/yncli/version.py +0 -1
- {yncli-1.0.6 → yncli-1.0.8}/README.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/setup.cfg +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/__init__.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/agent.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/architect.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/code_review.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/debug_oracle.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/debugger.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/polyglot.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/refactor_master.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/security_auditor.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/system_architect.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/test_runner.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/built_in_skills/ultrabrain.md +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/clean_text.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/config.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/language_detector.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/main.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/skills_manager.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/system_prompt.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/tools/__init__.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/tools/file_tools.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/tools/polyglot_tools.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/tools/search_tools.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/tools/system_tools.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/update_checker.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/workspace_memory.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli/workspace_scanner.py +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli.egg-info/SOURCES.txt +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli.egg-info/dependency_links.txt +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli.egg-info/entry_points.txt +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli.egg-info/requires.txt +0 -0
- {yncli-1.0.6 → yncli-1.0.8}/yncli.egg-info/top_level.txt +0 -0
|
@@ -6,7 +6,7 @@ long_description = (this_directory / "README.md").read_text(encoding="utf-8") if
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="yncli",
|
|
9
|
-
version="1.0.
|
|
9
|
+
version="1.0.8",
|
|
10
10
|
description="Autonomous Polyglot AI Coding Agent & TUI",
|
|
11
11
|
long_description=long_description,
|
|
12
12
|
long_description_content_type="text/markdown",
|
|
@@ -21,7 +21,7 @@ class LLMClient:
|
|
|
21
21
|
"""
|
|
22
22
|
url = f"{self.base_url}/models"
|
|
23
23
|
try:
|
|
24
|
-
resp = requests.get(url, headers={"Authorization": f"Bearer {self.api_key}"}, timeout=
|
|
24
|
+
resp = requests.get(url, headers={"Authorization": f"Bearer {self.api_key}"}, timeout=15)
|
|
25
25
|
resp.raise_for_status()
|
|
26
26
|
data = resp.json()
|
|
27
27
|
return data.get("data", [])
|
|
@@ -41,6 +41,7 @@ class LLMClient:
|
|
|
41
41
|
"""
|
|
42
42
|
Streams chat completions from the OpenAI-compatible endpoint.
|
|
43
43
|
Guarantees strict UTF-8 stream decoding to prevent ISO-8859-1 mojibake.
|
|
44
|
+
Uses resilient timeout (connect=15s, read=180s) to support heavy code generation.
|
|
44
45
|
"""
|
|
45
46
|
url = f"{self.base_url}/chat/completions"
|
|
46
47
|
payload = {
|
|
@@ -55,7 +56,8 @@ class LLMClient:
|
|
|
55
56
|
payload["tools"] = tools
|
|
56
57
|
payload["tool_choice"] = "auto"
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
# Resilient timeout: (connect_timeout=15s, read_timeout=180s)
|
|
60
|
+
resp = requests.post(url, headers=self._get_headers(), json=payload, stream=True, timeout=(15, 180))
|
|
59
61
|
resp.encoding = "utf-8"
|
|
60
62
|
|
|
61
63
|
if resp.status_code != 200:
|
|
@@ -452,10 +452,17 @@ class TerminalUI:
|
|
|
452
452
|
def execute_turn(self, user_prompt: str) -> None:
|
|
453
453
|
content_chunks = []
|
|
454
454
|
is_thinking = False
|
|
455
|
+
step_history: List[str] = []
|
|
456
|
+
|
|
457
|
+
def _update_live_display(current_status: str) -> None:
|
|
458
|
+
# Maintain max 3 recent steps
|
|
459
|
+
display_lines = list(step_history[-2:]) + [f"[bold cyan]●[/bold cyan] {current_status}"]
|
|
460
|
+
banner_text = "\n".join(display_lines)
|
|
461
|
+
self._start_spinner(banner_text)
|
|
455
462
|
|
|
456
463
|
def on_status_update(status_text: str) -> None:
|
|
457
464
|
if not is_thinking:
|
|
458
|
-
|
|
465
|
+
_update_live_display(f"[bold #38bdf8][ - ][/bold #38bdf8] {status_text}")
|
|
459
466
|
|
|
460
467
|
def on_thinking(chunk: str) -> None:
|
|
461
468
|
nonlocal is_thinking
|
|
@@ -482,29 +489,35 @@ class TerminalUI:
|
|
|
482
489
|
is_thinking = False
|
|
483
490
|
|
|
484
491
|
target = args.get("file_path", args.get("path", args.get("command", args.get("query", ""))))
|
|
485
|
-
if len(str(target)) >
|
|
486
|
-
target = str(target)[:
|
|
492
|
+
if len(str(target)) > 40:
|
|
493
|
+
target = str(target)[:40] + "..."
|
|
487
494
|
|
|
488
|
-
|
|
489
|
-
"list_directory": "
|
|
490
|
-
"
|
|
491
|
-
"
|
|
492
|
-
"
|
|
493
|
-
"
|
|
494
|
-
"
|
|
495
|
-
"
|
|
496
|
-
"
|
|
497
|
-
"
|
|
495
|
+
tool_stage_map = {
|
|
496
|
+
"list_directory": f"Memeriksa struktur folder ({target})",
|
|
497
|
+
"find_files": f"Mencari file ({target})",
|
|
498
|
+
"grep_search": f"Mencari isi kode ({target})",
|
|
499
|
+
"read_file": f"Membaca file ({target})",
|
|
500
|
+
"write_file": f"Building & menulis file ({target})",
|
|
501
|
+
"edit_file_replace": f"Memperbarui kode ({target})",
|
|
502
|
+
"save_plan_document": f"Menyimpan rencana ({target})",
|
|
503
|
+
"run_terminal_command": f"Menjalankan perintah terminal ({target})",
|
|
504
|
+
"web_search": f"Riset web ({target})",
|
|
505
|
+
"fetch_webpage": f"Mengambil referensi web ({target})",
|
|
506
|
+
"change_directory": f"Berpindah direktori ({target})"
|
|
498
507
|
}
|
|
499
|
-
|
|
508
|
+
stage_desc = tool_stage_map.get(name, f"Eksekusi {name} ({target})")
|
|
500
509
|
|
|
501
|
-
#
|
|
502
|
-
|
|
510
|
+
# Add previous action as completed step (max 3 sliding window)
|
|
511
|
+
step_history.append(f"[dim green]✔[/dim green] [dim]{stage_desc}[/dim]")
|
|
512
|
+
if len(step_history) > 3:
|
|
513
|
+
step_history.pop(0)
|
|
514
|
+
|
|
515
|
+
_update_live_display(f"[bold #f59e0b][ - ][/bold #f59e0b] [bold white]{stage_desc}[/bold white]")
|
|
503
516
|
|
|
504
517
|
def on_tool_end(name: str, output: str) -> None:
|
|
505
518
|
pass
|
|
506
519
|
|
|
507
|
-
|
|
520
|
+
_update_live_display(f"[bold #38bdf8][ - ][/bold #38bdf8] Menganalisis instruksi ({self.agent.model})...")
|
|
508
521
|
try:
|
|
509
522
|
res = self.agent.run_turn(
|
|
510
523
|
user_prompt=user_prompt,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.8"
|
yncli-1.0.6/yncli/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0.6"
|
|
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
|
|
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
|
|
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
|