stravinsky 0.2.52__py3-none-any.whl → 0.2.67__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 stravinsky might be problematic. Click here for more details.
- mcp_bridge/__init__.py +1 -1
- mcp_bridge/cli/__init__.py +6 -0
- mcp_bridge/cli/install_hooks.py +1265 -0
- mcp_bridge/cli/session_report.py +585 -0
- mcp_bridge/hooks/HOOKS_SETTINGS.json +175 -0
- mcp_bridge/hooks/README.md +215 -0
- mcp_bridge/hooks/__init__.py +117 -63
- mcp_bridge/hooks/edit_recovery.py +42 -37
- mcp_bridge/hooks/git_noninteractive.py +89 -0
- mcp_bridge/hooks/keyword_detector.py +30 -0
- mcp_bridge/hooks/notification_hook.py +103 -0
- mcp_bridge/hooks/parallel_execution.py +111 -0
- mcp_bridge/hooks/pre_compact.py +82 -183
- mcp_bridge/hooks/rules_injector.py +507 -0
- mcp_bridge/hooks/session_notifier.py +125 -0
- mcp_bridge/{native_hooks → hooks}/stravinsky_mode.py +51 -16
- mcp_bridge/hooks/subagent_stop.py +98 -0
- mcp_bridge/hooks/task_validator.py +73 -0
- mcp_bridge/hooks/tmux_manager.py +141 -0
- mcp_bridge/hooks/todo_continuation.py +90 -0
- mcp_bridge/hooks/todo_delegation.py +88 -0
- mcp_bridge/hooks/tool_messaging.py +164 -0
- mcp_bridge/hooks/truncator.py +21 -17
- mcp_bridge/prompts/multimodal.py +24 -3
- mcp_bridge/server.py +12 -1
- mcp_bridge/server_tools.py +5 -0
- mcp_bridge/tools/agent_manager.py +30 -11
- mcp_bridge/tools/code_search.py +81 -9
- mcp_bridge/tools/lsp/tools.py +6 -2
- mcp_bridge/tools/model_invoke.py +76 -1
- mcp_bridge/tools/templates.py +32 -18
- stravinsky-0.2.67.dist-info/METADATA +284 -0
- {stravinsky-0.2.52.dist-info → stravinsky-0.2.67.dist-info}/RECORD +36 -23
- stravinsky-0.2.67.dist-info/entry_points.txt +5 -0
- mcp_bridge/native_hooks/edit_recovery.py +0 -46
- mcp_bridge/native_hooks/todo_delegation.py +0 -54
- mcp_bridge/native_hooks/truncator.py +0 -23
- stravinsky-0.2.52.dist-info/METADATA +0 -204
- stravinsky-0.2.52.dist-info/entry_points.txt +0 -3
- /mcp_bridge/{native_hooks → hooks}/context.py +0 -0
- {stravinsky-0.2.52.dist-info → stravinsky-0.2.67.dist-info}/WHEEL +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
PostToolUse hook for TodoWrite: Enforces parallel delegation.
|
|
4
|
-
|
|
5
|
-
After TodoWrite is called, this hook injects a reminder to spawn
|
|
6
|
-
parallel Task agents for all independent TODOs.
|
|
7
|
-
"""
|
|
8
|
-
import json
|
|
9
|
-
import sys
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def main():
|
|
13
|
-
# Read hook input from stdin
|
|
14
|
-
try:
|
|
15
|
-
hook_input = json.load(sys.stdin)
|
|
16
|
-
except (json.JSONDecodeError, EOFError):
|
|
17
|
-
return 0
|
|
18
|
-
|
|
19
|
-
tool_name = hook_input.get("tool_name", "")
|
|
20
|
-
|
|
21
|
-
if tool_name != "TodoWrite":
|
|
22
|
-
return 0
|
|
23
|
-
|
|
24
|
-
# Get the todos that were just written
|
|
25
|
-
tool_input = hook_input.get("tool_input", {})
|
|
26
|
-
todos = tool_input.get("todos", [])
|
|
27
|
-
|
|
28
|
-
# Count pending todos
|
|
29
|
-
pending_count = sum(1 for t in todos if t.get("status") == "pending")
|
|
30
|
-
|
|
31
|
-
if pending_count < 2:
|
|
32
|
-
return 0
|
|
33
|
-
|
|
34
|
-
# Output the parallel delegation reminder
|
|
35
|
-
reminder = f"""
|
|
36
|
-
[PARALLEL DELEGATION REQUIRED]
|
|
37
|
-
|
|
38
|
-
You just created {pending_count} pending TODOs. Before your NEXT response:
|
|
39
|
-
|
|
40
|
-
1. Identify which TODOs are INDEPENDENT (can run simultaneously)
|
|
41
|
-
2. For EACH independent TODO, spawn a Task agent:
|
|
42
|
-
Task(subagent_type="Explore", prompt="[TODO details]", run_in_background=true)
|
|
43
|
-
3. Fire ALL Task calls in ONE response - do NOT wait between them
|
|
44
|
-
4. Do NOT mark any TODO as in_progress until agents return
|
|
45
|
-
|
|
46
|
-
WRONG: Create TODO list -> Mark TODO 1 in_progress -> Work -> Complete -> Repeat
|
|
47
|
-
CORRECT: Create TODO list -> Spawn Task for each -> Collect results -> Mark complete
|
|
48
|
-
"""
|
|
49
|
-
print(reminder)
|
|
50
|
-
return 0
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if __name__ == "__main__":
|
|
54
|
-
sys.exit(main())
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import sys
|
|
3
|
-
import json
|
|
4
|
-
|
|
5
|
-
MAX_CHARS = 30000
|
|
6
|
-
|
|
7
|
-
def main():
|
|
8
|
-
try:
|
|
9
|
-
data = json.load(sys.stdin)
|
|
10
|
-
tool_response = data.get("tool_response", "")
|
|
11
|
-
except Exception:
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
if len(tool_response) > MAX_CHARS:
|
|
15
|
-
header = f"[TRUNCATED - {len(tool_response)} chars reduced to {MAX_CHARS}]\n"
|
|
16
|
-
footer = "\n...[TRUNCATED]"
|
|
17
|
-
truncated = tool_response[:MAX_CHARS]
|
|
18
|
-
print(header + truncated + footer)
|
|
19
|
-
else:
|
|
20
|
-
print(tool_response)
|
|
21
|
-
|
|
22
|
-
if __name__ == "__main__":
|
|
23
|
-
main()
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: stravinsky
|
|
3
|
-
Version: 0.2.52
|
|
4
|
-
Summary: MCP Bridge for Claude Code with Multi-Model Support. Install globally: claude mcp add --scope user stravinsky -- uvx stravinsky. Add to CLAUDE.md: See https://pypi.org/project/stravinsky/
|
|
5
|
-
Project-URL: Repository, https://github.com/GratefulDave/stravinsky
|
|
6
|
-
Project-URL: Issues, https://github.com/GratefulDave/stravinsky/issues
|
|
7
|
-
Author: Stravinsky Team
|
|
8
|
-
License: MIT
|
|
9
|
-
Keywords: claude,gemini,mcp,oauth,openai
|
|
10
|
-
Requires-Python: >=3.11
|
|
11
|
-
Requires-Dist: aiofiles>=23.1.0
|
|
12
|
-
Requires-Dist: cryptography>=41.0.0
|
|
13
|
-
Requires-Dist: google-auth-oauthlib>=1.0.0
|
|
14
|
-
Requires-Dist: google-auth>=2.20.0
|
|
15
|
-
Requires-Dist: httpx>=0.24.0
|
|
16
|
-
Requires-Dist: jedi>=0.19.2
|
|
17
|
-
Requires-Dist: keyring>=25.7.0
|
|
18
|
-
Requires-Dist: mcp>=1.2.1
|
|
19
|
-
Requires-Dist: openai>=1.0.0
|
|
20
|
-
Requires-Dist: psutil>=5.9.0
|
|
21
|
-
Requires-Dist: pydantic>=2.0.0
|
|
22
|
-
Requires-Dist: python-dotenv>=1.0.0
|
|
23
|
-
Requires-Dist: rich>=13.0.0
|
|
24
|
-
Requires-Dist: ruff>=0.14.10
|
|
25
|
-
Requires-Dist: tenacity>=8.5.0
|
|
26
|
-
Provides-Extra: dev
|
|
27
|
-
Requires-Dist: mypy>=1.10.0; extra == 'dev'
|
|
28
|
-
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
29
|
-
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
30
|
-
Requires-Dist: ruff>=0.4.0; extra == 'dev'
|
|
31
|
-
Description-Content-Type: text/markdown
|
|
32
|
-
|
|
33
|
-
<div align="center">
|
|
34
|
-
<img src="https://raw.githubusercontent.com/GratefulDave/stravinsky/main/assets/logo.png" width="300" alt="Stravinsky Logo">
|
|
35
|
-
<h1>Stravinsky</h1>
|
|
36
|
-
<p><strong>The Avant-Garde MCP Bridge for Claude Code</strong></p>
|
|
37
|
-
<p><em>Movement • Rhythm • Precision</em></p>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## What is Stravinsky?
|
|
43
|
-
|
|
44
|
-
**Multi-model AI orchestration** with OAuth authentication for Claude Code.
|
|
45
|
-
|
|
46
|
-
## Features
|
|
47
|
-
|
|
48
|
-
- 🔐 **OAuth Authentication** - Secure browser-based auth for Google (Gemini) and OpenAI (ChatGPT)
|
|
49
|
-
- 🤖 **Multi-Model Support** - Seamlessly invoke Gemini and GPT models from Claude
|
|
50
|
-
- 🛠️ **31 MCP Tools** - Model invocation, code search, LSP integrations, session management, and more
|
|
51
|
-
- 🧠 **7 Specialized Agents** - Stravinsky (orchestrator), Delphi (advisor), Dewey (documentation), and more
|
|
52
|
-
- 🔄 **Background Tasks** - Spawn parallel agents with full tool access via Claude Code CLI
|
|
53
|
-
- 📝 **LSP Integration** - Full Language Server Protocol support for Python (jedi)
|
|
54
|
-
- 🔍 **AST-Aware Search** - Structural code search and refactoring with ast-grep
|
|
55
|
-
|
|
56
|
-
## Quick Start
|
|
57
|
-
|
|
58
|
-
### Installation
|
|
59
|
-
|
|
60
|
-
**From PyPI (Recommended):**
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
# One-shot with uvx - no installation needed!
|
|
64
|
-
claude mcp add stravinsky -- uvx stravinsky
|
|
65
|
-
|
|
66
|
-
# Or install globally first:
|
|
67
|
-
uv tool install stravinsky
|
|
68
|
-
claude mcp add stravinsky -- stravinsky
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**From Source (for development):**
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
uv tool install --editable /path/to/stravinsky
|
|
75
|
-
claude mcp add stravinsky -- stravinsky
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Authentication
|
|
79
|
-
|
|
80
|
-
````bash
|
|
81
|
-
# Login to Google (Gemini)
|
|
82
|
-
stravinsky-auth login gemini
|
|
83
|
-
|
|
84
|
-
# Login to OpenAI (ChatGPT Plus/Pro required)
|
|
85
|
-
stravinsky-auth login openai
|
|
86
|
-
|
|
87
|
-
# Check status
|
|
88
|
-
stravinsky-auth status
|
|
89
|
-
|
|
90
|
-
# Logout
|
|
91
|
-
stravinsky-auth logout gemini
|
|
92
|
-
|
|
93
|
-
### Slash Commands
|
|
94
|
-
|
|
95
|
-
Slash commands are discovered from:
|
|
96
|
-
- Project-local: `.claude/commands/**/*.md` (recursive)
|
|
97
|
-
- User-global: `~/.claude/commands/**/*.md` (recursive)
|
|
98
|
-
|
|
99
|
-
Commands can be organized in subdirectories (e.g., `.claude/commands/strav/stravinsky.md`).
|
|
100
|
-
|
|
101
|
-
````
|
|
102
|
-
|
|
103
|
-
## Add to Your CLAUDE.md
|
|
104
|
-
|
|
105
|
-
After installing globally, add this to your project's `CLAUDE.md`:
|
|
106
|
-
|
|
107
|
-
```markdown
|
|
108
|
-
## Stravinsky MCP (Parallel Agents)
|
|
109
|
-
|
|
110
|
-
Use Stravinsky MCP tools. **DEFAULT: spawn parallel agents for multi-step tasks.**
|
|
111
|
-
|
|
112
|
-
### Agent Tools
|
|
113
|
-
|
|
114
|
-
- `agent_spawn(prompt, agent_type, description)` - Spawn background agent with full tool access
|
|
115
|
-
- `agent_output(task_id, block)` - Get results (block=True to wait)
|
|
116
|
-
- `agent_progress(task_id)` - Check real-time progress
|
|
117
|
-
- `agent_list()` - Overview of all running agents
|
|
118
|
-
- `agent_cancel(task_id)` - Stop a running agent
|
|
119
|
-
|
|
120
|
-
### Agent Types
|
|
121
|
-
|
|
122
|
-
- `explore` - Codebase search, "where is X?" questions
|
|
123
|
-
- `dewey` - Documentation research, implementation examples
|
|
124
|
-
- `frontend` - UI/UX work, component design
|
|
125
|
-
- `delphi` - Strategic advice, architecture review
|
|
126
|
-
|
|
127
|
-
### Parallel Execution (MANDATORY)
|
|
128
|
-
|
|
129
|
-
For ANY task with 2+ independent steps:
|
|
130
|
-
|
|
131
|
-
1. **Immediately use agent_spawn** for each independent component
|
|
132
|
-
2. Fire all agents simultaneously, don't wait
|
|
133
|
-
3. Monitor with agent_progress, collect with agent_output
|
|
134
|
-
|
|
135
|
-
### ULTRATHINK / ULTRAWORK
|
|
136
|
-
|
|
137
|
-
- **ULTRATHINK**: Engage exhaustive deep reasoning, multi-dimensional analysis
|
|
138
|
-
- **ULTRAWORK**: Maximum parallel execution - spawn agents aggressively for every subtask
|
|
139
|
-
````
|
|
140
|
-
|
|
141
|
-
## Tools (31)
|
|
142
|
-
|
|
143
|
-
| Category | Tools |
|
|
144
|
-
| ---------------- | ---------------------------------------------------------------------------------- |
|
|
145
|
-
| **Model Invoke** | `invoke_gemini`, `invoke_openai`, `get_system_health` |
|
|
146
|
-
| **Environment** | `get_project_context`, `task_spawn`, `task_status`, `task_list` |
|
|
147
|
-
| **Agents** | `agent_spawn`, `agent_output`, `agent_cancel`, `agent_list`, `agent_progress` |
|
|
148
|
-
| **Code Search** | `ast_grep_search`, `ast_grep_replace`, `grep_search`, `glob_files` |
|
|
149
|
-
| **LSP** | `lsp_diagnostics`, `lsp_hover`, `lsp_goto_definition`, `lsp_find_references`, etc. |
|
|
150
|
-
| **Sessions** | `session_list`, `session_read`, `session_search` |
|
|
151
|
-
| **Skills** | `skill_list`, `skill_get` |
|
|
152
|
-
|
|
153
|
-
## Agent Prompts (7)
|
|
154
|
-
|
|
155
|
-
| Prompt | Purpose |
|
|
156
|
-
| ----------------- | ------------------------------------------------------------- |
|
|
157
|
-
| `stravinsky` | Task orchestration, planning, and goal-oriented execution. |
|
|
158
|
-
| `delphi` | Strategic technical advisor (GPT-based) for hard debugging. |
|
|
159
|
-
| `dewey` | Documentation and multi-repository research specialist. |
|
|
160
|
-
| `explore` | Specialized for codebase-wide search and structural analysis. |
|
|
161
|
-
| `frontend` | UI/UX Engineer (Gemini-optimized) for component prototyping. |
|
|
162
|
-
| `document_writer` | Technical documentation and specification writer. |
|
|
163
|
-
| `multimodal` | Visual analysis expert for UI screenshots and diagrams. |
|
|
164
|
-
|
|
165
|
-
## Development
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
# Install in development mode
|
|
169
|
-
uv pip install -e .
|
|
170
|
-
|
|
171
|
-
# Run server
|
|
172
|
-
stravinsky
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Project Structure
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
stravinsky/
|
|
179
|
-
├── mcp_bridge/ # Python MCP server
|
|
180
|
-
│ ├── server.py # Entry point
|
|
181
|
-
│ ├── auth/ # OAuth (Google & OpenAI)
|
|
182
|
-
│ ├── tools/ # Model invoke, search, skills
|
|
183
|
-
│ ├── prompts/ # Agent system prompts
|
|
184
|
-
│ └── config/ # Bridge configuration
|
|
185
|
-
├── pyproject.toml # Build system
|
|
186
|
-
└── README.md # This file
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Troubleshooting
|
|
190
|
-
|
|
191
|
-
### OpenAI "Port 1455 in use"
|
|
192
|
-
|
|
193
|
-
The Codex CLI uses the same port. Stop it with: `killall codex`
|
|
194
|
-
|
|
195
|
-
### OpenAI Authentication Failed
|
|
196
|
-
|
|
197
|
-
- Ensure you have a ChatGPT Plus/Pro subscription
|
|
198
|
-
- Tokens expire occasionally; run `stravinsky-auth login openai` to refresh
|
|
199
|
-
|
|
200
|
-
## License
|
|
201
|
-
|
|
202
|
-
MIT
|
|
203
|
-
|
|
204
|
-
---
|
|
File without changes
|
|
File without changes
|