@contextstream/mcp-server 0.4.74 → 0.4.80
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.
- package/dist/hooks/auto-rules.js +42 -19
- package/dist/hooks/pre-tool-use.js +8 -83
- package/dist/hooks/runner.js +120 -106
- package/dist/hooks/session-init.js +105 -15
- package/dist/hooks/user-prompt-submit.js +6 -7
- package/dist/index.js +22291 -17789
- package/package.json +3 -3
- package/scripts/registration-smoke.mts +45 -0
|
@@ -298,14 +298,13 @@ var FULL_REMINDER = `[CONTEXTSTREAM RULES - MANDATORY]
|
|
|
298
298
|
- On subsequent messages, default to context() first. Narrow bypass: immediate read-only ContextStream calls when context is fresh and no state-changing tool has run.
|
|
299
299
|
|
|
300
300
|
2. FOR CODE SEARCH: Check index status, then search appropriately
|
|
301
|
-
\
|
|
302
|
-
\u2705
|
|
303
|
-
\u2705 IF
|
|
304
|
-
\u2705 IF search still returns 0 results after retry/window: fallback to local tools (Glob/Grep/Read)
|
|
301
|
+
\u2705 Use mcp__contextstream__search(mode="auto", query="...") BEFORE Glob/Grep/Read/Explore/Task/EnterPlanMode
|
|
302
|
+
\u2705 Run search even while the index is still building \u2014 keyword hits return immediately, results fill in as you work
|
|
303
|
+
\u2705 IF search itself returns 0 results/errors: retry once, THEN fall back to local tools (Glob/Grep/Read)
|
|
305
304
|
|
|
306
305
|
3. WHEN LOCAL TOOLS (Glob/Grep/Read) ARE OK:
|
|
307
|
-
\u2705 Stale/not-indexed grace window has elapsed (~20s default, configurable)
|
|
308
306
|
\u2705 ContextStream search still returns 0 results or errors after retry
|
|
307
|
+
\u2705 The file was just written this turn (known-new, not yet indexed)
|
|
309
308
|
\u2705 User explicitly requests local tools
|
|
310
309
|
|
|
311
310
|
4. FOR PLANS & TASKS: Use ContextStream, not file-based plans
|
|
@@ -728,8 +727,8 @@ Returns: \`indexed\` (true/false), \`last_indexed_at\`, \`file_count\`
|
|
|
728
727
|
\u2192 Use \`search(mode="auto", query="...")\`
|
|
729
728
|
|
|
730
729
|
**IF indexed=false OR last_indexed_at is stale (>7 days):**
|
|
731
|
-
\u2192
|
|
732
|
-
\u2192
|
|
730
|
+
\u2192 Run \`search(mode="auto", query="...")\` anyway \u2014 keyword hits return immediately while indexing builds
|
|
731
|
+
\u2192 Local tools only if search itself returns 0 results/errors on a retry
|
|
733
732
|
|
|
734
733
|
**IF search still returns 0 results or errors after retry/window:**
|
|
735
734
|
\u2192 Fallback to local tools (Glob/Grep/Read)
|