cite-agent 1.2.9__py3-none-any.whl → 1.2.11__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/cli.py +1 -1
- cite_agent/enhanced_ai_agent.py +50 -35
- {cite_agent-1.2.9.dist-info → cite_agent-1.2.11.dist-info}/METADATA +1 -1
- {cite_agent-1.2.9.dist-info → cite_agent-1.2.11.dist-info}/RECORD +9 -9
- {cite_agent-1.2.9.dist-info → cite_agent-1.2.11.dist-info}/WHEEL +0 -0
- {cite_agent-1.2.9.dist-info → cite_agent-1.2.11.dist-info}/entry_points.txt +0 -0
- {cite_agent-1.2.9.dist-info → cite_agent-1.2.11.dist-info}/licenses/LICENSE +0 -0
- {cite_agent-1.2.9.dist-info → cite_agent-1.2.11.dist-info}/top_level.txt +0 -0
cite_agent/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.2.
|
|
1
|
+
__version__ = "1.2.11"
|
cite_agent/cli.py
CHANGED
cite_agent/enhanced_ai_agent.py
CHANGED
|
@@ -2744,6 +2744,7 @@ class EnhancedNocturnalAgent:
|
|
|
2744
2744
|
|
|
2745
2745
|
# Check if user is referring to previous context ("it", "there")
|
|
2746
2746
|
has_pronoun = any(word in question_lower for word in ['it', 'there', 'that folder', 'that directory'])
|
|
2747
|
+
pronoun_resolved = False
|
|
2747
2748
|
|
|
2748
2749
|
if has_pronoun and len(self.conversation_history) > 0:
|
|
2749
2750
|
# Look for directory path in last assistant message
|
|
@@ -2763,52 +2764,66 @@ class EnhancedNocturnalAgent:
|
|
|
2763
2764
|
api_results["shell_info"]["directory_contents"] = ls_output
|
|
2764
2765
|
api_results["shell_info"]["target_path"] = target_path
|
|
2765
2766
|
tools_used.append("shell_execution")
|
|
2766
|
-
|
|
2767
|
-
break
|
|
2768
|
-
|
|
2769
|
-
# Generic search if no pronoun or no path found
|
|
2770
|
-
# Common words to ignore
|
|
2771
|
-
ignore_words = {
|
|
2772
|
-
'looking', 'find', 'folder', 'directory', 'called', 'something',
|
|
2773
|
-
'forgot', 'name', 'think', 'can', 'you', 'look', 'for', 'somewhere',
|
|
2774
|
-
'computer', 'downloads', 'the', 'this', 'that', 'class', 'investment',
|
|
2775
|
-
'check', 'what', 'into'
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
# Extract potential target names (prefer short alphanumeric codes)
|
|
2779
|
-
all_words = re.findall(r'\b([a-zA-Z0-9_-]+)\b', request.question)
|
|
2780
|
-
potential_names = [w for w in all_words if len(w) >= 2 and w.lower() not in ignore_words]
|
|
2781
|
-
|
|
2782
|
-
# Detect location hints
|
|
2783
|
-
search_path = "~" # Default to home
|
|
2784
|
-
if 'downloads' in question_lower:
|
|
2785
|
-
search_path = "~/Downloads"
|
|
2786
|
-
elif 'documents' in question_lower:
|
|
2787
|
-
search_path = "~/Documents"
|
|
2767
|
+
pronoun_resolved = True
|
|
2788
2768
|
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2769
|
+
# Generic search if no pronoun or pronoun not resolved
|
|
2770
|
+
if not pronoun_resolved:
|
|
2771
|
+
# Common words to ignore
|
|
2772
|
+
ignore_words = {
|
|
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
|
+
}
|
|
2778
|
+
|
|
2779
|
+
# Extract potential target names (prefer short alphanumeric codes)
|
|
2780
|
+
all_words = re.findall(r'\b([a-zA-Z0-9_-]+)\b', request.question)
|
|
2781
|
+
potential_names = [w for w in all_words if len(w) >= 2 and w.lower() not in ignore_words]
|
|
2782
|
+
|
|
2783
|
+
# Detect location hints
|
|
2784
|
+
search_path = "~" # Default to home
|
|
2785
|
+
if 'downloads' in question_lower:
|
|
2786
|
+
search_path = "~/Downloads"
|
|
2787
|
+
elif 'documents' in question_lower:
|
|
2788
|
+
search_path = "~/Documents"
|
|
2796
2789
|
|
|
2790
|
+
search_results = []
|
|
2791
|
+
searched_terms = []
|
|
2792
|
+
|
|
2793
|
+
for name in potential_names[:2]: # Limit to 2 best candidates
|
|
2794
|
+
if name in searched_terms:
|
|
2795
|
+
continue
|
|
2796
|
+
searched_terms.append(name)
|
|
2797
|
+
|
|
2797
2798
|
# Search with increasing depth if needed
|
|
2798
|
-
|
|
2799
|
+
find_cmd = f"find {search_path} -maxdepth 4 -type d -iname '*{name}*' 2>/dev/null | head -20"
|
|
2800
|
+
find_output = self.execute_command(find_cmd)
|
|
2801
|
+
|
|
2802
|
+
# DEBUG: Log exact output
|
|
2803
|
+
debug_mode = os.getenv("NOCTURNAL_DEBUG", "").lower() == "1"
|
|
2804
|
+
if debug_mode:
|
|
2805
|
+
print(f"🔍 FIND EXECUTED: {find_cmd}")
|
|
2806
|
+
print(f"🔍 FIND OUTPUT: {repr(find_output)}")
|
|
2807
|
+
|
|
2799
2808
|
if find_output.strip():
|
|
2800
2809
|
search_results.append(f"Searched for '*{name}*' in {search_path}:\n{find_output}")
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2810
|
+
|
|
2811
|
+
if search_results:
|
|
2812
|
+
api_results["shell_info"]["search_results"] = "\n\n".join(search_results)
|
|
2813
|
+
elif potential_names:
|
|
2814
|
+
api_results["shell_info"]["search_results"] = f"No directories matching '{', '.join(searched_terms)}' found in {search_path}"
|
|
2806
2815
|
|
|
2807
2816
|
tools_used.append("shell_execution")
|
|
2808
2817
|
except Exception as e:
|
|
2809
2818
|
if debug_mode:
|
|
2810
2819
|
print(f"🔍 Shell execution failed: {e}")
|
|
2811
2820
|
|
|
2821
|
+
# DEBUG: Log exactly what we're sending to backend
|
|
2822
|
+
debug_mode = os.getenv("NOCTURNAL_DEBUG", "").lower() == "1"
|
|
2823
|
+
if debug_mode and api_results.get("shell_info", {}).get("search_results"):
|
|
2824
|
+
print(f"🔍 SENDING TO BACKEND:")
|
|
2825
|
+
print(f"🔍 shell_info.search_results = {repr(api_results['shell_info']['search_results'])}")
|
|
2826
|
+
|
|
2812
2827
|
# Call backend and UPDATE CONVERSATION HISTORY
|
|
2813
2828
|
response = await self.call_backend_query(
|
|
2814
2829
|
query=request.question,
|
|
@@ -1,17 +1,17 @@
|
|
|
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=aBWZsCYiXXcSUsUJr3tOTQWsH7ZDqJzyMYdQbOd5Qtc,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
|
|
7
7
|
cite_agent/auth.py,sha256=YtoGXKwcLkZQbop37iYYL9BzRWBRPlt_D9p71VGViS4,9833
|
|
8
8
|
cite_agent/backend_only_client.py,sha256=WqLF8x7aXTro2Q3ehqKMsdCg53s6fNk9Hy86bGxqmmw,2561
|
|
9
|
-
cite_agent/cli.py,sha256=
|
|
9
|
+
cite_agent/cli.py,sha256=PqPc7NID1-GJWn3Un1UGx41bz-VxZbv_IoOboH6U6R8,32224
|
|
10
10
|
cite_agent/cli_conversational.py,sha256=RAmgRNRyB8gQ8QLvWU-Tt23j2lmA34rQNT5F3_7SOq0,11141
|
|
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=HnBOMMQtG0vbVnYY0EG8PDZHz6Lv4NASmOmsumrVj8w,166111
|
|
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.11.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.11.dist-info/METADATA,sha256=yra5Oa3rfsZVss5827SZK3fNBpG8n_mInIMofJX8Dgw,12232
|
|
53
|
+
cite_agent-1.2.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
54
|
+
cite_agent-1.2.11.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
|
|
55
|
+
cite_agent-1.2.11.dist-info/top_level.txt,sha256=TgOFqJTIy8vDZuOoYA2QgagkqZtfhM5Acvt_IsWzAKo,15
|
|
56
|
+
cite_agent-1.2.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|