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.
@@ -0,0 +1,3 @@
1
+ """Deep Report - Multi-agent research report generator."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,5 @@
1
+ """Allow running as: python -m deep_report"""
2
+ from .cli import main
3
+
4
+ if __name__ == "__main__":
5
+ main()
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()
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env python3
2
+ """Deep Report Orchestrator - Script-based multi-agent research."""
3
+
4
+ from .state import State
5
+ from .main import run_new_report, resume_report
6
+
7
+ __all__ = ["State", "run_new_report", "resume_report"]