depression.ai 1.0.0__tar.gz

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.
Files changed (115) hide show
  1. depression_ai-1.0.0/PKG-INFO +202 -0
  2. depression_ai-1.0.0/README.md +170 -0
  3. depression_ai-1.0.0/pyproject.toml +70 -0
  4. depression_ai-1.0.0/setup.cfg +4 -0
  5. depression_ai-1.0.0/src/agent/__init__.py +39 -0
  6. depression_ai-1.0.0/src/agent/agent/__init__.py +49 -0
  7. depression_ai-1.0.0/src/agent/agent/agent.py +719 -0
  8. depression_ai-1.0.0/src/agent/agent/dual_agent.py +969 -0
  9. depression_ai-1.0.0/src/agent/agent/loop.py +1408 -0
  10. depression_ai-1.0.0/src/agent/agent/planner.py +970 -0
  11. depression_ai-1.0.0/src/agent/agent/subagent.py +438 -0
  12. depression_ai-1.0.0/src/agent/cli/__init__.py +25 -0
  13. depression_ai-1.0.0/src/agent/cli/commands.py +1972 -0
  14. depression_ai-1.0.0/src/agent/cli/input.py +1133 -0
  15. depression_ai-1.0.0/src/agent/cli/ui.py +661 -0
  16. depression_ai-1.0.0/src/agent/config/__init__.py +133 -0
  17. depression_ai-1.0.0/src/agent/config/config.py +1053 -0
  18. depression_ai-1.0.0/src/agent/config/loader.py +778 -0
  19. depression_ai-1.0.0/src/agent/context/__init__.py +27 -0
  20. depression_ai-1.0.0/src/agent/context/compaction.py +293 -0
  21. depression_ai-1.0.0/src/agent/context/files.py +326 -0
  22. depression_ai-1.0.0/src/agent/context/manager.py +567 -0
  23. depression_ai-1.0.0/src/agent/context/project.py +301 -0
  24. depression_ai-1.0.0/src/agent/context/runtime.py +132 -0
  25. depression_ai-1.0.0/src/agent/llm/__init__.py +35 -0
  26. depression_ai-1.0.0/src/agent/llm/anthropic.py +50 -0
  27. depression_ai-1.0.0/src/agent/llm/groq.py +400 -0
  28. depression_ai-1.0.0/src/agent/llm/local.py +0 -0
  29. depression_ai-1.0.0/src/agent/llm/nvidia.py +691 -0
  30. depression_ai-1.0.0/src/agent/llm/openai_compatible.py +64 -0
  31. depression_ai-1.0.0/src/agent/llm/provider.py +511 -0
  32. depression_ai-1.0.0/src/agent/llm/rate_limiter.py +108 -0
  33. depression_ai-1.0.0/src/agent/llm/runtime.py +107 -0
  34. depression_ai-1.0.0/src/agent/main.py +766 -0
  35. depression_ai-1.0.0/src/agent/mcp/__init__.py +70 -0
  36. depression_ai-1.0.0/src/agent/mcp/aws_config.py +142 -0
  37. depression_ai-1.0.0/src/agent/mcp/client.py +1468 -0
  38. depression_ai-1.0.0/src/agent/permissions/__init__.py +29 -0
  39. depression_ai-1.0.0/src/agent/permissions/aws.py +254 -0
  40. depression_ai-1.0.0/src/agent/permissions/filesystem.py +223 -0
  41. depression_ai-1.0.0/src/agent/permissions/manager.py +620 -0
  42. depression_ai-1.0.0/src/agent/permissions/rules.py +254 -0
  43. depression_ai-1.0.0/src/agent/permissions/terminal.py +317 -0
  44. depression_ai-1.0.0/src/agent/plugins/__init__.py +42 -0
  45. depression_ai-1.0.0/src/agent/plugins/loader.py +688 -0
  46. depression_ai-1.0.0/src/agent/plugins/registry.py +421 -0
  47. depression_ai-1.0.0/src/agent/project/__init__.py +27 -0
  48. depression_ai-1.0.0/src/agent/project/awsproject.py +264 -0
  49. depression_ai-1.0.0/src/agent/project/git.py +483 -0
  50. depression_ai-1.0.0/src/agent/project/scanner.py +461 -0
  51. depression_ai-1.0.0/src/agent/project/workspace.py +523 -0
  52. depression_ai-1.0.0/src/agent/session/__init__.py +22 -0
  53. depression_ai-1.0.0/src/agent/session/history.py +323 -0
  54. depression_ai-1.0.0/src/agent/session/session.py +553 -0
  55. depression_ai-1.0.0/src/agent/session/state.py +127 -0
  56. depression_ai-1.0.0/src/agent/storage/__init__.py +19 -0
  57. depression_ai-1.0.0/src/agent/storage/cache.py +489 -0
  58. depression_ai-1.0.0/src/agent/storage/database.py +606 -0
  59. depression_ai-1.0.0/src/agent/tools/__init__.py +72 -0
  60. depression_ai-1.0.0/src/agent/tools/aws_helper.py +295 -0
  61. depression_ai-1.0.0/src/agent/tools/browser.py +113 -0
  62. depression_ai-1.0.0/src/agent/tools/compat.py +839 -0
  63. depression_ai-1.0.0/src/agent/tools/diagnostics.py +113 -0
  64. depression_ai-1.0.0/src/agent/tools/filesystem.py +302 -0
  65. depression_ai-1.0.0/src/agent/tools/git.py +147 -0
  66. depression_ai-1.0.0/src/agent/tools/mcp.py +67 -0
  67. depression_ai-1.0.0/src/agent/tools/patch.py +236 -0
  68. depression_ai-1.0.0/src/agent/tools/proccess.py +247 -0
  69. depression_ai-1.0.0/src/agent/tools/realtime_browser.py +619 -0
  70. depression_ai-1.0.0/src/agent/tools/registry.py +284 -0
  71. depression_ai-1.0.0/src/agent/tools/search.py +191 -0
  72. depression_ai-1.0.0/src/agent/tools/task.py +135 -0
  73. depression_ai-1.0.0/src/agent/tools/terminal.py +303 -0
  74. depression_ai-1.0.0/src/agent/tools/todo.py +154 -0
  75. depression_ai-1.0.0/src/agent/tools/web.py +159 -0
  76. depression_ai-1.0.0/src/agent/tui/__init__.py +4 -0
  77. depression_ai-1.0.0/src/agent/tui/__main__.py +5 -0
  78. depression_ai-1.0.0/src/agent/tui/app.py +1301 -0
  79. depression_ai-1.0.0/src/agent/tui/events.py +119 -0
  80. depression_ai-1.0.0/src/agent/tui/plan_parser.py +244 -0
  81. depression_ai-1.0.0/src/agent/tui/run.py +112 -0
  82. depression_ai-1.0.0/src/agent/tui/theme.py +56 -0
  83. depression_ai-1.0.0/src/agent/tui/tool_call.py +208 -0
  84. depression_ai-1.0.0/src/agent/tui/widgets/aws_panel.py +433 -0
  85. depression_ai-1.0.0/src/agent/tui/widgets/diff_view.py +200 -0
  86. depression_ai-1.0.0/src/agent/tui/widgets/empty_banner.py +365 -0
  87. depression_ai-1.0.0/src/agent/tui/widgets/sidebar.py +105 -0
  88. depression_ai-1.0.0/src/agent/tui/widgets/thinking.py +79 -0
  89. depression_ai-1.0.0/src/agent/tui/widgets/todo_panel.py +121 -0
  90. depression_ai-1.0.0/src/agent/tui/widgets/tool_call.py +685 -0
  91. depression_ai-1.0.0/src/agent/utils/__init__.py +112 -0
  92. depression_ai-1.0.0/src/agent/utils/env_manager.py +234 -0
  93. depression_ai-1.0.0/src/agent/utils/errors.py +587 -0
  94. depression_ai-1.0.0/src/agent/utils/logging.py +211 -0
  95. depression_ai-1.0.0/src/agent/utils/platform.py +258 -0
  96. depression_ai-1.0.0/src/agent/utils/redact.py +72 -0
  97. depression_ai-1.0.0/src/depression.ai.egg-info/PKG-INFO +202 -0
  98. depression_ai-1.0.0/src/depression.ai.egg-info/SOURCES.txt +113 -0
  99. depression_ai-1.0.0/src/depression.ai.egg-info/dependency_links.txt +1 -0
  100. depression_ai-1.0.0/src/depression.ai.egg-info/entry_points.txt +4 -0
  101. depression_ai-1.0.0/src/depression.ai.egg-info/requires.txt +16 -0
  102. depression_ai-1.0.0/src/depression.ai.egg-info/top_level.txt +1 -0
  103. depression_ai-1.0.0/tests/test_agent.py +0 -0
  104. depression_ai-1.0.0/tests/test_agents_roles.py +250 -0
  105. depression_ai-1.0.0/tests/test_cli.py +0 -0
  106. depression_ai-1.0.0/tests/test_config.py +0 -0
  107. depression_ai-1.0.0/tests/test_context_runtime.py +26 -0
  108. depression_ai-1.0.0/tests/test_loop_speedups.py +151 -0
  109. depression_ai-1.0.0/tests/test_runtime_connection.py +43 -0
  110. depression_ai-1.0.0/tests/test_session.py +0 -0
  111. depression_ai-1.0.0/tests/test_shutdown.py +59 -0
  112. depression_ai-1.0.0/tests/test_tools.py +0 -0
  113. depression_ai-1.0.0/tests/test_tui.py +80 -0
  114. depression_ai-1.0.0/tests/test_tui_llm_chain.py +77 -0
  115. depression_ai-1.0.0/tests/test_tui_pty.py +121 -0
