deep-report 0.1.0__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.
- deep_report/__init__.py +3 -0
- deep_report/__main__.py +5 -0
- deep_report/cli.py +91 -0
- deep_report/orchestrator/__init__.py +7 -0
- deep_report/orchestrator/approval.py +746 -0
- deep_report/orchestrator/intervention.py +218 -0
- deep_report/orchestrator/main.py +1515 -0
- deep_report/orchestrator/papers/__init__.py +15 -0
- deep_report/orchestrator/papers/downloader.py +249 -0
- deep_report/orchestrator/papers/sources.py +464 -0
- deep_report/orchestrator/phases/__init__.py +5 -0
- deep_report/orchestrator/phases/cleanup.py +277 -0
- deep_report/orchestrator/phases/plan.py +388 -0
- deep_report/orchestrator/phases/research.py +763 -0
- deep_report/orchestrator/phases/setup.py +618 -0
- deep_report/orchestrator/phases/synthesize.py +767 -0
- deep_report/orchestrator/progress.py +185 -0
- deep_report/orchestrator/registry.py +203 -0
- deep_report/orchestrator/state.py +385 -0
- deep_report/orchestrator/topic_analyzer.py +273 -0
- deep_report/orchestrator/ui.py +1183 -0
- deep_report/orchestrator/utils/__init__.py +52 -0
- deep_report/orchestrator/utils/agents.py +979 -0
- deep_report/orchestrator/utils/keyboard.py +191 -0
- deep_report/orchestrator/utils/role_enforcer.py +94 -0
- deep_report/orchestrator/watch_progress.py +277 -0
- deep_report/skill/SKILL.md +78 -0
- deep_report-0.1.0.dist-info/METADATA +58 -0
- deep_report-0.1.0.dist-info/RECORD +32 -0
- deep_report-0.1.0.dist-info/WHEEL +4 -0
- deep_report-0.1.0.dist-info/entry_points.txt +2 -0
- deep_report-0.1.0.dist-info/licenses/LICENSE +21 -0
deep_report/__init__.py
ADDED
deep_report/__main__.py
ADDED
deep_report/cli.py
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""CLI entry point for deep-report."""
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
import shutil
|
|
6
|
+
import subprocess
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def check_claude_cli():
|
|
11
|
+
"""Verify Claude CLI is available."""
|
|
12
|
+
if not shutil.which("claude"):
|
|
13
|
+
from .orchestrator.ui import ui
|
|
14
|
+
ui.error("Claude CLI not found.")
|
|
15
|
+
ui.info("deep-report requires Claude Code to be installed.")
|
|
16
|
+
ui.info("Install from: https://claude.ai/download")
|
|
17
|
+
ui.info("After installing, run 'claude' once to authenticate.")
|
|
18
|
+
sys.exit(1)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def check_claude_auth():
|
|
22
|
+
"""Probe Claude CLI authentication. Warns on failure, never blocks."""
|
|
23
|
+
try:
|
|
24
|
+
result = subprocess.run(
|
|
25
|
+
["claude", "--print", "--model", "haiku", "say ok"],
|
|
26
|
+
capture_output=True, text=True, timeout=10,
|
|
27
|
+
)
|
|
28
|
+
if result.returncode != 0:
|
|
29
|
+
from .orchestrator.ui import ui
|
|
30
|
+
ui.warning("Claude CLI may not be authenticated. Run 'claude' to log in.")
|
|
31
|
+
except subprocess.TimeoutExpired:
|
|
32
|
+
from .orchestrator.ui import ui
|
|
33
|
+
ui.warning("Claude CLI auth check timed out. Run 'claude' to verify authentication.")
|
|
34
|
+
except Exception:
|
|
35
|
+
# Don't block on unexpected errors
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def main():
|
|
40
|
+
# Handle --install-skill as alias for --setup-skill
|
|
41
|
+
if "--install-skill" in sys.argv:
|
|
42
|
+
sys.argv[sys.argv.index("--install-skill")] = "--setup-skill"
|
|
43
|
+
|
|
44
|
+
if "--version" in sys.argv:
|
|
45
|
+
from . import __version__
|
|
46
|
+
print(f"deep-report {__version__}")
|
|
47
|
+
return
|
|
48
|
+
|
|
49
|
+
if "--help" not in sys.argv and "-h" not in sys.argv:
|
|
50
|
+
check_claude_cli()
|
|
51
|
+
|
|
52
|
+
# Import and run orchestrator
|
|
53
|
+
from .orchestrator.main import main as orchestrator_main
|
|
54
|
+
sys.exit(orchestrator_main())
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def install_skill():
|
|
58
|
+
"""Install/symlink the Claude Code skill."""
|
|
59
|
+
from .orchestrator.ui import ui
|
|
60
|
+
|
|
61
|
+
import deep_report
|
|
62
|
+
skill_src = Path(deep_report.__path__[0]) / "skill"
|
|
63
|
+
skill_dst = Path.home() / ".claude" / "skills" / "deep-report"
|
|
64
|
+
|
|
65
|
+
# Create skills directory if needed
|
|
66
|
+
skill_dst.parent.mkdir(parents=True, exist_ok=True)
|
|
67
|
+
|
|
68
|
+
if skill_dst.exists() or skill_dst.is_symlink():
|
|
69
|
+
ui.info(f"Skill already exists at {skill_dst}")
|
|
70
|
+
response = input("Replace it? [y/N]: ").strip().lower()
|
|
71
|
+
if response != 'y':
|
|
72
|
+
ui.info("Cancelled.")
|
|
73
|
+
return
|
|
74
|
+
if skill_dst.is_symlink():
|
|
75
|
+
skill_dst.unlink()
|
|
76
|
+
else:
|
|
77
|
+
import shutil
|
|
78
|
+
shutil.rmtree(skill_dst)
|
|
79
|
+
|
|
80
|
+
try:
|
|
81
|
+
skill_dst.symlink_to(skill_src)
|
|
82
|
+
except (OSError, PermissionError) as e:
|
|
83
|
+
ui.error(f"Could not create skill link: {e}")
|
|
84
|
+
return
|
|
85
|
+
|
|
86
|
+
ui.success(f"Skill installed: {skill_dst} -> {skill_src}")
|
|
87
|
+
ui.info("You can now use /deep-report in Claude Code")
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
if __name__ == "__main__":
|
|
91
|
+
main()
|