@zokizuan/satori-mcp 4.10.1 → 4.11.1
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/LICENSE +1 -1
- package/README.md +46 -27
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.js +3 -3
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +6 -3
- package/dist/cli/install.d.ts +11 -1
- package/dist/cli/install.js +472 -57
- package/dist/config.d.ts +1 -0
- package/dist/config.js +11 -5
- package/dist/core/backend-diagnostics.d.ts +15 -0
- package/dist/core/backend-diagnostics.js +150 -0
- package/dist/core/handlers.d.ts +45 -0
- package/dist/core/handlers.js +193 -33
- package/dist/core/manage-types.d.ts +3 -2
- package/dist/core/search-constants.d.ts +1 -1
- package/dist/core/search-constants.js +21 -6
- package/dist/core/search-types.d.ts +16 -2
- package/dist/core/sync.js +4 -2
- package/dist/core/warnings.d.ts +2 -0
- package/dist/core/warnings.js +2 -0
- package/dist/tools/manage_index.js +49 -23
- package/dist/tools/search_codebase.js +69 -9
- package/dist/tools/setup-errors.d.ts +13 -0
- package/dist/tools/setup-errors.js +43 -0
- package/package.json +5 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -4,38 +4,22 @@ Read-only MCP server for Satori. It gives coding agents six deterministic tools
|
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use the CLI installer for normal setup:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx -y @zokizuan/satori-cli@0.
|
|
11
|
-
npx -y @zokizuan/satori-cli@0.
|
|
12
|
-
npx -y @zokizuan/satori-cli@0.3.2 doctor
|
|
10
|
+
npx -y @zokizuan/satori-cli@0.4.1 install --client all
|
|
11
|
+
npx -y @zokizuan/satori-cli@0.4.1 doctor
|
|
13
12
|
```
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"command": "npx",
|
|
22
|
-
"args": ["-y", "@zokizuan/satori-mcp@4.10.1"],
|
|
23
|
-
"timeout": 180000,
|
|
24
|
-
"env": {
|
|
25
|
-
"EMBEDDING_PROVIDER": "VoyageAI",
|
|
26
|
-
"EMBEDDING_MODEL": "voyage-4-large",
|
|
27
|
-
"EMBEDDING_OUTPUT_DIMENSION": "1024",
|
|
28
|
-
"VOYAGEAI_API_KEY": "your-api-key",
|
|
29
|
-
"VOYAGEAI_RERANKER_MODEL": "rerank-2.5",
|
|
30
|
-
"MILVUS_ADDRESS": "your-milvus-endpoint",
|
|
31
|
-
"MILVUS_TOKEN": "your-milvus-token"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
14
|
+
The CLI installer supports `codex`, `claude`, `opencode`, and `all`. It creates the runtime cache, writes the stable launcher, and writes client config for you. Avoid using `npx` as the resident MCP server command; first-run package resolution can exceed normal MCP startup timeouts.
|
|
15
|
+
|
|
16
|
+
Advanced direct execution is available through the package bin:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx -y @zokizuan/satori-mcp@4.11.1 --help
|
|
36
20
|
```
|
|
37
21
|
|
|
38
|
-
|
|
22
|
+
Use direct package execution for inspection, smoke tests, or unsupported harnesses. For supported clients, prefer `satori-cli install` so startup does not depend on package-manager resolution.
|
|
39
23
|
|
|
40
24
|
## Agent Workflow
|
|
41
25
|
|
|
@@ -60,6 +44,41 @@ Important defaults:
|
|
|
60
44
|
|
|
61
45
|
Configure an embedding provider and Milvus-compatible backend before indexing. Supported embedding providers are OpenAI, VoyageAI, Gemini, and Ollama. Changing provider, model, dimension, vector store, or schema requires a reindex because those values are part of the index fingerprint.
|
|
62
46
|
|
|
47
|
+
MCP startup, `tools/list`, and installer operations are lazy with respect to provider credentials. Missing provider values become `MISSING_PROVIDER_CONFIG` only when a provider-backed tool call needs them.
|
|
48
|
+
|
|
49
|
+
Installer-managed client config starts the resident launcher. Runtime provider settings come from the MCP client's environment and are exposed in native client config:
|
|
50
|
+
|
|
51
|
+
- Codex writes active `env_vars` forwarding plus an optional commented `[mcp_servers.satori.env]` template in `~/.codex/config.toml`.
|
|
52
|
+
- Claude Code writes `mcpServers.satori.env` in `~/.claude.json` with `${VAR:-}` pass-through values.
|
|
53
|
+
- OpenCode writes `mcp.satori.environment` in `~/.config/opencode/opencode.json` with `{env:VAR}` pass-through values.
|
|
54
|
+
|
|
55
|
+
Users who want literal values in a client config can replace the generated pass-through value for that client. In Codex, uncomment or add this table outside the installer-managed launcher block so reinstalls keep edits:
|
|
56
|
+
|
|
57
|
+
```toml
|
|
58
|
+
[mcp_servers.satori.env]
|
|
59
|
+
EMBEDDING_PROVIDER = "VoyageAI"
|
|
60
|
+
EMBEDDING_MODEL = "voyage-4-large"
|
|
61
|
+
EMBEDDING_OUTPUT_DIMENSION = "1024"
|
|
62
|
+
VOYAGEAI_API_KEY = "pa-..."
|
|
63
|
+
VOYAGEAI_RERANKER_MODEL = "rerank-2.5"
|
|
64
|
+
MILVUS_ADDRESS = "https://your-zilliz-endpoint"
|
|
65
|
+
MILVUS_TOKEN = "your-zilliz-token"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Cloud-quality setup:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
EMBEDDING_PROVIDER=VoyageAI
|
|
72
|
+
EMBEDDING_MODEL=voyage-4-large
|
|
73
|
+
EMBEDDING_OUTPUT_DIMENSION=1024
|
|
74
|
+
VOYAGEAI_API_KEY=your-api-key
|
|
75
|
+
VOYAGEAI_RERANKER_MODEL=rerank-2.5
|
|
76
|
+
MILVUS_ADDRESS=your-milvus-endpoint
|
|
77
|
+
MILVUS_TOKEN=your-milvus-token
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The full generated tool reference below is kept in the npm README for MCP clients and package consumers.
|
|
81
|
+
|
|
63
82
|
<!-- TOOLS_START -->
|
|
64
83
|
|
|
65
84
|
## Tool Reference
|
|
@@ -86,7 +105,7 @@ Unified semantic search with runtime-first defaults (start with scope="runtime")
|
|
|
86
105
|
|---|---|---|---|---|
|
|
87
106
|
| `path` | string | yes | | ABSOLUTE path to an indexed codebase or subdirectory. |
|
|
88
107
|
| `query` | string | yes | | Natural-language query. |
|
|
89
|
-
| `scope` | enum("runtime", "mixed", "docs") | no | `"runtime"` | Search scope policy. runtime
|
|
108
|
+
| `scope` | enum("runtime", "mixed", "docs") | no | `"runtime"` | Search scope policy. runtime includes source/runtime code and tests while excluding docs/generated/artifacts/landing/fixtures; docs returns docs/tests only; mixed includes all. Docs scope skips reranker by policy in the current tool surface. |
|
|
90
109
|
| `resultMode` | enum("grouped", "raw") | no | `"grouped"` | Output mode. grouped returns merged search groups, raw returns chunk hits. |
|
|
91
110
|
| `groupBy` | enum("symbol", "file") | no | `"symbol"` | Grouping strategy in grouped mode. |
|
|
92
111
|
| `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. |
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface ResolveRawArgsOptions {
|
|
|
47
47
|
stdin?: NodeJS.ReadStream;
|
|
48
48
|
stdinTimeoutMs: number;
|
|
49
49
|
}
|
|
50
|
-
export type InstallClient = "all" | "claude" | "codex";
|
|
50
|
+
export type InstallClient = "all" | "claude" | "codex" | "opencode";
|
|
51
51
|
export declare function parseCliArgs(argv: string[]): ParsedCliInput;
|
|
52
52
|
export declare function resolveRawArguments(rawArgsMode: RawArgsMode, options: ResolveRawArgsOptions): Promise<Record<string, unknown>>;
|
|
53
53
|
export declare function parseWrapperArgumentsFromSchema(toolName: string, inputSchema: unknown, wrapperArgs: string[]): Record<string, unknown>;
|
package/dist/cli/args.js
CHANGED
|
@@ -20,7 +20,7 @@ function stripFlagPrefix(token) {
|
|
|
20
20
|
}
|
|
21
21
|
function parseGlobalOptions(argv) {
|
|
22
22
|
const globals = {
|
|
23
|
-
startupTimeoutMs:
|
|
23
|
+
startupTimeoutMs: 30000,
|
|
24
24
|
callTimeoutMs: 600000,
|
|
25
25
|
format: "json",
|
|
26
26
|
debug: false,
|
|
@@ -116,8 +116,8 @@ function parseInstallCommand(kind, args) {
|
|
|
116
116
|
const token = args[i];
|
|
117
117
|
if (token === "--client") {
|
|
118
118
|
const next = args[i + 1];
|
|
119
|
-
if (next !== "all" && next !== "claude" && next !== "codex") {
|
|
120
|
-
throw new CliError("E_USAGE", "--client must be one of: all, claude, codex.", 2);
|
|
119
|
+
if (next !== "all" && next !== "claude" && next !== "codex" && next !== "opencode") {
|
|
120
|
+
throw new CliError("E_USAGE", "--client must be one of: all, claude, codex, opencode.", 2);
|
|
121
121
|
}
|
|
122
122
|
client = next;
|
|
123
123
|
i += 1;
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { type ManagedRuntimeCommand } from "./install.js";
|
|
2
3
|
interface RunCliOptions {
|
|
3
4
|
writeStdout?: (text: string) => void;
|
|
4
5
|
writeStderr?: (text: string) => void;
|
|
@@ -11,6 +12,7 @@ interface RunCliOptions {
|
|
|
11
12
|
callTimeoutMs?: number;
|
|
12
13
|
cwd?: string;
|
|
13
14
|
installabilityVerifier?: () => string | Promise<string>;
|
|
15
|
+
installRuntimeCommand?: ManagedRuntimeCommand;
|
|
14
16
|
connectSession?: (options: {
|
|
15
17
|
command: string;
|
|
16
18
|
args: string[];
|
package/dist/cli/index.js
CHANGED
|
@@ -44,8 +44,8 @@ function buildHelpPayload() {
|
|
|
44
44
|
return {
|
|
45
45
|
usage: "satori-cli <command>",
|
|
46
46
|
commands: [
|
|
47
|
-
"install [--client all|codex|claude] [--dry-run]",
|
|
48
|
-
"uninstall [--client all|codex|claude] [--dry-run]",
|
|
47
|
+
"install [--client all|codex|claude|opencode] [--dry-run]",
|
|
48
|
+
"uninstall [--client all|codex|claude|opencode] [--dry-run]",
|
|
49
49
|
"tools list",
|
|
50
50
|
"tool call <toolName> --args-json '<json>'",
|
|
51
51
|
"tool call <toolName> --args-file <path>",
|
|
@@ -196,11 +196,14 @@ export async function runCli(argv, options = {}) {
|
|
|
196
196
|
return 0;
|
|
197
197
|
}
|
|
198
198
|
if (parsed.command.kind === "install" || parsed.command.kind === "uninstall") {
|
|
199
|
+
let packageSpecifier;
|
|
199
200
|
if (parsed.command.kind === "install") {
|
|
200
|
-
await (options.installabilityVerifier || verifyManagedPackageInstallability)();
|
|
201
|
+
packageSpecifier = await (options.installabilityVerifier || verifyManagedPackageInstallability)();
|
|
201
202
|
}
|
|
202
203
|
const result = executeInstallCommand(parsed.command, {
|
|
203
204
|
homeDir: effectiveEnv.HOME,
|
|
205
|
+
packageSpecifier,
|
|
206
|
+
runtimeCommand: options.installRuntimeCommand,
|
|
204
207
|
});
|
|
205
208
|
emitJson(writers, result);
|
|
206
209
|
if (parsed.globals.format === "text") {
|
package/dist/cli/install.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
1
2
|
import type { InstallClient } from "./args.js";
|
|
3
|
+
type ExecFileSyncLike = typeof execFileSync;
|
|
2
4
|
type ClientName = Exclude<InstallClient, "all">;
|
|
5
|
+
export interface ManagedRuntimeCommand {
|
|
6
|
+
command: string;
|
|
7
|
+
args: string[];
|
|
8
|
+
}
|
|
3
9
|
export interface InstallCommandInput {
|
|
4
10
|
kind: "install" | "uninstall";
|
|
5
11
|
client: InstallClient;
|
|
@@ -9,13 +15,17 @@ export interface InstallCommandOptions {
|
|
|
9
15
|
homeDir?: string;
|
|
10
16
|
packageSpecifier?: string;
|
|
11
17
|
skillAssetRoot?: string;
|
|
18
|
+
runtimeCommand?: ManagedRuntimeCommand;
|
|
19
|
+
execFileSyncImpl?: ExecFileSyncLike;
|
|
12
20
|
}
|
|
13
21
|
export interface ClientInstallResult {
|
|
14
22
|
client: ClientName;
|
|
15
23
|
configPath: string;
|
|
16
|
-
skillsPath
|
|
24
|
+
skillsPath?: string;
|
|
25
|
+
instructionsPath?: string;
|
|
17
26
|
configChanged: boolean;
|
|
18
27
|
skillsChanged: boolean;
|
|
28
|
+
instructionsChanged: boolean;
|
|
19
29
|
status: "updated" | "unchanged";
|
|
20
30
|
dryRun: boolean;
|
|
21
31
|
}
|