@@ -0,0 +1,202 @@
1
+ Metadata-Version: 2.4
2
+ Name: depression.ai
3
+ Version: 1.0.0
4
+ Summary: AI agent for everything — development, deployment, and analysis
5
+ Author-email: rnaveenpatil <rnaveenpatil@example.com>
6
+ License-Expression: ISC
7
+ Project-URL: Homepage, https://github.com/rnaveenpatil/depression.ai
8
+ Project-URL: Repository, https://github.com/rnaveenpatil/depression.ai
9
+ Project-URL: Issues, https://github.com/rnaveenpatil/depression.ai/issues
10
+ Keywords: ai,cli,agent,tui,textual,llm
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: httpx>=0.25.0
20
+ Requires-Dist: pyyaml>=6.0
21
+ Requires-Dist: prompt-toolkit>=3.0
22
+ Requires-Dist: textual>=0.80.0
23
+ Provides-Extra: browser
24
+ Requires-Dist: playwright>=1.40.0; extra == "browser"
25
+ Provides-Extra: tui
26
+ Requires-Dist: textual-dev>=1.0.0; extra == "tui"
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0; extra == "dev"
29
+ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
30
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
31
+ Requires-Dist: mypy>=1.0; extra == "dev"
32
+
33
+ # depression
34
+
35
+ **AI agent for everything — development, deployment, and analysis.**
36
+
37
+ A terminal-native agentic AI assistant. Sits in your terminal as a Textual TUI and
38
+ drives a **Plan + Build** dual-agent system with full tool access, MCP support,
39
+ and visual permission prompts.
40
+
41
+ ## Features
42
+
43
+ - **Textual TUI** — interactive terminal UI with plan/build mode switching (`Ctrl+P`), AWS credentials panel, thinking indicator, todo panel, live tool-call cards, and diff view
44
+ - **Dual-Agent Architecture** — Plan agent (read-only analysis) + Build agent (full tool execution)
45
+ - **User-Configured LLM Runtime** — connect any OpenAI-compatible endpoint at runtime (base URL + API key + model); built-in provider adapters for Anthropic, Groq, NVIDIA, and local models
46
+ - **Tool Calling** — terminal, filesystem, git, patch, search, web, todo, process, browser automation (Playwright), AWS
47
+ - **MCP Support** — Model Context Protocol client with multiple servers
48
+ - **Session Management** — persistent sessions stored in SQLite; resume with `/session`
49
+ - **Snapshot / Undo** — git-stash-based snapshots for safe experimentation
50
+ - **Subagents & Plugins** — parallel task execution and `@syntax` subagents, plugin loader
51
+ - **Permission System** — per-tool approval rules with interactive modal prompts
52
+
53
+ ## Installation
54
+
55
+ ```bash
56
+ git clone https://github.com/rnaveenpatil/depression.ai.git
57
+ cd depression.ai
58
+ pip install -e .
59
+ ```
60
+
61
+ Optional extras:
62
+
63
+ ```bash
64
+ # Browser automation tool (Playwright)
65
+ pip install -e ".[browser]"
66
+ playwright install chromium
67
+
68
+ # Development (pytest, ruff, mypy)
69
+ pip install -e ".[dev]"
70
+ ```
71
+
72
+ ## Quick Start
73
+
74
+ ```bash
75
+ # Launch the TUI
76
+ depression
77
+
78
+ # Equivalent forms
79
+ python -m agent.tui
80
+ python -m agent.tui.run
81
+ ```
82
+
83
+ Before first use you must connect an LLM endpoint (see [Runtime LLM Configuration](#runtime-llm-configuration)
84
+ below). The TUI also offers an **LLM CONNECTION** panel to set base URL, API key,
85
+ and model interactively.
86
+
87
+ ## Runtime LLM Configuration
88
+
89
+ The agent is deliberately provider-agnostic: there are **no hardcoded API keys**.
90
+ Configure a runtime provider via environment variables or the in-TUI connection
91
+ panel. Copy `.env.example` to `.env`:
92
+
93
+ ```bash
94
+ # User runtime LLM connection (never commit real secrets)
95
+ DEPRESSION_PROVIDER=custom
96
+ DEPRESSION_BASE_URL=https://api.example.com/v1
97
+ DEPRESSION_API_KEY=
98
+ DEPRESSION_MODEL=
99
+
100
+ # AWS credentials entered by /aws panel
101
+ AWS_ACCESS_KEY_ID=
102
+ AWS_SECRET_ACCESS_KEY=
103
+ AWS_DEFAULT_REGION=ap-south-1
104
+ ```
105
+
106
+ ## Configuration
107
+
108
+ Layered config (project overrides user): `.agent/config.json` in your project,
109
+ or `~/.agent/config.json` globally.
110
+
111
+ ```json
112
+ {
113
+ "llm": {
114
+ "provider": "custom",
115
+ "model": "your-model-id"
116
+ }
117
+ }
118
+ ```
119
+
120
+ Write a default config with `depression --init-config` (CLI bootstrap) or edit
121
+ `.agent/config.json` directly.
122
+
123
+ ## Slash Commands
124
+
125
+ Available inside the TUI input box:
126
+
127
+ | Command | Description |
128
+ |---------|-------------|
129
+ | `/help` | Show help |
130
+ | `/plan` | Switch to Plan mode (read-only analysis) |
131
+ | `/build` | Switch to Build mode (full execution) |
132
+ | `/auto` | Automatic Plan -> Build loop |
133
+ | `/snapshot [message]` | Create a git-stash snapshot |
134
+ | `/undo` | Restore the last snapshot |
135
+ | `/model` · `/provider` | View / switch model or provider |
136
+ | `/session` | Show / resume sessions |
137
+ | `/compact` | Compact conversation context |
138
+ | `/tools` · `/permissions` | List tools and permission rules |
139
+ | `/plugins` | Load plugins |
140
+ | `/metrics` · `/cost` · `/tokens` | Usage metrics and cost |
141
+ | `/config` · `/set` | View / set config values |
142
+ | `/exit` | Quit (also `Ctrl+Q`) |
143
+
144
+ ## TUI
145
+
146
+ - **Mode toggle**: `Ctrl+P` cycles Plan → Build
147
+ - **Permissions**: tool requests surface as interactive modal prompts (accept / deny)
148
+ - **AWS panel**: manage AWS credentials from inside the UI
149
+ - **Live panes**: thinking indicator, todo list, tool-call cards, diff view, sidebar
150
+
151
+ ## CLI Flags
152
+
153
+ The `depression` entry point parses the following flags (used in CLI bootstrap
154
+ and overridable before the TUI starts):
155
+
156
+ ```bash
157
+ depression -p /path/to/project # project directory
158
+ depression -m MODEL # override model
159
+ depression --provider PROVIDER # override provider
160
+ depression --yolo # auto-approve all tool calls
161
+ depression --session <id> # resume session
162
+ depression --new-session # force a fresh session
163
+ depression --max-turns N # agent loop limit
164
+ depression --no-mcp # disable MCP
165
+ depression -v / -q # verbose / quiet
166
+ depression --skip-tui # (reserved) CLI-only mode
167
+ ```
168
+
169
+ ## Project Structure
170
+
171
+ ```
172
+ src/
173
+ └── agent/
174
+ ├── agent/ # Plan + Build dual-agent orchestration, planner, loop
175
+ ├── cli/ # Classic CLI bootstrap (argparse, prompt-toolkit UI, slash commands)
176
+ ├── config/ # Layered configuration loader
177
+ ├── context/ # Context manager, compaction, file indexing
178
+ ├── llm/ # Runtime LLM registry + provider adapters, rate limiter
179
+ ├── mcp/ # Model Context Protocol client + AWS config
180
+ ├── permissions/ # Tool permission policy & approval
181
+ ├── plugins/ # Plugin loader (builtin)
182
+ ├── project/ # Workspace management
183
+ ├── session/ # Session persistence
184
+ ├── storage/ # SQLite database + cache
185
+ ├── tools/ # Built-in tools (terminal, git, filesystem, web, browser, AWS, ...)
186
+ ├── tui/ # Textual terminal UI (app, widgets, theme)
187
+ └── utils/ # Logging, platform, env helpers, redaction
188
+ ```
189
+
190
+ ## Development
191
+
192
+ ```bash
193
+ pip install -e ".[dev]"
194
+ pytest # run test suite
195
+ ruff check src/ # lint
196
+ ruff format --check src/ # formatting
197
+ mypy src/ # type checking
198
+ ```
199
+
200
+ ## License
201
+
202
+ ISC License.
@@ -0,0 +1,170 @@
1
+ # depression
2
+
3
+ **AI agent for everything — development, deployment, and analysis.**
4
+
5
+ A terminal-native agentic AI assistant. Sits in your terminal as a Textual TUI and
6
+ drives a **Plan + Build** dual-agent system with full tool access, MCP support,
7
+ and visual permission prompts.
8
+
9
+ ## Features
10
+
11
+ - **Textual TUI** — interactive terminal UI with plan/build mode switching (`Ctrl+P`), AWS credentials panel, thinking indicator, todo panel, live tool-call cards, and diff view
12
+ - **Dual-Agent Architecture** — Plan agent (read-only analysis) + Build agent (full tool execution)
13
+ - **User-Configured LLM Runtime** — connect any OpenAI-compatible endpoint at runtime (base URL + API key + model); built-in provider adapters for Anthropic, Groq, NVIDIA, and local models
14
+ - **Tool Calling** — terminal, filesystem, git, patch, search, web, todo, process, browser automation (Playwright), AWS
15
+ - **MCP Support** — Model Context Protocol client with multiple servers
16
+ - **Session Management** — persistent sessions stored in SQLite; resume with `/session`
17
+ - **Snapshot / Undo** — git-stash-based snapshots for safe experimentation
18
+ - **Subagents & Plugins** — parallel task execution and `@syntax` subagents, plugin loader
19
+ - **Permission System** — per-tool approval rules with interactive modal prompts
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ git clone https://github.com/rnaveenpatil/depression.ai.git
25
+ cd depression.ai
26
+ pip install -e .
27
+ ```
28
+
29
+ Optional extras:
30
+
31
+ ```bash
32
+ # Browser automation tool (Playwright)
33
+ pip install -e ".[browser]"
34
+ playwright install chromium
35
+
36
+ # Development (pytest, ruff, mypy)
37
+ pip install -e ".[dev]"
38
+ ```
39
+
40
+ ## Quick Start
41
+
42
+ ```bash
43
+ # Launch the TUI
44
+ depression
45
+
46
+ # Equivalent forms
47
+ python -m agent.tui
48
+ python -m agent.tui.run
49
+ ```
50
+
51
+ Before first use you must connect an LLM endpoint (see [Runtime LLM Configuration](#runtime-llm-configuration)
52
+ below). The TUI also offers an **LLM CONNECTION** panel to set base URL, API key,
53
+ and model interactively.
54
+
55
+ ## Runtime LLM Configuration
56
+
57
+ The agent is deliberately provider-agnostic: there are **no hardcoded API keys**.
58
+ Configure a runtime provider via environment variables or the in-TUI connection
59
+ panel. Copy `.env.example` to `.env`:
60
+
61
+ ```bash
62
+ # User runtime LLM connection (never commit real secrets)
63
+ DEPRESSION_PROVIDER=custom
64
+ DEPRESSION_BASE_URL=https://api.example.com/v1
65
+ DEPRESSION_API_KEY=
66
+ DEPRESSION_MODEL=
67
+
68
+ # AWS credentials entered by /aws panel
69
+ AWS_ACCESS_KEY_ID=
70
+ AWS_SECRET_ACCESS_KEY=
71
+ AWS_DEFAULT_REGION=ap-south-1
72
+ ```
73
+
74
+ ## Configuration
75
+
76
+ Layered config (project overrides user): `.agent/config.json` in your project,
77
+ or `~/.agent/config.json` globally.
78
+
79
+ ```json
80
+ {
81
+ "llm": {
82
+ "provider": "custom",
83
+ "model": "your-model-id"
84
+ }
85
+ }
86
+ ```
87
+
88
+ Write a default config with `depression --init-config` (CLI bootstrap) or edit
89
+ `.agent/config.json` directly.
90
+
91
+ ## Slash Commands
92
+
93
+ Available inside the TUI input box:
94
+
95
+ | Command | Description |
96
+ |---------|-------------|
97
+ | `/help` | Show help |
98
+ | `/plan` | Switch to Plan mode (read-only analysis) |
99
+ | `/build` | Switch to Build mode (full execution) |
100
+ | `/auto` | Automatic Plan -> Build loop |
101
+ | `/snapshot [message]` | Create a git-stash snapshot |
102
+ | `/undo` | Restore the last snapshot |
103
+ | `/model` · `/provider` | View / switch model or provider |
104
+ | `/session` | Show / resume sessions |
105
+ | `/compact` | Compact conversation context |
106
+ | `/tools` · `/permissions` | List tools and permission rules |
107
+ | `/plugins` | Load plugins |
108
+ | `/metrics` · `/cost` · `/tokens` | Usage metrics and cost |
109
+ | `/config` · `/set` | View / set config values |
110
+ | `/exit` | Quit (also `Ctrl+Q`) |
111
+
112
+ ## TUI
113
+
114
+ - **Mode toggle**: `Ctrl+P` cycles Plan → Build
115
+ - **Permissions**: tool requests surface as interactive modal prompts (accept / deny)
116
+ - **AWS panel**: manage AWS credentials from inside the UI
117
+ - **Live panes**: thinking indicator, todo list, tool-call cards, diff view, sidebar
118
+
119
+ ## CLI Flags
120
+
121
+ The `depression` entry point parses the following flags (used in CLI bootstrap
122
+ and overridable before the TUI starts):
123
+
124
+ ```bash
125
+ depression -p /path/to/project # project directory
126
+ depression -m MODEL # override model
127
+ depression --provider PROVIDER # override provider
128
+ depression --yolo # auto-approve all tool calls
129
+ depression --session <id> # resume session
130
+ depression --new-session # force a fresh session
131
+ depression --max-turns N # agent loop limit
132
+ depression --no-mcp # disable MCP
133
+ depression -v / -q # verbose / quiet
134
+ depression --skip-tui # (reserved) CLI-only mode
135
+ ```
136
+
137
+ ## Project Structure
138
+
139
+ ```
140
+ src/
141
+ └── agent/
142
+ ├── agent/ # Plan + Build dual-agent orchestration, planner, loop
143
+ ├── cli/ # Classic CLI bootstrap (argparse, prompt-toolkit UI, slash commands)
144
+ ├── config/ # Layered configuration loader
145
+ ├── context/ # Context manager, compaction, file indexing
146
+ ├── llm/ # Runtime LLM registry + provider adapters, rate limiter
147
+ ├── mcp/ # Model Context Protocol client + AWS config
148
+ ├── permissions/ # Tool permission policy & approval
149
+ ├── plugins/ # Plugin loader (builtin)
150
+ ├── project/ # Workspace management
151
+ ├── session/ # Session persistence
152
+ ├── storage/ # SQLite database + cache
153
+ ├── tools/ # Built-in tools (terminal, git, filesystem, web, browser, AWS, ...)
154
+ ├── tui/ # Textual terminal UI (app, widgets, theme)
155
+ └── utils/ # Logging, platform, env helpers, redaction
156
+ ```
157
+
158
+ ## Development
159
+
160
+ ```bash
161
+ pip install -e ".[dev]"
162
+ pytest # run test suite
163
+ ruff check src/ # lint
164
+ ruff format --check src/ # formatting
165
+ mypy src/ # type checking
166
+ ```
167
+
168
+ ## License
169
+
170
+ ISC License.
@@ -0,0 +1,70 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "depression.ai"
7
+ version = "1.0.0"
8
+ description = "AI agent for everything — development, deployment, and analysis"
9
+ readme = "README.md"
10
+ license = "ISC"
11
+ authors = [{name = "rnaveenpatil", email = "rnaveenpatil@example.com"}]
12
+ keywords = ["ai", "cli", "agent", "tui", "textual", "llm"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Developers",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ ]
21
+ requires-python = ">=3.10"
22
+ dependencies = [
23
+ "httpx>=0.25.0",
24
+ "pyyaml>=6.0",
25
+ "prompt-toolkit>=3.0",
26
+ "textual>=0.80.0",
27
+ ]
28
+
29
+ [project.optional-dependencies]
30
+ browser = [
31
+ "playwright>=1.40.0",
32
+ ]
33
+ tui = [
34
+ "textual-dev>=1.0.0",
35
+ ]
36
+ dev = [
37
+ "pytest>=7.0",
38
+ "pytest-asyncio>=0.21",
39
+ "ruff>=0.1.0",
40
+ "mypy>=1.0",
41
+ ]
42
+
43
+ [project.scripts]
44
+ depression = "agent.main:main"
45
+ depression_ai = "agent.main:main"
46
+ depression-tui = "agent.tui.run:main"
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/rnaveenpatil/depression.ai"
50
+ Repository = "https://github.com/rnaveenpatil/depression.ai"
51
+ Issues = "https://github.com/rnaveenpatil/depression.ai/issues"
52
+
53
+ [tool.setuptools.packages.find]
54
+ where = ["src"]
55
+ exclude = ["tests*", "*.depression*"]
56
+
57
+ [tool.pytest.ini_options]
58
+ asyncio_mode = "auto"
59
+ testpaths = ["tests"]
60
+
61
+ [tool.ruff]
62
+ line-length = 100
63
+ target-version = "py310"
64
+ src = ["src"]
65
+
66
+ [tool.mypy]
67
+ python_version = "3.10"
68
+ warn_return_any = true
69
+ warn_unused_configs = true
70
+ disallow_untyped_defs = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,39 @@
1
+ """
2
+ CLI Agent - Advanced Agentic AI CLI
3
+
4
+ Top-level package exports.
5
+ """
6
+
7
+ from agent.agent import Agent
8
+ from agent.config import Config, get_config, load_config
9
+ from agent.context import ContextManager
10
+ from agent.permissions import PermissionManager
11
+ from agent.session import SessionManager, Session, SessionState
12
+ from agent.storage import Database, Cache
13
+ from agent.project import WorkspaceManager
14
+ from agent.mcp import MCPClient
15
+ from agent.plugins import PluginLoader
16
+ from agent.tools import ToolRegistry, BaseTool
17
+ from agent.llm import get_llm_registry
18
+
19
+ __all__ = [
20
+ "Agent",
21
+ "Config",
22
+ "get_config",
23
+ "load_config",
24
+ "ContextManager",
25
+ "PermissionManager",
26
+ "SessionManager",
27
+ "Session",
28
+ "SessionState",
29
+ "Database",
30
+ "Cache",
31
+ "WorkspaceManager",
32
+ "MCPClient",
33
+ "PluginLoader",
34
+ "ToolRegistry",
35
+ "BaseTool",
36
+ "get_llm_registry",
37
+ ]
38
+
39
+ __version__ = "1.0.0"
@@ -0,0 +1,49 @@
1
+ """
2
+ Agent Module - Core Agent Implementation.
3
+
4
+ Exports:
5
+ Agent -- Main orchestrator class
6
+ AgentStatus -- Agent status enum
7
+ AgentContext -- Runtime context dataclass
8
+ Planner -- Task planner
9
+ AgentLoop -- Execution loop
10
+ SubAgentManager -- Sub-agent management
11
+ """
12
+
13
+ from agent.agent.agent import Agent, AgentStatus, AgentContext
14
+ from agent.agent.planner import Planner, Plan, Task, TaskStatus, Priority
15
+ from agent.agent.loop import AgentLoop, LoopState, LoopContext
16
+ from agent.agent.subagent import (
17
+ SubAgentManager,
18
+ SubAgent,
19
+ SubAgentRole,
20
+ SubAgentConfig,
21
+ BUILTIN_SUBAGENTS,
22
+ )
23
+
24
+ # Backcompat aliases for legacy imports.
25
+ SubAgentTask = SubAgent
26
+ SubAgentType = SubAgentRole
27
+ SubAgentStatus = str
28
+
29
+ __all__ = [
30
+ "Agent",
31
+ "AgentStatus",
32
+ "AgentContext",
33
+ "Planner",
34
+ "Plan",
35
+ "Task",
36
+ "TaskStatus",
37
+ "Priority",
38
+ "AgentLoop",
39
+ "LoopState",
40
+ "LoopContext",
41
+ "SubAgentManager",
42
+ "SubAgent",
43
+ "SubAgentRole",
44
+ "SubAgentConfig",
45
+ "BUILTIN_SUBAGENTS",
46
+ "SubAgentTask",
47
+ "SubAgentType",
48
+ "SubAgentStatus",
49
+ ]