@iris-eval/mcp-server 0.1.9 → 0.2.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/README.md CHANGED
@@ -204,7 +204,7 @@ Verify which version is running:
204
204
 
205
205
  ```bash
206
206
  npx @iris-eval/mcp-server --help
207
- # Shows "Iris MCP-Native Agent Eval & Observability Server vX.Y.Z"
207
+ # Shows "Iris MCP-Native Agent Eval Server vX.Y.Z"
208
208
  ```
209
209
 
210
210
  ### Updating
@@ -23,7 +23,7 @@ export const defaultConfig = {
23
23
  transport: {
24
24
  type: 'stdio',
25
25
  port: 3000,
26
- host: '0.0.0.0',
26
+ host: '127.0.0.1',
27
27
  },
28
28
  dashboard: {
29
29
  enabled: false,
@@ -31,6 +31,14 @@ export const defaultConfig = {
31
31
  },
32
32
  eval: {
33
33
  defaultThreshold: 0.7,
34
+ ruleThresholds: {
35
+ min_output_length: 50,
36
+ min_sentences: 2,
37
+ keyword_overlap: 0.35,
38
+ topic_consistency: 0.10,
39
+ cost_threshold: 0.10,
40
+ max_token_ratio: 5,
41
+ },
34
42
  },
35
43
  logging: {
36
44
  level: 'info',
@@ -2,7 +2,6 @@ import { readFileSync, mkdirSync, existsSync } from 'node:fs';
2
2
  import { join, dirname } from 'node:path';
3
3
  import { homedir } from 'node:os';
4
4
  import { defaultConfig } from './defaults.js';
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
5
  function deepMerge(target, source) {
7
6
  const result = { ...target };
8
7
  for (const key of Object.keys(source)) {
@@ -22,12 +21,21 @@ function deepMerge(target, source) {
22
21
  return result;
23
22
  }
24
23
  function loadConfigFile(path) {
24
+ let content;
25
+ try {
26
+ content = readFileSync(path, 'utf-8');
27
+ }
28
+ catch (err) {
29
+ if (err.code === 'ENOENT') {
30
+ return {};
31
+ }
32
+ throw new Error(`Cannot read config file ${path}: ${err.message}`);
33
+ }
25
34
  try {
26
- const content = readFileSync(path, 'utf-8');
27
35
  return JSON.parse(content);
28
36
  }
29
- catch {
30
- return {};
37
+ catch (err) {
38
+ throw new Error(`Invalid JSON in config file ${path}: ${err.message}`);
31
39
  }
32
40
  }
33
41
  function loadEnvVars() {
@@ -38,6 +46,9 @@ function loadEnvVars() {
38
46
  if (process.env.IRIS_PORT) {
39
47
  config.transport = { ...config.transport, port: parseInt(process.env.IRIS_PORT) };
40
48
  }
49
+ if (process.env.IRIS_HOST) {
50
+ config.transport = { ...config.transport, host: process.env.IRIS_HOST };
51
+ }
41
52
  if (process.env.IRIS_DB_PATH) {
42
53
  config.storage = { type: 'sqlite', path: process.env.IRIS_DB_PATH };
43
54
  }