syntaxmatrix 2.3.5__py3-none-any.whl → 2.5.5.5__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.
- syntaxmatrix/agentic/__init__.py +0 -0
- syntaxmatrix/agentic/agent_tools.py +24 -0
- syntaxmatrix/agentic/agents.py +810 -0
- syntaxmatrix/agentic/code_tools_registry.py +37 -0
- syntaxmatrix/agentic/model_templates.py +1790 -0
- syntaxmatrix/commentary.py +134 -112
- syntaxmatrix/core.py +385 -245
- syntaxmatrix/dataset_preprocessing.py +218 -0
- syntaxmatrix/display.py +89 -37
- syntaxmatrix/gpt_models_latest.py +5 -4
- syntaxmatrix/profiles.py +19 -4
- syntaxmatrix/routes.py +947 -141
- syntaxmatrix/settings/model_map.py +38 -30
- syntaxmatrix/static/icons/hero_bg.jpg +0 -0
- syntaxmatrix/templates/dashboard.html +248 -54
- syntaxmatrix/utils.py +2254 -84
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.5.dist-info}/METADATA +16 -17
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.5.dist-info}/RECORD +21 -15
- syntaxmatrix/model_templates.py +0 -29
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.5.dist-info}/WHEEL +0 -0
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.5.dist-info}/licenses/LICENSE.txt +0 -0
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.5.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# syntaxmatrix/agent_tools.py
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from typing import Callable, Optional, Dict, Any, List, Literal
|
|
4
|
+
|
|
5
|
+
Phase = Literal["sanitize_early", "domain_patches", "syntax_fixes", "final_repair"]
|
|
6
|
+
|
|
7
|
+
@dataclass
|
|
8
|
+
class CodeTool:
|
|
9
|
+
name: str
|
|
10
|
+
phase: Phase
|
|
11
|
+
fn: Callable[[str, Dict[str, Any]], str]
|
|
12
|
+
when: Optional[Callable[[str, Dict[str, Any]], bool]] = None
|
|
13
|
+
priority: int = 100 # lower runs earlier within the phase
|
|
14
|
+
|
|
15
|
+
class ToolRunner:
|
|
16
|
+
def __init__(self, tools: List[CodeTool]):
|
|
17
|
+
# stable order: phase → priority → name
|
|
18
|
+
self.tools = sorted(tools, key=lambda t: (t.phase, t.priority, t.name))
|
|
19
|
+
|
|
20
|
+
def run(self, code: str, ctx: Dict[str, Any]) -> str:
|
|
21
|
+
for t in self.tools:
|
|
22
|
+
if t.when is None or t.when(code, ctx):
|
|
23
|
+
code = t.fn(code, ctx)
|
|
24
|
+
return code
|