diff --git a/apps/nexus-dashboard/app/main.py b/apps/nexus-dashboard/app/main.py index 4793b6e6..fbb32ae8 100644 --- a/apps/nexus-dashboard/app/main.py +++ b/apps/nexus-dashboard/app/main.py @@ -37,8 +37,11 @@ async def lifespan(app: FastAPI): # Static & Templates BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -app.mount("/static", StaticFiles(directory=os.path.join(BASE_DIR, "static")), name="static") -templates = Jinja2Templates(directory=os.path.join(BASE_DIR, "templates")) +ROOT_DIR = os.path.dirname(BASE_DIR) +app.mount( + "/static", StaticFiles(directory=os.path.join(ROOT_DIR, "static")), name="static" +) +templates = Jinja2Templates(directory=os.path.join(ROOT_DIR, "templates")) # Include Routes app.include_router(router) @@ -52,4 +55,6 @@ async def read_root(request: Request): if __name__ == "__main__": - uvicorn.run("app.main:app", host="0.0.0.0", port=8005, reload=True) + uvicorn.run( + "app.main:app", host=os.getenv("HOST", "127.0.0.1"), port=8005, reload=True + ) diff --git a/apps/nexus-dashboard/run.sh b/apps/nexus-dashboard/run.sh index f3e0ecb3..085c82e8 100755 --- a/apps/nexus-dashboard/run.sh +++ b/apps/nexus-dashboard/run.sh @@ -2,4 +2,4 @@ cd apps/nexus-dashboard export PYTHONPATH=$PYTHONPATH:$(pwd) -uvicorn app.main:app --host 0.0.0.0 --port 8005 --reload +uvicorn app.main:app --host ${HOST:-127.0.0.1} --port 8005 --reload diff --git a/packages/vertice-core/src/vertice_core/adk/tools.py b/packages/vertice-core/src/vertice_core/adk/tools.py index 2b5b397d..da0a904d 100644 --- a/packages/vertice-core/src/vertice_core/adk/tools.py +++ b/packages/vertice-core/src/vertice_core/adk/tools.py @@ -36,11 +36,11 @@ def get_schemas(self) -> List[Dict[str, Any]]: # Basic type mapping ptype = "string" - if param.annotation == int: + if param.annotation is int: ptype = "integer" - elif param.annotation == bool: + elif param.annotation is bool: ptype = "boolean" - elif param.annotation == float: + elif param.annotation is float: ptype = "number" properties[param_name] = { diff --git a/packages/vertice-core/src/vertice_core/agents/planner/coordination.py b/packages/vertice-core/src/vertice_core/agents/planner/coordination.py index d77b5dd5..e6ec6f21 100644 --- a/packages/vertice-core/src/vertice_core/agents/planner/coordination.py +++ b/packages/vertice-core/src/vertice_core/agents/planner/coordination.py @@ -20,7 +20,7 @@ import logging from dataclasses import dataclass, field -from typing import Any, Dict, List, Optional, Set, Tuple +from typing import Any, Dict, List, Optional, Set from enum import Enum logger = logging.getLogger(__name__) @@ -242,7 +242,6 @@ def _detect_agent_type(self, description: str) -> str: "devops": ["deploy", "ci/cd", "pipeline", "infrastructure", "monitor", "docker", "kubernetes"], "architect": ["design", "architecture", "system design", "scalability", "integration"], "reviewer": ["code review", "pr review", "audit", "assessment"], - "tester": ["test", "qa", "validate", "verify"], # Depois dos mais específicos } for agent, keywords in keyword_map.items(): diff --git a/packages/vertice-core/src/vertice_core/agents/planner/llm_router.py b/packages/vertice-core/src/vertice_core/agents/planner/llm_router.py index ebd01759..6795fa55 100644 --- a/packages/vertice-core/src/vertice_core/agents/planner/llm_router.py +++ b/packages/vertice-core/src/vertice_core/agents/planner/llm_router.py @@ -19,7 +19,6 @@ from ...providers.smart_router_v2 import ( SmartRouterV2, TaskType, - ProviderType, ) logger = logging.getLogger(__name__) diff --git a/packages/vertice-core/src/vertice_core/autonomy/uncertainty.py b/packages/vertice-core/src/vertice_core/autonomy/uncertainty.py index 7fd642c2..b08faeee 100644 --- a/packages/vertice-core/src/vertice_core/autonomy/uncertainty.py +++ b/packages/vertice-core/src/vertice_core/autonomy/uncertainty.py @@ -254,7 +254,7 @@ def _estimate_from_logits( # Convert to probabilities with softmax max_logit = max(logits) - exp_logits = [math.exp(l - max_logit) for l in logits] + exp_logits = [math.exp(logit - max_logit) for logit in logits] sum_exp = sum(exp_logits) probs = [e / sum_exp for e in exp_logits] diff --git a/packages/vertice-core/src/vertice_core/code/validator.py b/packages/vertice-core/src/vertice_core/code/validator.py index 9d1ae3f6..f6fa2e5e 100644 --- a/packages/vertice-core/src/vertice_core/code/validator.py +++ b/packages/vertice-core/src/vertice_core/code/validator.py @@ -12,4 +12,4 @@ stacklevel=2, ) -from .validator import * +# from .validator import * diff --git a/packages/vertice-core/src/vertice_core/tui/widgets/export_modal.py b/packages/vertice-core/src/vertice_core/tui/widgets/export_modal.py index 747462f9..dd253b1d 100644 --- a/packages/vertice-core/src/vertice_core/tui/widgets/export_modal.py +++ b/packages/vertice-core/src/vertice_core/tui/widgets/export_modal.py @@ -7,6 +7,7 @@ from __future__ import annotations +from typing import List, Optional from textual.app import ComposeResult from textual.containers import Vertical, Horizontal from textual.widgets import Button, Static, RadioSet, RadioButton, Input diff --git a/packages/vertice-core/src/vertice_core/tui/widgets/image_preview.py b/packages/vertice-core/src/vertice_core/tui/widgets/image_preview.py index f2d8b812..975303c6 100644 --- a/packages/vertice-core/src/vertice_core/tui/widgets/image_preview.py +++ b/packages/vertice-core/src/vertice_core/tui/widgets/image_preview.py @@ -189,8 +189,6 @@ def check_image_support() -> dict: if TEXTUAL_IMAGE_AVAILABLE: try: - from textual_image import renderable - # Check available protocols result["protocols"] = ["unicode"] # Always available # TGP and Sixel detection would need terminal query diff --git a/packages/vertice-core/src/vertice_core/tui/wisdom.py b/packages/vertice-core/src/vertice_core/tui/wisdom.py index 3848bb3e..43127bd6 100644 --- a/packages/vertice-core/src/vertice_core/tui/wisdom.py +++ b/packages/vertice-core/src/vertice_core/tui/wisdom.py @@ -387,7 +387,3 @@ def validate_wisdom_system(): def get_all_categories(self) -> list[str]: """Get all available wisdom categories.""" return list(self.verses.keys()) - - def get_all_categories(self) -> list[str]: - """Get all wisdom categories.""" - return list(self.verses.keys()) diff --git a/packages/vertice-core/src/vertice_core/utils/prompts.py b/packages/vertice-core/src/vertice_core/utils/prompts.py index 02dce563..006d3270 100644 --- a/packages/vertice-core/src/vertice_core/utils/prompts.py +++ b/packages/vertice-core/src/vertice_core/utils/prompts.py @@ -12,4 +12,4 @@ stacklevel=2, ) -from .prompts import * +# from .prompts import * diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..60d97ebb --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,2 @@ +ruff +radon diff --git a/scripts/debug_dispatcher_final.py b/scripts/debug_dispatcher_final.py index aebf295e..2a22b55f 100644 --- a/scripts/debug_dispatcher_final.py +++ b/scripts/debug_dispatcher_final.py @@ -32,7 +32,7 @@ async def probe(): try: repo_root = get_repo_root() print(f"DEBUG: Dispatcher thought repo_root is: {repo_root}") - except: + except Exception: print("DEBUG: Dispatcher failed to get repo_root via utils.") log_dir = repo_root / "logs" / "notifications" diff --git a/scripts/testing/test_nexus_quality.py b/scripts/testing/test_nexus_quality.py index e877916a..80f8ddd1 100644 --- a/scripts/testing/test_nexus_quality.py +++ b/scripts/testing/test_nexus_quality.py @@ -46,25 +46,23 @@ def section(self, title): print(f"{self.CYAN} {'=' * len(title)}{self.RESET}") def progress(self): - percent = float(self.current) / self.total - arrow = "█" * int(round(percent * self.bar_length)) - spaces = "░" * (self.bar_length - len(arrow)) - - c = self.GREEN if percent > 0.8 else (self.YELLOW if percent > 0.4 else self.RED) - + pass + # percent = float(self.current) / self.total + # arrow = "█" * int(round(percent * self.bar_length)) + # spaces = "░" * (self.bar_length - len(arrow)) + # c = self.GREEN if percent > 0.8 else (self.YELLOW if percent > 0.4 else self.RED) # \r to overwrite line? In a stream, \r might not work well if appended. # We'll print distinct lines for maximum compatibility with simple streams. # actually, standard streaming response supports \r if terminal simulates it. # But let's just print a nice bar on update. # print(f"\r[{c}{arrow}{spaces}{self.RESET}] {int(percent*100)}%", end="", flush=True) - pass def info(self, msg): # Drop-in replacement for logger.info if "🧪" in msg: self.current += 1 # Extract test name - test_name = msg.split("]", 1)[-1].strip() if "]" in msg else msg + # test_name = msg.split("]", 1)[-1].strip() if "]" in msg else msg # Progress calculation percent = min(1.0, float(self.current) / self.total)