stravinsky 0.2.40__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/auth/token_refresh.py +130 -0
- 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 -46
- 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/manager.py +50 -0
- mcp_bridge/hooks/notification_hook.py +103 -0
- mcp_bridge/hooks/parallel_enforcer.py +127 -0
- mcp_bridge/hooks/parallel_execution.py +111 -0
- mcp_bridge/hooks/pre_compact.py +123 -0
- mcp_bridge/hooks/preemptive_compaction.py +81 -7
- mcp_bridge/hooks/rules_injector.py +507 -0
- mcp_bridge/hooks/session_idle.py +116 -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/__init__.py +3 -1
- mcp_bridge/prompts/dewey.py +30 -20
- mcp_bridge/prompts/explore.py +46 -8
- mcp_bridge/prompts/multimodal.py +24 -3
- mcp_bridge/prompts/planner.py +222 -0
- mcp_bridge/prompts/stravinsky.py +107 -28
- mcp_bridge/server.py +76 -10
- mcp_bridge/server_tools.py +164 -32
- mcp_bridge/tools/agent_manager.py +203 -96
- mcp_bridge/tools/background_tasks.py +2 -1
- mcp_bridge/tools/code_search.py +81 -9
- mcp_bridge/tools/lsp/tools.py +6 -2
- mcp_bridge/tools/model_invoke.py +270 -47
- mcp_bridge/tools/templates.py +32 -18
- stravinsky-0.2.67.dist-info/METADATA +284 -0
- stravinsky-0.2.67.dist-info/RECORD +76 -0
- stravinsky-0.2.67.dist-info/entry_points.txt +5 -0
- mcp_bridge/native_hooks/edit_recovery.py +0 -46
- mcp_bridge/native_hooks/truncator.py +0 -23
- stravinsky-0.2.40.dist-info/METADATA +0 -204
- stravinsky-0.2.40.dist-info/RECORD +0 -57
- stravinsky-0.2.40.dist-info/entry_points.txt +0 -3
- /mcp_bridge/{native_hooks → hooks}/context.py +0 -0
- {stravinsky-0.2.40.dist-info → stravinsky-0.2.67.dist-info}/WHEEL +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",
|
|
@@ -295,6 +357,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
295
357
|
"description": "Maximum execution time in seconds",
|
|
296
358
|
"default": 300,
|
|
297
359
|
},
|
|
360
|
+
"blocking": {
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"description": "If true, wait for agent completion and return result directly. Recommended for delphi consultations.",
|
|
363
|
+
"default": False,
|
|
364
|
+
},
|
|
298
365
|
},
|
|
299
366
|
"required": ["prompt"],
|
|
300
367
|
},
|
|
@@ -306,8 +373,14 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
306
373
|
"type": "object",
|
|
307
374
|
"properties": {
|
|
308
375
|
"task_id": {"type": "string", "description": "The ID of the task to retry"},
|
|
309
|
-
"new_prompt": {
|
|
310
|
-
|
|
376
|
+
"new_prompt": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"description": "Optional refined prompt for the retry",
|
|
379
|
+
},
|
|
380
|
+
"new_timeout": {
|
|
381
|
+
"type": "integer",
|
|
382
|
+
"description": "Optional new timeout in seconds",
|
|
383
|
+
},
|
|
311
384
|
},
|
|
312
385
|
"required": ["task_id"],
|
|
313
386
|
},
|
|
@@ -319,7 +392,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
319
392
|
"type": "object",
|
|
320
393
|
"properties": {
|
|
321
394
|
"task_id": {"type": "string", "description": "The agent task ID"},
|
|
322
|
-
"block": {
|
|
395
|
+
"block": {
|
|
396
|
+
"type": "boolean",
|
|
397
|
+
"description": "Wait for completion",
|
|
398
|
+
"default": False,
|
|
399
|
+
},
|
|
323
400
|
},
|
|
324
401
|
"required": ["task_id"],
|
|
325
402
|
},
|
|
@@ -350,7 +427,11 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
350
427
|
"type": "object",
|
|
351
428
|
"properties": {
|
|
352
429
|
"task_id": {"type": "string", "description": "The agent task ID"},
|
|
353
|
-
"lines": {
|
|
430
|
+
"lines": {
|
|
431
|
+
"type": "integer",
|
|
432
|
+
"description": "Number of recent lines to show",
|
|
433
|
+
"default": 20,
|
|
434
|
+
},
|
|
354
435
|
},
|
|
355
436
|
"required": ["task_id"],
|
|
356
437
|
},
|
|
@@ -363,7 +444,10 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
363
444
|
"properties": {
|
|
364
445
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
365
446
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
366
|
-
"character": {
|
|
447
|
+
"character": {
|
|
448
|
+
"type": "integer",
|
|
449
|
+
"description": "Character position (0-indexed)",
|
|
450
|
+
},
|
|
367
451
|
},
|
|
368
452
|
"required": ["file_path", "line", "character"],
|
|
369
453
|
},
|
|
@@ -376,7 +460,10 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
376
460
|
"properties": {
|
|
377
461
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
378
462
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
379
|
-
"character": {
|
|
463
|
+
"character": {
|
|
464
|
+
"type": "integer",
|
|
465
|
+
"description": "Character position (0-indexed)",
|
|
466
|
+
},
|
|
380
467
|
},
|
|
381
468
|
"required": ["file_path", "line", "character"],
|
|
382
469
|
},
|
|
@@ -389,8 +476,15 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
389
476
|
"properties": {
|
|
390
477
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
391
478
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
392
|
-
"character": {
|
|
393
|
-
|
|
479
|
+
"character": {
|
|
480
|
+
"type": "integer",
|
|
481
|
+
"description": "Character position (0-indexed)",
|
|
482
|
+
},
|
|
483
|
+
"include_declaration": {
|
|
484
|
+
"type": "boolean",
|
|
485
|
+
"description": "Include the declaration itself",
|
|
486
|
+
"default": True,
|
|
487
|
+
},
|
|
394
488
|
},
|
|
395
489
|
"required": ["file_path", "line", "character"],
|
|
396
490
|
},
|
|
@@ -412,8 +506,15 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
412
506
|
inputSchema={
|
|
413
507
|
"type": "object",
|
|
414
508
|
"properties": {
|
|
415
|
-
"query": {
|
|
416
|
-
|
|
509
|
+
"query": {
|
|
510
|
+
"type": "string",
|
|
511
|
+
"description": "Symbol name to search for (fuzzy match)",
|
|
512
|
+
},
|
|
513
|
+
"directory": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"description": "Workspace directory",
|
|
516
|
+
"default": ".",
|
|
517
|
+
},
|
|
417
518
|
},
|
|
418
519
|
"required": ["query"],
|
|
419
520
|
},
|
|
@@ -426,7 +527,10 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
426
527
|
"properties": {
|
|
427
528
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
428
529
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
429
|
-
"character": {
|
|
530
|
+
"character": {
|
|
531
|
+
"type": "integer",
|
|
532
|
+
"description": "Character position (0-indexed)",
|
|
533
|
+
},
|
|
430
534
|
},
|
|
431
535
|
"required": ["file_path", "line", "character"],
|
|
432
536
|
},
|
|
@@ -439,9 +543,16 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
439
543
|
"properties": {
|
|
440
544
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
441
545
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
442
|
-
"character": {
|
|
546
|
+
"character": {
|
|
547
|
+
"type": "integer",
|
|
548
|
+
"description": "Character position (0-indexed)",
|
|
549
|
+
},
|
|
443
550
|
"new_name": {"type": "string", "description": "New name for the symbol"},
|
|
444
|
-
"dry_run": {
|
|
551
|
+
"dry_run": {
|
|
552
|
+
"type": "boolean",
|
|
553
|
+
"description": "Preview changes without applying",
|
|
554
|
+
"default": True,
|
|
555
|
+
},
|
|
445
556
|
},
|
|
446
557
|
"required": ["file_path", "line", "character", "new_name"],
|
|
447
558
|
},
|
|
@@ -454,7 +565,10 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
454
565
|
"properties": {
|
|
455
566
|
"file_path": {"type": "string", "description": "Absolute path to the file"},
|
|
456
567
|
"line": {"type": "integer", "description": "Line number (1-indexed)"},
|
|
457
|
-
"character": {
|
|
568
|
+
"character": {
|
|
569
|
+
"type": "integer",
|
|
570
|
+
"description": "Character position (0-indexed)",
|
|
571
|
+
},
|
|
458
572
|
},
|
|
459
573
|
"required": ["file_path", "line", "character"],
|
|
460
574
|
},
|
|
@@ -473,17 +587,35 @@ def get_tool_definitions() -> List[Tool]:
|
|
|
473
587
|
inputSchema={
|
|
474
588
|
"type": "object",
|
|
475
589
|
"properties": {
|
|
476
|
-
"pattern": {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
"
|
|
590
|
+
"pattern": {
|
|
591
|
+
"type": "string",
|
|
592
|
+
"description": "ast-grep pattern to search (e.g., 'console.log($A)')",
|
|
593
|
+
},
|
|
594
|
+
"replacement": {
|
|
595
|
+
"type": "string",
|
|
596
|
+
"description": "Replacement pattern (e.g., 'logger.debug($A)')",
|
|
597
|
+
},
|
|
598
|
+
"directory": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"description": "Directory to search in",
|
|
601
|
+
"default": ".",
|
|
602
|
+
},
|
|
603
|
+
"language": {
|
|
604
|
+
"type": "string",
|
|
605
|
+
"description": "Filter by language (typescript, python, etc.)",
|
|
606
|
+
},
|
|
607
|
+
"dry_run": {
|
|
608
|
+
"type": "boolean",
|
|
609
|
+
"description": "Preview changes without applying",
|
|
610
|
+
"default": True,
|
|
611
|
+
},
|
|
481
612
|
},
|
|
482
613
|
"required": ["pattern", "replacement"],
|
|
483
614
|
},
|
|
484
615
|
),
|
|
485
616
|
]
|
|
486
617
|
|
|
618
|
+
|
|
487
619
|
def get_prompt_definitions() -> List[Prompt]:
|
|
488
620
|
"""Return all Prompt definitions for the Stravinsky MCP server."""
|
|
489
621
|
return [
|