Complete snapshot of /opt/microdao-daarion/ from NODE1 (144.76.224.179).
This represents the actual running production code that has diverged
significantly from the previous main branch.
Key changes from old main:
- Gateway (http_api.py): expanded from ~40KB to 164KB with full agent support
- Router: new /v1/agents/{id}/infer endpoint with vision + DeepSeek routing
- Behavior Policy: SOWA v2.2 (3-level: FULL/ACK/SILENT)
- Agent Registry: config/agent_registry.yml as single source of truth
- 13 agents configured (was 3)
- Memory service integration
- CrewAI teams and roles
Excluded from snapshot: venv/, .env, data/, backups, .tgz archives
Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
846 B
Python
24 lines
846 B
Python
import sys
|
||
from pathlib import Path
|
||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'packages' / 'agromatrix-tools'))
|
||
|
||
from agromatrix_tools import tool_dictionary
|
||
from agromatrix_tools.normalize import parse_quantity, parse_rate, convert
|
||
|
||
text = "Поле №1, посів, пшениця озима, 2.5 т насіння, 150 кг/га карбамід"
|
||
|
||
res = tool_dictionary.normalize_from_text(text, trace_id='trace-demo', source='telegram')
|
||
print(res)
|
||
|
||
value, unit = parse_quantity('2.5 т')
|
||
print('2.5 t -> kg:', convert(value, 't', 'kg', [
|
||
{'id': 't', 'to_base': {'base': 'kg', 'factor': 1000}},
|
||
{'id': 'kg'}
|
||
]))
|
||
|
||
value2, unit2 = parse_rate('150 кг/га')
|
||
print('rate:', value2, unit2)
|
||
|
||
unknown = tool_dictionary.normalize_field('Поле 999', trace_id='trace-demo', source='telegram')
|
||
print('unknown:', unknown)
|