stravinsky 0.2.38__py3-none-any.whl → 0.2.52__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/auth/token_refresh.py +130 -0
- mcp_bridge/hooks/__init__.py +18 -1
- mcp_bridge/hooks/manager.py +50 -0
- mcp_bridge/hooks/parallel_enforcer.py +127 -0
- mcp_bridge/hooks/pre_compact.py +224 -0
- mcp_bridge/hooks/preemptive_compaction.py +81 -7
- mcp_bridge/hooks/session_idle.py +116 -0
- mcp_bridge/native_hooks/todo_delegation.py +54 -0
- mcp_bridge/prompts/__init__.py +3 -1
- mcp_bridge/prompts/dewey.py +30 -20
- mcp_bridge/prompts/explore.py +46 -8
- mcp_bridge/prompts/planner.py +222 -0
- mcp_bridge/prompts/stravinsky.py +107 -28
- mcp_bridge/server.py +64 -9
- mcp_bridge/server_tools.py +159 -32
- mcp_bridge/tools/agent_manager.py +199 -111
- mcp_bridge/tools/background_tasks.py +2 -1
- mcp_bridge/tools/model_invoke.py +194 -46
- {stravinsky-0.2.38.dist-info → stravinsky-0.2.52.dist-info}/METADATA +1 -1
- {stravinsky-0.2.38.dist-info → stravinsky-0.2.52.dist-info}/RECORD +23 -17
- {stravinsky-0.2.38.dist-info → stravinsky-0.2.52.dist-info}/WHEEL +0 -0
- {stravinsky-0.2.38.dist-info → stravinsky-0.2.52.dist-info}/entry_points.txt +0 -0
mcp_bridge/server_tools.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from mcp.types import Tool, Prompt
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
def get_tool_definitions() -> List[Tool]:
|
|
5
6
|
"""Return all Tool definitions for the Stravinsky MCP server."""
|
|
6
7
|
return [
|
|
@@ -37,8 +38,8 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
37
38
|
},
|
|
38
39
|
"model": {
|
|
39
40
|
"type": "string",
|
|
40
|
-
"description": "Gemini model to use (default: gemini-
|
|
41
|
-
"default": "gemini-
|
|
41
|
+
"description": "Gemini model to use (default: gemini-3-flash)",
|
|
42
|
+
"default": "gemini-3-flash",
|
|
42
43
|
},
|
|
43
44
|
"temperature": {
|
|
44
45
|
"type": "number",
|
|
@@ -55,6 +56,24 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
55
56
|
"description": "Tokens reserved for internal reasoning (if model supports it)",
|
|
56
57
|
"default": 0,
|
|
57
58
|
},
|
|
59
|
+
"agent_context": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"description": "Optional agent metadata for logging (agent_type, task_id, description)",
|
|
62
|
+
"properties": {
|
|
63
|
+
"agent_type": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Type of agent (explore, delphi, frontend, etc.)",
|
|
66
|
+
},
|
|
67
|
+
"task_id": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "Background task ID if running as agent",
|
|
70
|
+
},
|
|
71
|
+
"description": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "Short description of what the agent is doing",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
58
77
|
},
|
|
59
78
|
"required": ["prompt"],
|
|
60
79
|
},
|
|
@@ -76,8 +95,8 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
76
95
|
},
|
|
77
96
|
"model": {
|
|
78
97
|
"type": "string",
|
|
79
|
-
"description": "OpenAI model to use (default: gpt-
|
|
80
|
-
"default": "gpt-
|
|
98
|
+
"description": "OpenAI model to use (default: gpt-5.2-codex)",
|
|
99
|
+
"default": "gpt-5.2-codex",
|
|
81
100
|
},
|
|
82
101
|
"temperature": {
|
|
83
102
|
"type": "number",
|
|
@@ -94,6 +113,24 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
94
113
|
"description": "Tokens reserved for internal reasoning (e.g. o1 / o3)",
|
|
95
114
|
"default": 0,
|
|
96
115
|
},
|
|
116
|
+
"agent_context": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"description": "Optional agent metadata for logging (agent_type, task_id, description)",
|
|
119
|
+
"properties": {
|
|
120
|
+
"agent_type": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "Type of agent (explore, delphi, frontend, etc.)",
|
|
123
|
+
},
|
|
124
|
+
"task_id": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "Background task ID if running as agent",
|
|
127
|
+
},
|
|
128
|
+
"description": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"description": "Short description of what the agent is doing",
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
97
134
|
},
|
|
98
135
|
"required": ["prompt"],
|
|
99
136
|
},
|
|
@@ -123,7 +160,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
123
160
|
"type": "object",
|
|
124
161
|
"properties": {
|
|
125
162
|
"file_path": {"type": "string", "description": "Path to file to analyze"},
|
|
126
|
-
"severity": {
|
|
163
|
+
"severity": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"description": "Filter: error, warning, all",
|
|
166
|
+
"default": "all",
|
|
167
|
+
},
|
|
127
168
|
},
|
|
128
169
|
"required": ["file_path"],
|
|
129
170
|
},
|
|
@@ -135,7 +176,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
135
176
|
"type": "object",
|
|
136
177
|
"properties": {
|
|
137
178
|
"pattern": {"type": "string", "description": "ast-grep pattern"},
|
|
138
|
-
"directory": {
|
|
179
|
+
"directory": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"description": "Directory to search",
|
|
182
|
+
"default": ".",
|
|
183
|
+
},
|
|
139
184
|
"language": {"type": "string", "description": "Filter by language"},
|
|
140
185
|
},
|
|
141
186
|
"required": ["pattern"],
|
|
@@ -148,7 +193,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
148
193
|
"type": "object",
|
|
149
194
|
"properties": {
|
|
150
195
|
"pattern": {"type": "string", "description": "Search pattern (regex)"},
|
|
151
|
-
"directory": {
|
|
196
|
+
"directory": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"description": "Directory to search",
|
|
199
|
+
"default": ".",
|
|
200
|
+
},
|
|
152
201
|
"file_pattern": {"type": "string", "description": "Glob filter (e.g. *.py)"},
|
|
153
202
|
},
|
|
154
203
|
"required": ["pattern"],
|
|
@@ -161,7 +210,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
161
210
|
"type": "object",
|
|
162
211
|
"properties": {
|
|
163
212
|
"pattern": {"type": "string", "description": "Glob pattern (e.g. **/*.py)"},
|
|
164
|
-
"directory": {
|
|
213
|
+
"directory": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "Base directory",
|
|
216
|
+
"default": ".",
|
|
217
|
+
},
|
|
165
218
|
},
|
|
166
219
|
"required": ["pattern"],
|
|
167
220
|
},
|
|
@@ -233,11 +286,14 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
233
286
|
inputSchema={
|
|
234
287
|
"type": "object",
|
|
235
288
|
"properties": {
|
|
236
|
-
"prompt": {
|
|
289
|
+
"prompt": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"description": "The prompt for the background agent",
|
|
292
|
+
},
|
|
237
293
|
"model": {
|
|
238
|
-
"type": "string",
|
|
294
|
+
"type": "string",
|
|
239
295
|
"description": "Model to use (gemini-3-flash or gpt-4o)",
|
|
240
|
-
"default": "gemini-3-flash"
|
|
296
|
+
"default": "gemini-3-flash",
|
|
241
297
|
},
|
|
242
298
|
},
|
|
243
299
|
"required": ["prompt"],
|
|
@@ -273,13 +329,19 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
273
329
|
inputSchema={
|
|
274
330
|
"type": "object",
|
|
275
331
|
"properties": {
|
|
276
|
-
"prompt": {
|
|
332
|
+
"prompt": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"description": "The task for the agent to perform",
|
|
335
|
+
},
|
|
277
336
|
"agent_type": {
|
|
278
337
|
"type": "string",
|
|
279
338
|
"description": "Agent type: explore, dewey, frontend (gemini-3-pro), delphi (gpt-5.2-medium), document_writer, multimodal",
|
|
280
339
|
"default": "explore",
|
|
281
340
|
},
|
|
282
|
-
"description": {
|
|
341
|
+
"description": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"description": "Short description for status display",
|
|
344
|
+
},
|
|
283
345
|
"model": {
|
|
284
346
|
"type": "string",
|
|
285
347
|
"description": "Model: gemini-3-flash (default) or claude",
|
|
@@ -306,8 +368,14 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
306
368
|
"type": "object",
|
|
307
369
|
"properties": {
|
|
308
370
|
"task_id": {"type": "string", "description": "The ID of the task to retry"},
|
|
309
|
-
"new_prompt": {
|
|
310
|
-
|
|
371
|
+
"new_prompt": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"description": "Optional refined prompt for the retry",
|
|
374
|
+
},
|
|
375
|
+
"new_timeout": {
|
|
376
|
+
"type": "integer",
|
|
377
|
+
"description": "Optional new timeout in seconds",
|
|
378
|
+
},
|
|
311
379
|
},
|
|
312
380
|
"required": ["task_id"],
|
|
313
381
|
},
|
|
@@ -319,7 +387,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
319
387
|
"type": "object",
|
|
320
388
|
"properties": {
|
|
321
389
|
"task_id": {"type": "string", "description": "The agent task ID"},
|
|
322
|
-
"block": {
|
|
390
|
+
"block": {
|
|
391
|
+
"type": "boolean",
|
|
392
|
+
"description": "Wait for completion",
|
|
393
|
+
"default": False,
|
|
394
|
+
},
|
|
323
395
|
},
|
|
324
396
|
"required": ["task_id"],
|
|
325
397
|
},
|
|
@@ -350,7 +422,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
350
422
|
"type": "object",
|
|
351
423
|
"properties": {
|
|
352
424
|
"task_id": {"type": "string", "description": "The agent task ID"},
|
|
353
|
-
"lines": {
|
|
425
|
+
"lines": {
|
|
426
|
+
"type": "integer",
|
|
427
|
+
"description": "Number of recent lines to show",
|
|
428
|
+
"default": 20,
|
|
429
|
+
},
|
|
354
430
|
},
|
|
355
431
|
"required": ["task_id"],
|
|
356
432
|
},
|
|
@@ -363,7 +439,10 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
363
439
|
"properties": {
|
|
364
440
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
365
441
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
366
|
-
"character": {
|
|
442
|
+
"character": {
|
|
443
|
+
"type": "integer",
|
|
444
|
+
"description": "Character position (0-indexed)",
|
|
445
|
+
},
|
|
367
446
|
},
|
|
368
447
|
"required": ["file_path", "line", "character"],
|
|
369
448
|
},
|
|
@@ -376,7 +455,10 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
376
455
|
"properties": {
|
|
377
456
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
378
457
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
379
|
-
"character": {
|
|
458
|
+
"character": {
|
|
459
|
+
"type": "integer",
|
|
460
|
+
"description": "Character position (0-indexed)",
|
|
461
|
+
},
|
|
380
462
|
},
|
|
381
463
|
"required": ["file_path", "line", "character"],
|
|
382
464
|
},
|
|
@@ -389,8 +471,15 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
389
471
|
"properties": {
|
|
390
472
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
391
473
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
392
|
-
"character": {
|
|
393
|
-
|
|
474
|
+
"character": {
|
|
475
|
+
"type": "integer",
|
|
476
|
+
"description": "Character position (0-indexed)",
|
|
477
|
+
},
|
|
478
|
+
"include_declaration": {
|
|
479
|
+
"type": "boolean",
|
|
480
|
+
"description": "Include the declaration itself",
|
|
481
|
+
"default": True,
|
|
482
|
+
},
|
|
394
483
|
},
|
|
395
484
|
"required": ["file_path", "line", "character"],
|
|
396
485
|
},
|
|
@@ -412,8 +501,15 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
412
501
|
inputSchema={
|
|
413
502
|
"type": "object",
|
|
414
503
|
"properties": {
|
|
415
|
-
"query": {
|
|
416
|
-
|
|
504
|
+
"query": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"description": "Symbol name to search for (fuzzy match)",
|
|
507
|
+
},
|
|
508
|
+
"directory": {
|
|
509
|
+
"type": "string",
|
|
510
|
+
"description": "Workspace directory",
|
|
511
|
+
"default": ".",
|
|
512
|
+
},
|
|
417
513
|
},
|
|
418
514
|
"required": ["query"],
|
|
419
515
|
},
|
|
@@ -426,7 +522,10 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
426
522
|
"properties": {
|
|
427
523
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
428
524
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
429
|
-
"character": {
|
|
525
|
+
"character": {
|
|
526
|
+
"type": "integer",
|
|
527
|
+
"description": "Character position (0-indexed)",
|
|
528
|
+
},
|
|
430
529
|
},
|
|
431
530
|
"required": ["file_path", "line", "character"],
|
|
432
531
|
},
|
|
@@ -439,9 +538,16 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
439
538
|
"properties": {
|
|
440
539
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
441
540
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
442
|
-
"character": {
|
|
541
|
+
"character": {
|
|
542
|
+
"type": "integer",
|
|
543
|
+
"description": "Character position (0-indexed)",
|
|
544
|
+
},
|
|
443
545
|
"new_name": {"type": "string", "description": "New name for the symbol"},
|
|
444
|
-
"dry_run": {
|
|
546
|
+
"dry_run": {
|
|
547
|
+
"type": "boolean",
|
|
548
|
+
"description": "Preview changes without applying",
|
|
549
|
+
"default": True,
|
|
550
|
+
},
|
|
445
551
|
},
|
|
446
552
|
"required": ["file_path", "line", "character", "new_name"],
|
|
447
553
|
},
|
|
@@ -454,7 +560,10 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
454
560
|
"properties": {
|
|
455
561
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
456
562
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
457
|
-
"character": {
|
|
563
|
+
"character": {
|
|
564
|
+
"type": "integer",
|
|
565
|
+
"description": "Character position (0-indexed)",
|
|
566
|
+
},
|
|
458
567
|
},
|
|
459
568
|
"required": ["file_path", "line", "character"],
|
|
460
569
|
},
|
|
@@ -473,17 +582,35 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
473
582
|
inputSchema={
|
|
474
583
|
"type": "object",
|
|
475
584
|
"properties": {
|
|
476
|
-
"pattern": {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
"
|
|
585
|
+
"pattern": {
|
|
586
|
+
"type": "string",
|
|
587
|
+
"description": "ast-grep pattern to search (e.g., 'console.log($A)')",
|
|
588
|
+
},
|
|
589
|
+
"replacement": {
|
|
590
|
+
"type": "string",
|
|
591
|
+
"description": "Replacement pattern (e.g., 'logger.debug($A)')",
|
|
592
|
+
},
|
|
593
|
+
"directory": {
|
|
594
|
+
"type": "string",
|
|
595
|
+
"description": "Directory to search in",
|
|
596
|
+
"default": ".",
|
|
597
|
+
},
|
|
598
|
+
"language": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"description": "Filter by language (typescript, python, etc.)",
|
|
601
|
+
},
|
|
602
|
+
"dry_run": {
|
|
603
|
+
"type": "boolean",
|
|
604
|
+
"description": "Preview changes without applying",
|
|
605
|
+
"default": True,
|
|
606
|
+
},
|
|
481
607
|
},
|
|
482
608
|
"required": ["pattern", "replacement"],
|
|
483
609
|
},
|
|
484
610
|
),
|
|
485
611
|
]
|
|
486
612
|
|
|
613
|
+
|
|
487
614
|
def get_prompt_definitions() -> List[Prompt]:
|
|
488
615
|
"""Return all Prompt definitions for the Stravinsky MCP server."""
|
|
489
616
|
return [
|