stravinsky 0.2.67__py3-none-any.whl → 0.4.66__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.

Files changed (190) hide show
  1. mcp_bridge/__init__.py +1 -1
  2. mcp_bridge/auth/__init__.py +16 -6
  3. mcp_bridge/auth/cli.py +202 -11
  4. mcp_bridge/auth/oauth.py +1 -2
  5. mcp_bridge/auth/openai_oauth.py +4 -7
  6. mcp_bridge/auth/token_store.py +112 -11
  7. mcp_bridge/cli/__init__.py +1 -1
  8. mcp_bridge/cli/install_hooks.py +503 -107
  9. mcp_bridge/cli/session_report.py +0 -3
  10. mcp_bridge/config/MANIFEST_SCHEMA.md +305 -0
  11. mcp_bridge/config/README.md +276 -0
  12. mcp_bridge/config/__init__.py +2 -2
  13. mcp_bridge/config/hook_config.py +247 -0
  14. mcp_bridge/config/hooks_manifest.json +138 -0
  15. mcp_bridge/config/rate_limits.py +317 -0
  16. mcp_bridge/config/skills_manifest.json +128 -0
  17. mcp_bridge/hooks/HOOKS_SETTINGS.json +17 -4
  18. mcp_bridge/hooks/__init__.py +19 -4
  19. mcp_bridge/hooks/agent_reminder.py +4 -4
  20. mcp_bridge/hooks/auto_slash_command.py +5 -5
  21. mcp_bridge/hooks/budget_optimizer.py +2 -2
  22. mcp_bridge/hooks/claude_limits_hook.py +114 -0
  23. mcp_bridge/hooks/comment_checker.py +3 -4
  24. mcp_bridge/hooks/compaction.py +2 -2
  25. mcp_bridge/hooks/context.py +2 -1
  26. mcp_bridge/hooks/context_monitor.py +2 -2
  27. mcp_bridge/hooks/delegation_policy.py +85 -0
  28. mcp_bridge/hooks/directory_context.py +3 -3
  29. mcp_bridge/hooks/edit_recovery.py +3 -2
  30. mcp_bridge/hooks/edit_recovery_policy.py +49 -0
  31. mcp_bridge/hooks/empty_message_sanitizer.py +2 -2
  32. mcp_bridge/hooks/events.py +160 -0
  33. mcp_bridge/hooks/git_noninteractive.py +4 -4
  34. mcp_bridge/hooks/keyword_detector.py +8 -10
  35. mcp_bridge/hooks/manager.py +43 -22
  36. mcp_bridge/hooks/notification_hook.py +13 -6
  37. mcp_bridge/hooks/parallel_enforcement_policy.py +67 -0
  38. mcp_bridge/hooks/parallel_enforcer.py +5 -5
  39. mcp_bridge/hooks/parallel_execution.py +22 -10
  40. mcp_bridge/hooks/post_tool/parallel_validation.py +103 -0
  41. mcp_bridge/hooks/pre_compact.py +8 -9
  42. mcp_bridge/hooks/pre_tool/agent_spawn_validator.py +115 -0
  43. mcp_bridge/hooks/preemptive_compaction.py +2 -3
  44. mcp_bridge/hooks/routing_notifications.py +80 -0
  45. mcp_bridge/hooks/rules_injector.py +11 -19
  46. mcp_bridge/hooks/session_idle.py +4 -4
  47. mcp_bridge/hooks/session_notifier.py +4 -4
  48. mcp_bridge/hooks/session_recovery.py +4 -5
  49. mcp_bridge/hooks/stravinsky_mode.py +1 -1
  50. mcp_bridge/hooks/subagent_stop.py +1 -3
  51. mcp_bridge/hooks/task_validator.py +2 -2
  52. mcp_bridge/hooks/tmux_manager.py +7 -8
  53. mcp_bridge/hooks/todo_delegation.py +4 -1
  54. mcp_bridge/hooks/todo_enforcer.py +180 -10
  55. mcp_bridge/hooks/tool_messaging.py +113 -10
  56. mcp_bridge/hooks/truncation_policy.py +37 -0
  57. mcp_bridge/hooks/truncator.py +1 -2
  58. mcp_bridge/metrics/cost_tracker.py +115 -0
  59. mcp_bridge/native_search.py +93 -0
  60. mcp_bridge/native_watcher.py +118 -0
  61. mcp_bridge/notifications.py +150 -0
  62. mcp_bridge/orchestrator/enums.py +11 -0
  63. mcp_bridge/orchestrator/router.py +165 -0
  64. mcp_bridge/orchestrator/state.py +32 -0
  65. mcp_bridge/orchestrator/visualization.py +14 -0
  66. mcp_bridge/orchestrator/wisdom.py +34 -0
  67. mcp_bridge/prompts/__init__.py +1 -8
  68. mcp_bridge/prompts/dewey.py +1 -1
  69. mcp_bridge/prompts/planner.py +2 -4
  70. mcp_bridge/prompts/stravinsky.py +53 -31
  71. mcp_bridge/proxy/__init__.py +0 -0
  72. mcp_bridge/proxy/client.py +70 -0
  73. mcp_bridge/proxy/model_server.py +157 -0
  74. mcp_bridge/routing/__init__.py +43 -0
  75. mcp_bridge/routing/config.py +250 -0
  76. mcp_bridge/routing/model_tiers.py +135 -0
  77. mcp_bridge/routing/provider_state.py +261 -0
  78. mcp_bridge/routing/task_classifier.py +190 -0
  79. mcp_bridge/server.py +542 -59
  80. mcp_bridge/server_tools.py +738 -6
  81. mcp_bridge/tools/__init__.py +40 -25
  82. mcp_bridge/tools/agent_manager.py +616 -697
  83. mcp_bridge/tools/background_tasks.py +13 -17
  84. mcp_bridge/tools/code_search.py +70 -53
  85. mcp_bridge/tools/continuous_loop.py +0 -1
  86. mcp_bridge/tools/dashboard.py +19 -0
  87. mcp_bridge/tools/find_code.py +296 -0
  88. mcp_bridge/tools/init.py +1 -0
  89. mcp_bridge/tools/list_directory.py +42 -0
  90. mcp_bridge/tools/lsp/__init__.py +12 -5
  91. mcp_bridge/tools/lsp/manager.py +471 -0
  92. mcp_bridge/tools/lsp/tools.py +723 -207
  93. mcp_bridge/tools/model_invoke.py +1195 -273
  94. mcp_bridge/tools/mux_client.py +75 -0
  95. mcp_bridge/tools/project_context.py +1 -2
  96. mcp_bridge/tools/query_classifier.py +406 -0
  97. mcp_bridge/tools/read_file.py +84 -0
  98. mcp_bridge/tools/replace.py +45 -0
  99. mcp_bridge/tools/run_shell_command.py +38 -0
  100. mcp_bridge/tools/search_enhancements.py +347 -0
  101. mcp_bridge/tools/semantic_search.py +3627 -0
  102. mcp_bridge/tools/session_manager.py +0 -2
  103. mcp_bridge/tools/skill_loader.py +0 -1
  104. mcp_bridge/tools/task_runner.py +5 -7
  105. mcp_bridge/tools/templates.py +3 -3
  106. mcp_bridge/tools/tool_search.py +331 -0
  107. mcp_bridge/tools/write_file.py +29 -0
  108. mcp_bridge/update_manager.py +585 -0
  109. mcp_bridge/update_manager_pypi.py +297 -0
  110. mcp_bridge/utils/cache.py +82 -0
  111. mcp_bridge/utils/process.py +71 -0
  112. mcp_bridge/utils/session_state.py +51 -0
  113. mcp_bridge/utils/truncation.py +76 -0
  114. stravinsky-0.4.66.dist-info/METADATA +517 -0
  115. stravinsky-0.4.66.dist-info/RECORD +198 -0
  116. {stravinsky-0.2.67.dist-info → stravinsky-0.4.66.dist-info}/entry_points.txt +1 -0
  117. stravinsky_claude_assets/HOOKS_INTEGRATION.md +316 -0
  118. stravinsky_claude_assets/agents/HOOKS.md +437 -0
  119. stravinsky_claude_assets/agents/code-reviewer.md +210 -0
  120. stravinsky_claude_assets/agents/comment_checker.md +580 -0
  121. stravinsky_claude_assets/agents/debugger.md +254 -0
  122. stravinsky_claude_assets/agents/delphi.md +495 -0
  123. stravinsky_claude_assets/agents/dewey.md +248 -0
  124. stravinsky_claude_assets/agents/explore.md +1198 -0
  125. stravinsky_claude_assets/agents/frontend.md +472 -0
  126. stravinsky_claude_assets/agents/implementation-lead.md +164 -0
  127. stravinsky_claude_assets/agents/momus.md +464 -0
  128. stravinsky_claude_assets/agents/research-lead.md +141 -0
  129. stravinsky_claude_assets/agents/stravinsky.md +730 -0
  130. stravinsky_claude_assets/commands/delphi.md +9 -0
  131. stravinsky_claude_assets/commands/dewey.md +54 -0
  132. stravinsky_claude_assets/commands/git-master.md +112 -0
  133. stravinsky_claude_assets/commands/index.md +49 -0
  134. stravinsky_claude_assets/commands/publish.md +86 -0
  135. stravinsky_claude_assets/commands/review.md +73 -0
  136. stravinsky_claude_assets/commands/str/agent_cancel.md +70 -0
  137. stravinsky_claude_assets/commands/str/agent_list.md +56 -0
  138. stravinsky_claude_assets/commands/str/agent_output.md +92 -0
  139. stravinsky_claude_assets/commands/str/agent_progress.md +74 -0
  140. stravinsky_claude_assets/commands/str/agent_retry.md +94 -0
  141. stravinsky_claude_assets/commands/str/cancel.md +51 -0
  142. stravinsky_claude_assets/commands/str/clean.md +97 -0
  143. stravinsky_claude_assets/commands/str/continue.md +38 -0
  144. stravinsky_claude_assets/commands/str/index.md +199 -0
  145. stravinsky_claude_assets/commands/str/list_watchers.md +96 -0
  146. stravinsky_claude_assets/commands/str/search.md +205 -0
  147. stravinsky_claude_assets/commands/str/start_filewatch.md +136 -0
  148. stravinsky_claude_assets/commands/str/stats.md +71 -0
  149. stravinsky_claude_assets/commands/str/stop_filewatch.md +89 -0
  150. stravinsky_claude_assets/commands/str/unwatch.md +42 -0
  151. stravinsky_claude_assets/commands/str/watch.md +45 -0
  152. stravinsky_claude_assets/commands/strav.md +53 -0
  153. stravinsky_claude_assets/commands/stravinsky.md +292 -0
  154. stravinsky_claude_assets/commands/verify.md +60 -0
  155. stravinsky_claude_assets/commands/version.md +5 -0
  156. stravinsky_claude_assets/hooks/README.md +248 -0
  157. stravinsky_claude_assets/hooks/comment_checker.py +193 -0
  158. stravinsky_claude_assets/hooks/context.py +38 -0
  159. stravinsky_claude_assets/hooks/context_monitor.py +153 -0
  160. stravinsky_claude_assets/hooks/dependency_tracker.py +73 -0
  161. stravinsky_claude_assets/hooks/edit_recovery.py +46 -0
  162. stravinsky_claude_assets/hooks/execution_state_tracker.py +68 -0
  163. stravinsky_claude_assets/hooks/notification_hook.py +103 -0
  164. stravinsky_claude_assets/hooks/notification_hook_v2.py +96 -0
  165. stravinsky_claude_assets/hooks/parallel_execution.py +241 -0
  166. stravinsky_claude_assets/hooks/parallel_reinforcement.py +106 -0
  167. stravinsky_claude_assets/hooks/parallel_reinforcement_v2.py +112 -0
  168. stravinsky_claude_assets/hooks/pre_compact.py +123 -0
  169. stravinsky_claude_assets/hooks/ralph_loop.py +173 -0
  170. stravinsky_claude_assets/hooks/session_recovery.py +263 -0
  171. stravinsky_claude_assets/hooks/stop_hook.py +89 -0
  172. stravinsky_claude_assets/hooks/stravinsky_metrics.py +164 -0
  173. stravinsky_claude_assets/hooks/stravinsky_mode.py +146 -0
  174. stravinsky_claude_assets/hooks/subagent_stop.py +98 -0
  175. stravinsky_claude_assets/hooks/todo_continuation.py +111 -0
  176. stravinsky_claude_assets/hooks/todo_delegation.py +96 -0
  177. stravinsky_claude_assets/hooks/tool_messaging.py +281 -0
  178. stravinsky_claude_assets/hooks/truncator.py +23 -0
  179. stravinsky_claude_assets/rules/deployment_safety.md +51 -0
  180. stravinsky_claude_assets/rules/integration_wiring.md +89 -0
  181. stravinsky_claude_assets/rules/pypi_deployment.md +220 -0
  182. stravinsky_claude_assets/rules/stravinsky_orchestrator.md +32 -0
  183. stravinsky_claude_assets/settings.json +152 -0
  184. stravinsky_claude_assets/skills/chrome-devtools/SKILL.md +81 -0
  185. stravinsky_claude_assets/skills/sqlite/SKILL.md +77 -0
  186. stravinsky_claude_assets/skills/supabase/SKILL.md +74 -0
  187. stravinsky_claude_assets/task_dependencies.json +34 -0
  188. stravinsky-0.2.67.dist-info/METADATA +0 -284
  189. stravinsky-0.2.67.dist-info/RECORD +0 -76
  190. {stravinsky-0.2.67.dist-info → stravinsky-0.4.66.dist-info}/WHEEL +0 -0
