cite-agent 1.2.11__py3-none-any.whl → 1.2.13__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.
Potentially problematic release.
This version of cite-agent might be problematic. Click here for more details.
- cite_agent/__version__.py +1 -1
- cite_agent/enhanced_ai_agent.py +50 -28
- {cite_agent-1.2.11.dist-info → cite_agent-1.2.13.dist-info}/METADATA +1 -1
- {cite_agent-1.2.11.dist-info → cite_agent-1.2.13.dist-info}/RECORD +8 -8
- {cite_agent-1.2.11.dist-info → cite_agent-1.2.13.dist-info}/WHEEL +0 -0
- {cite_agent-1.2.11.dist-info → cite_agent-1.2.13.dist-info}/entry_points.txt +0 -0
- {cite_agent-1.2.11.dist-info → cite_agent-1.2.13.dist-info}/licenses/LICENSE +0 -0
- {cite_agent-1.2.11.dist-info → cite_agent-1.2.13.dist-info}/top_level.txt +0 -0
cite_agent/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.2.
|
|
1
|
+
__version__ = "1.2.13"
|
cite_agent/enhanced_ai_agent.py
CHANGED
|
@@ -2768,17 +2768,42 @@ class EnhancedNocturnalAgent:
|
|
|
2768
2768
|
|
|
2769
2769
|
# Generic search if no pronoun or pronoun not resolved
|
|
2770
2770
|
if not pronoun_resolved:
|
|
2771
|
-
#
|
|
2772
|
-
|
|
2773
|
-
'looking', 'find', 'folder', 'directory', 'called', 'something',
|
|
2774
|
-
'forgot', 'name', 'think', 'can', 'you', 'look', 'for', 'somewhere',
|
|
2775
|
-
'computer', 'downloads', 'the', 'this', 'that', 'class', 'investment',
|
|
2776
|
-
'check', 'what', 'into'
|
|
2777
|
-
}
|
|
2771
|
+
# SMART EXTRACTION: Use pattern matching + common sense
|
|
2772
|
+
import re
|
|
2778
2773
|
|
|
2779
|
-
#
|
|
2780
|
-
|
|
2781
|
-
|
|
2774
|
+
# Strategy: Look for quoted strings or alphanumeric codes
|
|
2775
|
+
# Priority 1: Quoted strings ("cm522", 'my_folder')
|
|
2776
|
+
quoted = re.findall(r'["\']([^"\']+)["\']', request.question)
|
|
2777
|
+
|
|
2778
|
+
if quoted:
|
|
2779
|
+
search_terms = quoted
|
|
2780
|
+
else:
|
|
2781
|
+
# Priority 2: Alphanumeric codes/IDs (cm522, hw03, proj_2024)
|
|
2782
|
+
# Pattern: letters + numbers mixed, or underscores/dashes
|
|
2783
|
+
codes = re.findall(r'\b([a-zA-Z]*\d+[a-zA-Z0-9_-]*|[a-zA-Z0-9]*[_-]+[a-zA-Z0-9]+)\b', request.question)
|
|
2784
|
+
|
|
2785
|
+
# Priority 3: Capitalize words (likely proper nouns: GitHub, MyProject)
|
|
2786
|
+
capitalized = re.findall(r'\b([A-Z][a-zA-Z0-9_-]+)\b', request.question)
|
|
2787
|
+
|
|
2788
|
+
# Priority 4: Long words (≥ 6 chars, likely meaningful)
|
|
2789
|
+
long_words = re.findall(r'\b([a-zA-Z]{6,})\b', request.question)
|
|
2790
|
+
|
|
2791
|
+
# Combine and dedupe
|
|
2792
|
+
search_terms = list(dict.fromkeys(codes + capitalized + long_words))
|
|
2793
|
+
|
|
2794
|
+
# Filter out common words
|
|
2795
|
+
common = {
|
|
2796
|
+
'looking', 'folder', 'directory', 'called', 'something',
|
|
2797
|
+
'downloads', 'documents', 'computer', 'somewhere'
|
|
2798
|
+
}
|
|
2799
|
+
search_terms = [t for t in search_terms if t.lower() not in common][:2]
|
|
2800
|
+
|
|
2801
|
+
debug_mode = os.getenv("NOCTURNAL_DEBUG", "").lower() == "1"
|
|
2802
|
+
if debug_mode:
|
|
2803
|
+
print(f"🔍 EXTRACTED SEARCH TERMS: {search_terms}")
|
|
2804
|
+
|
|
2805
|
+
if not search_terms:
|
|
2806
|
+
search_terms = [''] # Empty search to show "no target found"
|
|
2782
2807
|
|
|
2783
2808
|
# Detect location hints
|
|
2784
2809
|
search_path = "~" # Default to home
|
|
@@ -2788,30 +2813,27 @@ class EnhancedNocturnalAgent:
|
|
|
2788
2813
|
search_path = "~/Documents"
|
|
2789
2814
|
|
|
2790
2815
|
search_results = []
|
|
2791
|
-
searched_terms = []
|
|
2792
2816
|
|
|
2793
|
-
for name in
|
|
2794
|
-
if name
|
|
2817
|
+
for name in search_terms:
|
|
2818
|
+
if not name:
|
|
2795
2819
|
continue
|
|
2796
|
-
|
|
2820
|
+
|
|
2821
|
+
# Search with increasing depth
|
|
2822
|
+
find_cmd = f"find {search_path} -maxdepth 4 -type d -iname '*{name}*' 2>/dev/null | head -20"
|
|
2823
|
+
find_output = self.execute_command(find_cmd)
|
|
2797
2824
|
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
print(f"🔍 FIND EXECUTED: {find_cmd}")
|
|
2806
|
-
print(f"🔍 FIND OUTPUT: {repr(find_output)}")
|
|
2807
|
-
|
|
2808
|
-
if find_output.strip():
|
|
2809
|
-
search_results.append(f"Searched for '*{name}*' in {search_path}:\n{find_output}")
|
|
2825
|
+
debug_mode = os.getenv("NOCTURNAL_DEBUG", "").lower() == "1"
|
|
2826
|
+
if debug_mode:
|
|
2827
|
+
print(f"🔍 FIND EXECUTED: {find_cmd}")
|
|
2828
|
+
print(f"🔍 FIND OUTPUT: {repr(find_output)}")
|
|
2829
|
+
|
|
2830
|
+
if find_output.strip():
|
|
2831
|
+
search_results.append(f"Searched for '*{name}*' in {search_path}:\n{find_output}")
|
|
2810
2832
|
|
|
2811
2833
|
if search_results:
|
|
2812
2834
|
api_results["shell_info"]["search_results"] = "\n\n".join(search_results)
|
|
2813
|
-
|
|
2814
|
-
api_results["shell_info"]["search_results"] = f"No directories matching
|
|
2835
|
+
else:
|
|
2836
|
+
api_results["shell_info"]["search_results"] = f"No directories found matching query in {search_path}"
|
|
2815
2837
|
|
|
2816
2838
|
tools_used.append("shell_execution")
|
|
2817
2839
|
except Exception as e:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cite_agent/__init__.py,sha256=wAXV2v8nNOmIAd0rh8196ItBl9hHWBVOBl5Re4VB77I,1645
|
|
2
2
|
cite_agent/__main__.py,sha256=6x3lltwG-iZHeQbN12rwvdkPDfd2Rmdk71tOOaC89Mw,179
|
|
3
|
-
cite_agent/__version__.py,sha256=
|
|
3
|
+
cite_agent/__version__.py,sha256=rQSlPcfj4yT4krIq6epTVQyBzIX4etVOgfupVkM-RnU,23
|
|
4
4
|
cite_agent/account_client.py,sha256=yLuzhIJoIZuXHXGbaVMzDxRATQwcy-wiaLnUrDuwUhI,5725
|
|
5
5
|
cite_agent/agent_backend_only.py,sha256=H4DH4hmKhT0T3rQLAb2xnnJVjxl3pOZaljL9r6JndFY,6314
|
|
6
6
|
cite_agent/ascii_plotting.py,sha256=lk8BaECs6fmjtp4iH12G09-frlRehAN7HLhHt2crers,8570
|
|
@@ -11,7 +11,7 @@ cite_agent/cli_conversational.py,sha256=RAmgRNRyB8gQ8QLvWU-Tt23j2lmA34rQNT5F3_7S
|
|
|
11
11
|
cite_agent/cli_enhanced.py,sha256=EAaSw9qtiYRWUXF6_05T19GCXlz9cCSz6n41ASnXIPc,7407
|
|
12
12
|
cite_agent/cli_workflow.py,sha256=4oS_jW9D8ylovXbEFdsyLQONt4o0xxR4Xatfcc4tnBs,11641
|
|
13
13
|
cite_agent/dashboard.py,sha256=VGV5XQU1PnqvTsxfKMcue3j2ri_nvm9Be6O5aVays_w,10502
|
|
14
|
-
cite_agent/enhanced_ai_agent.py,sha256=
|
|
14
|
+
cite_agent/enhanced_ai_agent.py,sha256=i7q4gWB3KsQSfOhNBZMJw9GRcK-_GQc4O56exumROiE,167565
|
|
15
15
|
cite_agent/rate_limiter.py,sha256=-0fXx8Tl4zVB4O28n9ojU2weRo-FBF1cJo9Z5jC2LxQ,10908
|
|
16
16
|
cite_agent/session_manager.py,sha256=B0MXSOsXdhO3DlvTG7S8x6pmGlYEDvIZ-o8TZM23niQ,9444
|
|
17
17
|
cite_agent/setup_config.py,sha256=3m2e3gw0srEWA0OygdRo64r-8HK5ohyXfct0c__CF3s,16817
|
|
@@ -22,7 +22,7 @@ cite_agent/updater.py,sha256=udoAAN4gBKAvKDV7JTh2FJO_jIhNk9bby4x6n188MEY,8458
|
|
|
22
22
|
cite_agent/web_search.py,sha256=FZCuNO7MAITiOIbpPbJyt2bzbXPzQla-9amJpnMpW_4,6520
|
|
23
23
|
cite_agent/workflow.py,sha256=a0YC0Mzz4or1C5t2gZcuJBQ0uMOZrooaI8eLu2kkI0k,15086
|
|
24
24
|
cite_agent/workflow_integration.py,sha256=A9ua0DN5pRtuU0cAwrUTGvqt2SXKhEHQbrHx16EGnDM,10910
|
|
25
|
-
cite_agent-1.2.
|
|
25
|
+
cite_agent-1.2.13.dist-info/licenses/LICENSE,sha256=XJkyO4IymhSUniN1ENY6lLrL2729gn_rbRlFK6_Hi9M,1074
|
|
26
26
|
src/__init__.py,sha256=0eEpjRfjRjOTilP66y-AbGNslBsVYr_clE-bZUzsX7s,40
|
|
27
27
|
src/services/__init__.py,sha256=pTGLCH_84mz4nGtYMwQES5w-LzoSulUtx_uuNM6r-LA,4257
|
|
28
28
|
src/services/simple_enhanced_main.py,sha256=IJoOplCqcVUg3GvN_BRyAhpGrLm_WEPy2jmHcNCY6R0,9257
|
|
@@ -49,8 +49,8 @@ src/services/research_service/synthesizer.py,sha256=lCcu37PWhWVNphHKaJJDIC-JQ5OI
|
|
|
49
49
|
src/services/search_service/__init__.py,sha256=UZFXdd7r6wietQ2kESXEyGffdfBbpghquecQde7auF4,137
|
|
50
50
|
src/services/search_service/indexer.py,sha256=u3-uwdAfmahWWsdebDF9i8XIyp7YtUMIHzlmBLBnPPM,7252
|
|
51
51
|
src/services/search_service/search_engine.py,sha256=S9HqQ_mk-8W4d4MUOgBbEGQGV29-eSuceSFvVb4Xk-k,12500
|
|
52
|
-
cite_agent-1.2.
|
|
53
|
-
cite_agent-1.2.
|
|
54
|
-
cite_agent-1.2.
|
|
55
|
-
cite_agent-1.2.
|
|
56
|
-
cite_agent-1.2.
|
|
52
|
+
cite_agent-1.2.13.dist-info/METADATA,sha256=D3xbwKTOyFfuX2P0ZgpaQtrbTqS8mDi8Jga1T9DNpQQ,12232
|
|
53
|
+
cite_agent-1.2.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
54
|
+
cite_agent-1.2.13.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
|
|
55
|
+
cite_agent-1.2.13.dist-info/top_level.txt,sha256=TgOFqJTIy8vDZuOoYA2QgagkqZtfhM5Acvt_IsWzAKo,15
|
|
56
|
+
cite_agent-1.2.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|