@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 ham-zax
3
+ Copyright (c) 2026 Hamza (@ham-zax)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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
- Prefer the CLI installer when possible:
7
+ Use the CLI installer for normal setup:
8
8
 
9
9
  ```bash
10
- npx -y @zokizuan/satori-cli@0.3.2 install --client codex
11
- npx -y @zokizuan/satori-cli@0.3.2 install --client claude
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
- Manual MCP config:
16
-
17
- ```json
18
- {
19
- "mcpServers": {
20
- "satori": {
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
- Keep startup timeout at `180000` for first-run package resolution.
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 excludes docs/tests, docs returns docs/tests only, mixed includes all. Docs scope skips reranker by policy in the current tool surface. |
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. |
@@ -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: 180000,
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;
@@ -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") {
@@ -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: string;
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
  }