@mushi-mushi/mcp 0.20.0 → 0.20.2

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/server.d.ts CHANGED
@@ -19,6 +19,8 @@ import { FeatureFilter } from './feature-groups.js';
19
19
  * a proxy strips first.
20
20
  */
21
21
 
22
+ /** Resolve the per-request timeout from `MUSHI_MCP_TIMEOUT_MS`, clamped. Exported for tests. */
23
+ declare function resolveTimeoutMsFromEnv(): number;
22
24
  declare class MushiApiError extends Error {
23
25
  readonly status: number;
24
26
  readonly code: string;
@@ -49,6 +51,12 @@ interface MushiServerConfig {
49
51
  * Set via `MUSHI_FEATURES` env (CSV) on stdio; HTTP uses `?features=` query.
50
52
  */
51
53
  features?: FeatureFilter;
54
+ /**
55
+ * Per-request timeout in ms for every Mushi API call a tool makes.
56
+ * Defaults to `MUSHI_MCP_TIMEOUT_MS` (clamped to 250ms…5min) or 15000.
57
+ * Explicit values are honoured as given — tests use small ones.
58
+ */
59
+ timeoutMs?: number;
52
60
  }
53
61
  /**
54
62
  * Build an MCP server instance pre-wired with every Mushi tool, resource,
@@ -57,4 +65,4 @@ interface MushiServerConfig {
57
65
  */
58
66
  declare function createMushiServer(config: MushiServerConfig): McpServer;
59
67
 
60
- export { MushiApiError, type MushiServerConfig, createMushiServer };
68
+ export { MushiApiError, type MushiServerConfig, createMushiServer, resolveTimeoutMsFromEnv };