@zokizuan/satori-mcp 3.8.0 → 4.0.0
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 +6 -4
- package/dist/core/capabilities.d.ts +0 -4
- package/dist/core/capabilities.js +0 -18
- package/dist/core/handlers.d.ts +23 -2
- package/dist/core/handlers.js +722 -130
- package/dist/core/search-constants.d.ts +15 -0
- package/dist/core/search-constants.js +14 -0
- package/dist/core/search-types.d.ts +101 -1
- package/dist/index.js +1 -1
- package/dist/telemetry/search.d.ts +1 -0
- package/dist/tools/manage_index.js +1 -2
- package/dist/tools/read_file.js +53 -26
- package/dist/tools/search_codebase.js +9 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ MCP server for Satori — agent-safe semantic code search and indexing.
|
|
|
6
6
|
|
|
7
7
|
- Capability-driven execution via `CapabilityResolver`
|
|
8
8
|
- Runtime-first `search_codebase` with explicit `scope`, `resultMode`, `groupBy`, and optional `debug` traces
|
|
9
|
+
- Deterministic query-prefix operators in `search_codebase` (`lang:`, `path:`, `-path:`, `must:`, `exclude:`)
|
|
10
|
+
- Default grouped-result diversity and auto changed-files ranking (`rankingMode="auto_changed_first"`)
|
|
9
11
|
- First-class `call_graph` tool with deterministic node/edge sorting and TS/Python support
|
|
10
12
|
- Sidecar-backed `file_outline` tool for per-file symbol navigation and direct call_graph jump handles
|
|
11
13
|
- Snapshot v3 safety with index fingerprints and strict `requires_reindex` access gates
|
|
@@ -61,29 +63,29 @@ Tool surface is hard-broken to 6 tools. This keeps routing explicit while exposi
|
|
|
61
63
|
|
|
62
64
|
### `manage_index`
|
|
63
65
|
|
|
64
|
-
Manage index lifecycle operations (create/reindex/sync/status/clear) for a codebase path. Ignore-rule edits in repo-root .satoriignore/.gitignore reconcile automatically in the normal sync path
|
|
66
|
+
Manage index lifecycle operations (create/reindex/sync/status/clear) for a codebase path. Ignore-rule edits in repo-root .satoriignore/.gitignore reconcile automatically in the normal sync path. Use action="sync" for immediate convergence and action="reindex" for full rebuild recovery.
|
|
65
67
|
|
|
66
68
|
| Parameter | Type | Required | Default | Description |
|
|
67
69
|
|---|---|---|---|---|
|
|
68
70
|
| `action` | enum("create", "reindex", "sync", "status", "clear") | yes | | Required operation to run. |
|
|
69
71
|
| `path` | string | yes | | ABSOLUTE path to the target codebase. |
|
|
70
72
|
| `force` | boolean | no | | Only for action='create'. Force rebuild from scratch. |
|
|
71
|
-
| `splitter` | enum("ast", "langchain") | no | | Only for action='create'. Code splitter strategy. |
|
|
72
73
|
| `customExtensions` | array<string> | no | | Only for action='create'. Additional file extensions to include. |
|
|
73
74
|
| `ignorePatterns` | array<string> | no | | Only for action='create'. Additional ignore patterns to apply. |
|
|
74
75
|
| `zillizDropCollection` | string | no | | Only for action='create'. Zilliz-only: drop this Satori-managed collection before creating the new index. |
|
|
75
76
|
|
|
76
77
|
### `search_codebase`
|
|
77
78
|
|
|
78
|
-
Unified semantic search with runtime
|
|
79
|
+
Unified semantic search with runtime-first defaults (start with scope="runtime"), grouped/raw output modes, and deterministic ranking/freshness behavior. Operators are parsed from a query prefix block: lang:, path:, -path:, must:, exclude: (escape with \\ to keep literals). Use debug:true for explainability payloads, and rely on response hints for remediation (.satoriignore noise handling, navigation fallback, reindex guidance).
|
|
79
80
|
|
|
80
81
|
| Parameter | Type | Required | Default | Description |
|
|
81
82
|
|---|---|---|---|---|
|
|
82
83
|
| `path` | string | yes | | ABSOLUTE path to an indexed codebase or subdirectory. |
|
|
83
84
|
| `query` | string | yes | | Natural-language query. |
|
|
84
|
-
| `scope` | enum("runtime", "mixed", "docs") | no | `"runtime"` | Search scope policy. runtime excludes docs/tests, docs returns docs/tests only, mixed includes all. |
|
|
85
|
+
| `scope` | enum("runtime", "mixed", "docs") | no | `"runtime"` | Search scope policy. runtime excludes docs/tests, docs returns docs/tests only, mixed includes all. Docs scope skips reranker by policy in the current tool surface. |
|
|
85
86
|
| `resultMode` | enum("grouped", "raw") | no | `"grouped"` | Output mode. grouped returns merged search groups, raw returns chunk hits. |
|
|
86
87
|
| `groupBy` | enum("symbol", "file") | no | `"symbol"` | Grouping strategy in grouped mode. |
|
|
88
|
+
| `rankingMode` | enum("default", "auto_changed_first") | no | `"auto_changed_first"` | Ranking policy. auto_changed_first boosts files changed in the current git working tree when available. |
|
|
87
89
|
| `limit` | integer | no | `50` | Maximum groups (grouped mode) or chunks (raw mode). |
|
|
88
90
|
| `debug` | boolean | no | `false` | Optional debug payload toggle for score and fusion breakdowns. |
|
|
89
91
|
|
|
@@ -23,9 +23,5 @@ export declare class CapabilityResolver {
|
|
|
23
23
|
getDefaultSearchLimit(): number;
|
|
24
24
|
getMaxSearchLimit(): number;
|
|
25
25
|
getDefaultRerankEnabled(): boolean;
|
|
26
|
-
resolveRerankDecision(useReranker: boolean | undefined): {
|
|
27
|
-
enabled: boolean;
|
|
28
|
-
blockedByMissingCapability: boolean;
|
|
29
|
-
};
|
|
30
26
|
}
|
|
31
27
|
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -58,23 +58,5 @@ export class CapabilityResolver {
|
|
|
58
58
|
getDefaultRerankEnabled() {
|
|
59
59
|
return this.matrix.defaultRerankEnabled;
|
|
60
60
|
}
|
|
61
|
-
resolveRerankDecision(useReranker) {
|
|
62
|
-
if (useReranker === true) {
|
|
63
|
-
return {
|
|
64
|
-
enabled: this.hasReranker(),
|
|
65
|
-
blockedByMissingCapability: !this.hasReranker()
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
if (useReranker === false) {
|
|
69
|
-
return {
|
|
70
|
-
enabled: false,
|
|
71
|
-
blockedByMissingCapability: false
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
enabled: this.getDefaultRerankEnabled(),
|
|
76
|
-
blockedByMissingCapability: false
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
61
|
}
|
|
80
62
|
//# sourceMappingURL=capabilities.js.map
|
package/dist/core/handlers.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Context } from "@zokizuan/satori-core";
|
|
1
|
+
import { Context, VoyageAIReranker } from "@zokizuan/satori-core";
|
|
2
|
+
import { CapabilityResolver } from "./capabilities.js";
|
|
2
3
|
import { SnapshotManager } from "./snapshot.js";
|
|
3
4
|
import { SyncManager } from "./sync.js";
|
|
4
5
|
import { IndexFingerprint } from "../config.js";
|
|
@@ -8,12 +9,15 @@ export declare class ToolHandlers {
|
|
|
8
9
|
private context;
|
|
9
10
|
private snapshotManager;
|
|
10
11
|
private syncManager;
|
|
12
|
+
private readonly capabilities;
|
|
11
13
|
private runtimeFingerprint;
|
|
12
14
|
private indexingStats;
|
|
13
15
|
private currentWorkspace;
|
|
14
16
|
private readonly now;
|
|
15
17
|
private readonly callGraphManager;
|
|
16
|
-
|
|
18
|
+
private readonly reranker;
|
|
19
|
+
private readonly changedFilesCache;
|
|
20
|
+
constructor(context: Context, snapshotManager: SnapshotManager, syncManager: SyncManager, runtimeFingerprint: IndexFingerprint, capabilities: CapabilityResolver, now?: () => number, callGraphManager?: CallGraphSidecarManager, reranker?: VoyageAIReranker | null);
|
|
17
21
|
private buildReindexInstruction;
|
|
18
22
|
private buildReindexHint;
|
|
19
23
|
private summarizeFingerprint;
|
|
@@ -40,6 +44,17 @@ export declare class ToolHandlers {
|
|
|
40
44
|
private classifyNoiseCategory;
|
|
41
45
|
private roundRatio;
|
|
42
46
|
private buildNoiseMitigationHint;
|
|
47
|
+
private tokenizeQueryPrefix;
|
|
48
|
+
private unquoteOperatorValue;
|
|
49
|
+
private parseSearchOperators;
|
|
50
|
+
private pathMatchesAnyPattern;
|
|
51
|
+
private tokenMatchesAnyField;
|
|
52
|
+
private resolveRerankDecision;
|
|
53
|
+
private buildRerankDocument;
|
|
54
|
+
private buildOperatorSummary;
|
|
55
|
+
private parseGitStatusChangedPaths;
|
|
56
|
+
private getChangedFilesForCodebase;
|
|
57
|
+
private applyGroupDiversity;
|
|
43
58
|
private shouldIncludeCategoryInScope;
|
|
44
59
|
private parseIndexedAtMs;
|
|
45
60
|
private getStalenessBucket;
|
|
@@ -48,6 +63,8 @@ export declare class ToolHandlers {
|
|
|
48
63
|
private buildFallbackGroupId;
|
|
49
64
|
private isCallGraphLanguageSupported;
|
|
50
65
|
private buildCallGraphHint;
|
|
66
|
+
private sanitizeIndexedRelativeFilePath;
|
|
67
|
+
private buildNavigationFallback;
|
|
51
68
|
private normalizeRelativeFilePath;
|
|
52
69
|
private buildRequiresReindexFileOutlinePayload;
|
|
53
70
|
private getOutlineStatusForLanguage;
|
|
@@ -137,6 +154,8 @@ export declare class ToolHandlers {
|
|
|
137
154
|
searchPassCount: number;
|
|
138
155
|
searchPassSuccessCount: number;
|
|
139
156
|
searchPassFailureCount: number;
|
|
157
|
+
rerankerAttempted: boolean;
|
|
158
|
+
rerankerUsed: boolean;
|
|
140
159
|
};
|
|
141
160
|
};
|
|
142
161
|
isError?: undefined;
|
|
@@ -159,6 +178,8 @@ export declare class ToolHandlers {
|
|
|
159
178
|
searchPassCount: number;
|
|
160
179
|
searchPassSuccessCount: number;
|
|
161
180
|
searchPassFailureCount: number;
|
|
181
|
+
rerankerAttempted: boolean;
|
|
182
|
+
rerankerUsed: boolean;
|
|
162
183
|
};
|
|
163
184
|
};
|
|
164
185
|
} | {
|