cite-agent 1.3.2__py3-none-any.whl → 1.3.4__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.
cite_agent/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.3.2"
1
+ __version__ = "1.3.4"
cite_agent/cli.py CHANGED
@@ -747,7 +747,8 @@ Examples:
747
747
 
748
748
  # Handle version
749
749
  if args.version:
750
- print("Cite Agent v1.2.11")
750
+ from cite_agent.__version__ import __version__
751
+ print(f"Cite Agent v{__version__}")
751
752
  print("AI Research Assistant with real data integration")
752
753
  return
753
754
 
@@ -820,13 +821,14 @@ Examples:
820
821
  updater.show_update_status()
821
822
  sys.exit(0)
822
823
 
823
- # Auto-check for updates on startup (silent, non-blocking)
824
- def check_updates_silently():
825
- """Check for updates in background, show notification if available"""
824
+ # Auto-upgrade on startup (silent, non-blocking)
825
+ def auto_upgrade_if_needed():
826
+ """Automatically upgrade to latest version if available"""
826
827
  try:
827
828
  # Only check once per day to avoid API spam
828
829
  from pathlib import Path
829
830
  import time
831
+ import subprocess
830
832
 
831
833
  check_file = Path.home() / ".cite_agent" / ".last_update_check"
832
834
  check_file.parent.mkdir(exist_ok=True)
@@ -846,15 +848,44 @@ Examples:
846
848
  if update_info and update_info.get("available"):
847
849
  current = update_info["current"]
848
850
  latest = update_info["latest"]
849
- print(f"\n💡 Update available: v{current} → v{latest}")
850
- print(f" Run: pip install --upgrade cite-agent")
851
- print(f" Or: pipx upgrade cite-agent\n")
851
+
852
+ print(f"\n🔄 Updating Cite Agent: v{current} v{latest}...")
853
+
854
+ # Detect if installed via pipx or pip
855
+ import shutil
856
+ if shutil.which("pipx"):
857
+ # Try pipx upgrade first
858
+ result = subprocess.run(
859
+ ["pipx", "upgrade", "cite-agent"],
860
+ capture_output=True,
861
+ text=True,
862
+ timeout=60
863
+ )
864
+ if result.returncode == 0:
865
+ print(f"✅ Updated to v{latest} (via pipx)")
866
+ print("🔄 Restart cite-agent to use the new version\n")
867
+ return
868
+
869
+ # Fall back to pip install --user
870
+ result = subprocess.run(
871
+ [sys.executable, "-m", "pip", "install", "--upgrade", "--user", "cite-agent"],
872
+ capture_output=True,
873
+ text=True,
874
+ timeout=60
875
+ )
876
+
877
+ if result.returncode == 0:
878
+ print(f"✅ Updated to v{latest}")
879
+ print("🔄 Restart cite-agent to use the new version\n")
880
+ else:
881
+ # Silent fail - don't show errors to users
882
+ pass
852
883
  except:
853
884
  pass # Silently fail, don't block startup
854
885
 
855
- # Run update check in background (doesn't delay startup)
886
+ # Run auto-upgrade in background (doesn't delay startup)
856
887
  import threading
857
- threading.Thread(target=check_updates_silently, daemon=True).start()
888
+ threading.Thread(target=auto_upgrade_if_needed, daemon=True).start()
858
889
 
859
890
  # Handle query or interactive mode
860
891
  async def run_cli():
@@ -1696,6 +1696,14 @@ class EnhancedNocturnalAgent:
1696
1696
  tokens_used=detail.get('tokens_used_today', 0)
1697
1697
  )
1698
1698
 
1699
+ elif response.status == 503:
1700
+ # Backend AI service temporarily unavailable (Cerebras/Groq rate limited)
1701
+ # Graceful degradation: return helpful message instead of error
1702
+ return ChatResponse(
1703
+ response="⚠️ AI service temporarily busy. Try again in a moment, or rephrase your question.",
1704
+ error_message="Service temporarily unavailable"
1705
+ )
1706
+
1699
1707
  elif response.status == 200:
1700
1708
  data = await response.json()
1701
1709
  response_text = data.get('response', '')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cite-agent
3
- Version: 1.3.2
3
+ Version: 1.3.4
4
4
  Summary: Terminal AI assistant for academic research with citation verification
5
5
  Home-page: https://github.com/Spectating101/cite-agent
6
6
  Author: Cite-Agent Team
@@ -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=HgKA3RqZvC7slo8MgLyffCGwJbQ3cY6I7oUMFvGLWps,22
3
+ cite_agent/__version__.py,sha256=U6E-HRsrit7kgSGgIeTI2eMUeyUCny5DH8LDV4I1o0g,22
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=H9VaO6i-EZXYIyMK1XIqHeWZTDHi2bdzKeDGRoFE7uA,33772
9
+ cite_agent/cli.py,sha256=f0x19N4MB85XgfNtOPEtovLQO_qzTHsli5IpG8wra30,35029
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=R6fFT_h_o8DJe9hOosvXececvNR7v7iDmF37mo3EwlA,164710
14
+ cite_agent/enhanced_ai_agent.py,sha256=HfCotlyrtBRXx6ENa8pRnG_x0JZ5izoIE87VwgLWAhU,165207
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.3.2.dist-info/licenses/LICENSE,sha256=XJkyO4IymhSUniN1ENY6lLrL2729gn_rbRlFK6_Hi9M,1074
25
+ cite_agent-1.3.4.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.3.2.dist-info/METADATA,sha256=aV32kYrPFOg60gI3khJa7ByN89_j0qqQrXhyDdXVsno,12231
53
- cite_agent-1.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
- cite_agent-1.3.2.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
55
- cite_agent-1.3.2.dist-info/top_level.txt,sha256=TgOFqJTIy8vDZuOoYA2QgagkqZtfhM5Acvt_IsWzAKo,15
56
- cite_agent-1.3.2.dist-info/RECORD,,
52
+ cite_agent-1.3.4.dist-info/METADATA,sha256=AFuXC6Gvnkb1wUAuau1XbuD-xNVlJdmjoKBHyaG-0OM,12231
53
+ cite_agent-1.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
+ cite_agent-1.3.4.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
55
+ cite_agent-1.3.4.dist-info/top_level.txt,sha256=TgOFqJTIy8vDZuOoYA2QgagkqZtfhM5Acvt_IsWzAKo,15
56
+ cite_agent-1.3.4.dist-info/RECORD,,