@@ -0,0 +1,94 @@
1
+ ---
2
+ description: Retry a failed or cancelled background agent with the same prompt
3
+ allowed-tools: mcp__stravinsky__agent_retry, mcp__stravinsky__agent_spawn
4
+ ---
5
+
6
+ # Retry Background Agent
7
+
8
+ Retry a failed or cancelled agent with the exact same prompt and configuration.
9
+
10
+ ## What This Does
11
+
12
+ Creates a new agent task with the same:
13
+ - Agent type
14
+ - Prompt
15
+ - Description
16
+ - Model (if specified)
17
+
18
+ Returns a new task ID for the retried agent.
19
+
20
+ ## Usage
21
+
22
+ ```python
23
+ # Retry a failed agent
24
+ agent_retry(task_id="task_001")
25
+ ```
26
+
27
+ ## Parameters
28
+
29
+ - `task_id`: The task ID of the failed/cancelled agent to retry
30
+
31
+ ## When to Retry
32
+
33
+ - **Transient failures**: Network timeout, API rate limit, temporary service outage
34
+ - **Fixed environment**: Ollama was down, now it's running
35
+ - **Cancelled by mistake**: Accidentally cancelled a needed agent
36
+ - **Resource contention**: Agent failed due to too many concurrent operations
37
+
38
+ ## Example Workflow
39
+
40
+ ```python
41
+ # 1. Spawn agent
42
+ task_1 = agent_spawn(
43
+ agent_type="explore",
44
+ prompt="Find authentication code",
45
+ description="Auth search"
46
+ )
47
+
48
+ # 2. Agent fails (e.g., network error)
49
+ agent_list() # Shows task_001: failed
50
+
51
+ # 3. Fix issue (e.g., restart network)
52
+
53
+ # 4. Retry with same configuration
54
+ retry_result = agent_retry(task_id=task_1["task_id"])
55
+ new_task_id = retry_result["task_id"]
56
+
57
+ # 5. Monitor new agent
58
+ agent_progress(task_id=new_task_id)
59
+ result = agent_output(task_id=new_task_id, block=True)
60
+ ```
61
+
62
+ ## Output
63
+
64
+ ```
65
+ ♻️ Retrying agent task_001 (explore - Auth search)
66
+ New task ID: task_004
67
+ Agent started with same configuration
68
+ ```
69
+
70
+ ## Error Handling
71
+
72
+ ```python
73
+ # Pattern: Retry on failure
74
+ try:
75
+ result = agent_output(task_id="task_001", block=True)
76
+ except Exception as e:
77
+ print(f"Agent failed: {e}")
78
+ retry = agent_retry(task_id="task_001")
79
+ result = agent_output(task_id=retry["task_id"], block=True)
80
+ ```
81
+
82
+ ## Notes
83
+
84
+ - **New task ID**: Retry creates a new agent, doesn't reuse the old task ID
85
+ - **Same configuration**: All parameters are copied from original agent
86
+ - **Independent execution**: Retried agent is separate from original
87
+ - **No automatic retry**: You must explicitly call `agent_retry`
88
+
89
+ ## Related Commands
90
+
91
+ - `/str:agent_list` - List failed agents to retry
92
+ - `/str:agent_output` - Get results after retry
93
+ - `/str:agent_progress` - Monitor retry progress
94
+ - `/str:agent_cancel` - Cancel retry if it fails again
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: Cancel ongoing semantic indexing operation
3
+ allowed-tools: mcp__stravinsky__cancel_indexing
4
+ ---
5
+
6
+ # Cancel Semantic Indexing
7
+
8
+ Gracefully cancel an ongoing `semantic_index()` operation. Useful for large codebases where indexing takes several minutes.
9
+
10
+ ## What This Does
11
+
12
+ Sets a cancellation flag that's checked between batches (every 50 chunks). The current batch completes before stopping, ensuring no partial writes to ChromaDB.
13
+
14
+ ## Usage
15
+
16
+ Call `cancel_indexing` with parameters:
17
+ - `project_path`: "." (current directory)
18
+ - `provider`: "ollama" (must match the provider used for indexing)
19
+
20
+ ## Example
21
+
22
+ ```python
23
+ # In one session: Start indexing
24
+ semantic_index(project_path=".", provider="ollama")
25
+
26
+ # From another call (or same session): Cancel it
27
+ cancel_indexing(project_path=".", provider="ollama")
28
+ ```
29
+
30
+ ## Output Example
31
+
32
+ ```
33
+ ✅ Cancellation requested for /path/to/project
34
+ Indexing will stop after current batch completes.
35
+ ```
36
+
37
+ The indexing operation will return partial results:
38
+
39
+ ```
40
+ ⚠️ Indexing cancelled
41
+ Indexed 150 chunks from 75 files before cancellation
42
+ Cancelled after 150/500 chunks
43
+ ```
44
+
45
+ ## Notes
46
+
47
+ - **Graceful**: Current batch (50 chunks) completes before stopping
48
+ - **Progress preserved**: All completed batches remain indexed
49
+ - **Thread-safe**: Uses locks to prevent race conditions
50
+ - **Provider must match**: Use the same provider you started indexing with
51
+ - Flag automatically clears at start of next indexing operation
@@ -0,0 +1,97 @@
1
+ ---
2
+ description: Delete semantic search indexes to free disk space
3
+ allowed-tools: mcp__stravinsky__delete_index, mcp__stravinsky__semantic_stats
4
+ ---
5
+
6
+ # Delete Semantic Search Indexes
7
+
8
+ Remove semantic search indexes to free disk space. Supports deleting specific project/provider combinations or all indexes globally.
9
+
10
+ ## What This Does
11
+
12
+ Deletes ChromaDB vector databases stored at `~/.stravinsky/vectordb/`. Indexes can be regenerated by running `/str:index` again.
13
+
14
+ ## Interactive Usage
15
+
16
+ **IMPORTANT**: When invoked without arguments, this command MUST present the user with these two options:
17
+
18
+ **Option 1: Clear this repo's indexes only**
19
+ ```
20
+ Would you like to:
21
+ 1. Clear indexes for THIS project only (safe)
22
+ 2. Clear indexes for ALL projects (⚠️ irreversible)
23
+
24
+ Enter your choice (1 or 2):
25
+ ```
26
+
27
+ ### Implementation:
28
+ ```python
29
+ # First, ask the user to choose
30
+ # DO NOT proceed until user responds
31
+
32
+ # If user chooses Option 1:
33
+ delete_index(project_path=".")
34
+
35
+ # If user chooses Option 2:
36
+ delete_index(delete_all=True)
37
+ ```
38
+
39
+ Before deleting, show what will be deleted using `semantic_stats()` to help the user make an informed decision.
40
+
41
+ ## Manual Usage Modes
42
+
43
+ For direct invocation without prompting:
44
+
45
+ ### 1. Delete Specific Provider for Project
46
+
47
+ ```python
48
+ delete_index(project_path=".", provider="ollama")
49
+ ```
50
+
51
+ Deletes only the Ollama index for the current project.
52
+
53
+ ### 2. Delete All Providers for Project
54
+
55
+ ```python
56
+ delete_index(project_path=".")
57
+ ```
58
+
59
+ Deletes indexes for all providers (ollama, mxbai, gemini, openai, huggingface) for the current project.
60
+
61
+ ### 3. Delete ALL Indexes (Global Clean)
62
+
63
+ ```python
64
+ delete_index(delete_all=True)
65
+ ```
66
+
67
+ ⚠️ **WARNING**: Deletes indexes for ALL projects and ALL providers. This is irreversible.
68
+
69
+ ## Output Example
70
+
71
+ ```
72
+ ✅ Deleted 2 index(es):
73
+ - /Users/you/.stravinsky/vectordb/abc123_ollama
74
+ - /Users/you/.stravinsky/vectordb/abc123_mxbai
75
+ ```
76
+
77
+ ## Use Cases
78
+
79
+ - **Free disk space**: Large codebases can create 100MB+ indexes
80
+ - **Provider switching**: Clean up old provider indexes when changing embedding models
81
+ - **Fresh start**: Delete and reindex to fix corrupted indexes
82
+ - **Project cleanup**: Remove indexes for archived projects
83
+
84
+ ## Check Index Size
85
+
86
+ Use `semantic_stats()` to see index details before deleting:
87
+
88
+ ```python
89
+ semantic_stats(project_path=".", provider="ollama")
90
+ ```
91
+
92
+ ## Notes
93
+
94
+ - Deletion is permanent - no undo
95
+ - Indexes can be regenerated with `/str:index`
96
+ - Use `delete_all=True` carefully - affects all projects
97
+ - Stops any running file watchers automatically
@@ -0,0 +1,38 @@
1
+ ---
2
+ description: Continue working on pending todos (RALPH loop manual trigger)
3
+ allowed-tools: TodoRead
4
+ ---
5
+
6
+ # Continue Working on Pending Todos
7
+
8
+ Manually trigger the RALPH loop (Relentless Autonomous Labor Protocol) to continue working on incomplete todos.
9
+
10
+ ## What This Does
11
+
12
+ Forces Claude to continue working on incomplete todos instead of stopping. Use this when:
13
+ - Claude completes a task but there are still pending todos
14
+ - You want to ensure all todos are completed before stopping
15
+ - The auto-continuation safety limit was reached
16
+
17
+ ## Usage
18
+
19
+ Simply run: `/str:continue` or `/continue`
20
+
21
+ ## What Happens
22
+
23
+ Claude will:
24
+ 1. Check for incomplete todos (in_progress or pending)
25
+ 2. Resume work on the next todo
26
+ 3. Continue until all todos are complete or safety limit reached
27
+
28
+ ## Safety Limits
29
+
30
+ - Maximum 10 auto-continuations per hour
31
+ - Resets after 1 hour of inactivity
32
+ - Manual `/continue` bypasses the limit
33
+
34
+ ## Related Commands
35
+
36
+ - `/str:clean` - Delete semantic search indexes
37
+ - `/str:watch` - Start file watcher
38
+ - `/str:unwatch` - Stop file watcher
@@ -0,0 +1,199 @@
1
+ ---
2
+ description: Index the codebase for semantic search with vector embeddings.
3
+ ---
4
+
5
+ # Index Codebase for Semantic Search
6
+
7
+ Build a semantic search index using vector embeddings to enable natural language code discovery.
8
+
9
+ ## What This Does
10
+
11
+ Creates a vector database that indexes your codebase for semantic search, enabling queries like:
12
+ - "find authentication logic"
13
+ - "error handling in API endpoints"
14
+ - "database connection pooling"
15
+ - "logging and monitoring"
16
+ - "caching and performance optimization"
17
+
18
+ This index enables the `/search` command to find code based on meaning and intent, not just keyword matching.
19
+
20
+ ## Prerequisites
21
+
22
+ Ensure your embedding provider is ready:
23
+
24
+ ### Ollama (Recommended - Free, Local)
25
+
26
+ ```bash
27
+ # Install Ollama (if not already installed)
28
+ brew install ollama
29
+
30
+ # Pull the lightweight embedding model (274MB, recommended)
31
+ ollama pull nomic-embed-text
32
+
33
+ # Or for better accuracy (670MB):
34
+ ollama pull mxbai-embed-large
35
+ ```
36
+
37
+ ### Other Providers
38
+
39
+ - **Gemini**: Requires OAuth - run `stravinsky-auth login gemini`
40
+ - **OpenAI**: Requires ChatGPT Plus/Pro - run `stravinsky-auth login openai`
41
+ - **HuggingFace**: No auth needed, cloud-based
42
+
43
+ ## Usage
44
+
45
+ Call the `semantic_index` MCP tool with your desired parameters:
46
+
47
+ ### Parameters
48
+
49
+ | Parameter | Type | Default | Description |
50
+ |-----------|------|---------|-------------|
51
+ | `project_path` | string | "." | Path to project root (absolute or relative) |
52
+ | `provider` | string | "ollama" | Embedding provider: "ollama", "gemini", "openai", "huggingface" |
53
+ | `force` | boolean | false | Force full reindex (true) or incremental update (false) |
54
+
55
+ ### Examples
56
+
57
+ **Basic indexing (default Ollama):**
58
+ ```
59
+ semantic_index(project_path=".")
60
+ ```
61
+
62
+ **Full reindex with force:**
63
+ ```
64
+ semantic_index(project_path=".", force=true)
65
+ ```
66
+
67
+ **Using Gemini provider:**
68
+ ```
69
+ semantic_index(project_path=".", provider="gemini")
70
+ ```
71
+
72
+ **Specific project directory:**
73
+ ```
74
+ semantic_index(project_path="/path/to/project", provider="ollama")
75
+ ```
76
+
77
+ ## Index Management
78
+
79
+ ### Check Index Status
80
+
81
+ After indexing, view the index statistics:
82
+ ```
83
+ semantic_stats(project_path=".")
84
+ ```
85
+
86
+ This shows:
87
+ - Number of indexed files
88
+ - Total code blocks indexed
89
+ - Index size
90
+ - Last update time
91
+ - Provider information
92
+
93
+ ### Incremental vs Full Reindex
94
+
95
+ - **Incremental (force=false)**: Only indexes new or modified files. Fast for ongoing development.
96
+ - **Full Reindex (force=true)**: Rebuilds the entire index from scratch. Use when:
97
+ - Files have been deleted or moved
98
+ - You're getting stale results
99
+ - Upgrading embedding models
100
+ - You've made significant codebase changes
101
+
102
+ ### When to Reindex
103
+
104
+ Run `/str:index` again when:
105
+ - Adding new files or modules to your project
106
+ - Significantly modifying existing files
107
+ - Changing the codebase structure
108
+ - Want to use a different embedding provider
109
+ - Getting stale or outdated search results
110
+
111
+ Use `force=true` if results become stale:
112
+ ```
113
+ semantic_index(project_path=".", force=true)
114
+ ```
115
+
116
+ ## Provider Comparison
117
+
118
+ | Provider | Speed | Accuracy | Cost | Setup |
119
+ |----------|-------|----------|------|-------|
120
+ | **Ollama** | Fast | Good | Free | Local |
121
+ | **Gemini** | Fast | Excellent | Low | OAuth |
122
+ | **OpenAI** | Medium | Excellent | Medium | OAuth |
123
+ | **HuggingFace** | Slow | Good | Free | Cloud |
124
+
125
+ ## Next Steps
126
+
127
+ After indexing, use semantic search:
128
+
129
+ ```
130
+ /search "find authentication logic"
131
+ /search "database connection pooling"
132
+ /search "error handling patterns" language=py
133
+ ```
134
+
135
+ See `/search` for detailed search command documentation.
136
+
137
+ ## Troubleshooting
138
+
139
+ ### "Ollama connection refused"
140
+
141
+ Ensure Ollama is running:
142
+ ```bash
143
+ # Check if Ollama is running
144
+ lsof -i :11434
145
+
146
+ # Start Ollama (usually auto-starts, but can manually start)
147
+ ollama serve
148
+ ```
149
+
150
+ ### "Provider not available"
151
+
152
+ Verify you have the required credentials:
153
+ - **Gemini/OpenAI**: Run `stravinsky-auth login <provider>`
154
+ - **HuggingFace**: Ensure HF_TOKEN environment variable is set
155
+
156
+ ### "Index is stale"
157
+
158
+ Rebuild with full reindex:
159
+ ```
160
+ semantic_index(project_path=".", force=true)
161
+ ```
162
+
163
+ ### Large index size
164
+
165
+ If your index becomes very large:
166
+ 1. Exclude directories: Add to `.gitignore` patterns (same dirs are skipped from indexing)
167
+ 2. Use language filter in search instead of indexing all languages
168
+ 3. Reindex with different provider for smaller index
169
+
170
+ ## Performance Tips
171
+
172
+ - **First index**: May take 1-2 minutes depending on codebase size
173
+ - **Incremental updates**: Typically 30 seconds or less
174
+ - **Ollama locally**: No internet required, very fast once loaded
175
+ - **Batch indexing**: Index once, then search many times (cost-effective)
176
+
177
+ ## File Watching (Automatic Reindexing)
178
+
179
+ Enable automatic reindexing when files change:
180
+
181
+ ```python
182
+ from mcp_bridge.tools.semantic_search import start_file_watcher
183
+
184
+ watcher = start_file_watcher(
185
+ project_path=".",
186
+ provider="ollama",
187
+ debounce_seconds=2.0
188
+ )
189
+ # Files now automatically reindex when modified
190
+ ```
191
+
192
+ Stop automatic watching when done:
193
+ ```python
194
+ from mcp_bridge.tools.semantic_search import stop_file_watcher
195
+
196
+ stop_file_watcher(".")
197
+ ```
198
+
199
+ See `/str:watch` for more details on automatic file watching.
@@ -0,0 +1,96 @@
1
+ ---
2
+ description: /str:list_watchers - List all active file watchers across projects
3
+ allowed-tools: mcp__stravinsky__list_file_watchers
4
+ ---
5
+
6
+ # List Active File Watchers
7
+
8
+ View all currently running file watchers for automatic semantic search reindexing.
9
+
10
+ ## What This Does
11
+
12
+ Displays information about active file watchers across all projects including:
13
+ - Project path being watched
14
+ - Embedding provider (ollama, gemini, openai, huggingface)
15
+ - Debounce interval (wait time before reindexing)
16
+ - Current status (running/stopped)
17
+
18
+ ## Prerequisites
19
+
20
+ At least one file watcher must be running. Start a watcher with `/str:start_filewatch` first.
21
+
22
+ ## Usage
23
+
24
+ Call the MCP tool directly (no parameters):
25
+
26
+ ```python
27
+ mcp__stravinsky__list_file_watchers()
28
+ ```
29
+
30
+ Returns a list of dicts with:
31
+ - `project_path`: Root directory being watched
32
+ - `provider`: Embedding provider name
33
+ - `debounce_seconds`: Wait time before reindexing
34
+ - `status`: "running" or "stopped"
35
+
36
+ ## Example Output
37
+
38
+ ```
39
+ Active File Watchers
40
+ ====================
41
+
42
+ Watcher 1:
43
+ Project: /Users/dev/project1
44
+ Provider: ollama
45
+ Debounce: 2.0s
46
+ Status: running
47
+
48
+ Watcher 2:
49
+ Project: /Users/dev/project2
50
+ Provider: gemini
51
+ Debounce: 3.0s
52
+ Status: running
53
+
54
+ Total: 2 active watchers
55
+ ```
56
+
57
+ ## Use Cases
58
+
59
+ **Before stopping a watcher:**
60
+ ```python
61
+ # List watchers to get project path
62
+ mcp__stravinsky__list_file_watchers()
63
+
64
+ # Stop specific watcher
65
+ mcp__stravinsky__stop_file_watcher(project_path="/Users/dev/project1")
66
+ ```
67
+
68
+ **Check status across multiple repos:**
69
+ ```python
70
+ # See all watched projects at once
71
+ mcp__stravinsky__list_file_watchers()
72
+ ```
73
+
74
+ **Verify watcher started successfully:**
75
+ ```python
76
+ # After starting watcher
77
+ mcp__stravinsky__start_file_watcher(project_path=".", provider="ollama")
78
+
79
+ # Confirm it's running
80
+ mcp__stravinsky__list_file_watchers()
81
+ ```
82
+
83
+ ## Troubleshooting
84
+
85
+ **"No active watchers"**: Start a watcher with `/str:start_filewatch` first.
86
+
87
+ **"Watcher shows stopped"**: The watcher encountered an error or was manually stopped. Restart with `/str:start_filewatch`.
88
+
89
+ **Multiple watchers for same project**: This indicates duplicate watcher processes. Stop and restart with `/str:stop_filewatch`.
90
+
91
+ ## Tips
92
+
93
+ - Run this before stopping watchers to identify project paths
94
+ - Use to verify watchers are running after system restart
95
+ - Check status if reindexing seems not to be happening automatically
96
+ - Each project can only have ONE active watcher per provider