@takara-ai/miru-code 0.4.6 → 0.4.9
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/README.md +34 -13
- package/package.json +1 -1
- package/src/agents/claude.md +16 -28
- package/src/agents/copilot.md +9 -35
- package/src/agents/cursor.md +15 -28
- package/src/agents/gemini.md +10 -36
- package/src/agents/kiro.md +4 -37
- package/src/agents/opencode.md +4 -37
- package/src/cli.ts +9 -0
- package/src/installer/agents.ts +82 -33
- package/src/installer/hooks/install.ts +463 -0
- package/src/installer/hooks/opencode-plugin.ts +68 -0
- package/src/installer/hooks/search-guard.ts +215 -0
- package/src/installer/installer.ts +56 -3
- package/src/installer/prompt.ts +218 -32
- package/src/installer/search-policy.ts +68 -0
- package/src/mcp/server.ts +8 -9
package/src/mcp/server.ts
CHANGED
|
@@ -10,11 +10,10 @@ const REPO_DESCRIPTION =
|
|
|
10
10
|
"The index is built on the first tool call and cached for the session.";
|
|
11
11
|
|
|
12
12
|
const SERVER_INSTRUCTIONS =
|
|
13
|
-
"
|
|
14
|
-
"Call `search`
|
|
15
|
-
"Always pass the project root as `repo`
|
|
16
|
-
"
|
|
17
|
-
"Prefer these tools over Grep, Glob, or Read for any question about how code works.";
|
|
13
|
+
"DO NOT use Grep, Glob, SemanticSearch, or Read to explore code when this server is available. " +
|
|
14
|
+
"Call `search` first for any question about how code works; call `find_related` on a hit to explore neighbors. " +
|
|
15
|
+
"Always pass the project root as `repo` (local path or https:// git URL). Never guess URLs. " +
|
|
16
|
+
"Native search is only for exact literal confirmation or files outside the indexed repo.";
|
|
18
17
|
|
|
19
18
|
export function createMcpServer(cache: IndexCache): McpServer {
|
|
20
19
|
const server = new McpServer(
|
|
@@ -31,8 +30,8 @@ export function createMcpServer(cache: IndexCache): McpServer {
|
|
|
31
30
|
"search",
|
|
32
31
|
{
|
|
33
32
|
description:
|
|
34
|
-
"
|
|
35
|
-
"Indexes `repo` on
|
|
33
|
+
"DEFAULT code exploration tool. DO NOT use Grep, Glob, SemanticSearch, or Read instead. " +
|
|
34
|
+
"Search with natural language or a code query. Indexes `repo` on first call; later calls reuse the session cache.",
|
|
36
35
|
inputSchema: {
|
|
37
36
|
query: z.string().describe("Natural language or code query."),
|
|
38
37
|
repo: z.string().describe(REPO_DESCRIPTION),
|
|
@@ -57,8 +56,8 @@ export function createMcpServer(cache: IndexCache): McpServer {
|
|
|
57
56
|
"find_related",
|
|
58
57
|
{
|
|
59
58
|
description:
|
|
60
|
-
"Find code
|
|
61
|
-
"Use
|
|
59
|
+
"Find code similar to a file:line from a prior `search` hit. " +
|
|
60
|
+
"Use instead of Grep chains or reading whole files to trace related code.",
|
|
62
61
|
inputSchema: {
|
|
63
62
|
file_path: z
|
|
64
63
|
.string()
|