@dotsetlabs/bellwether 2.1.0 → 2.1.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +48 -31
  3. package/dist/cli/commands/check.js +49 -6
  4. package/dist/cli/commands/dashboard.d.ts +3 -0
  5. package/dist/cli/commands/dashboard.js +69 -0
  6. package/dist/cli/commands/discover.js +24 -2
  7. package/dist/cli/commands/explore.js +49 -6
  8. package/dist/cli/commands/watch.js +12 -1
  9. package/dist/cli/index.js +27 -34
  10. package/dist/cli/utils/headers.d.ts +12 -0
  11. package/dist/cli/utils/headers.js +63 -0
  12. package/dist/config/defaults.d.ts +2 -0
  13. package/dist/config/defaults.js +2 -0
  14. package/dist/config/template.js +12 -0
  15. package/dist/config/validator.d.ts +38 -18
  16. package/dist/config/validator.js +10 -0
  17. package/dist/constants/core.d.ts +4 -2
  18. package/dist/constants/core.js +13 -2
  19. package/dist/dashboard/index.d.ts +3 -0
  20. package/dist/dashboard/index.js +6 -0
  21. package/dist/dashboard/runtime/artifact-index.d.ts +45 -0
  22. package/dist/dashboard/runtime/artifact-index.js +238 -0
  23. package/dist/dashboard/runtime/command-profiles.d.ts +764 -0
  24. package/dist/dashboard/runtime/command-profiles.js +691 -0
  25. package/dist/dashboard/runtime/config-service.d.ts +21 -0
  26. package/dist/dashboard/runtime/config-service.js +73 -0
  27. package/dist/dashboard/runtime/job-runner.d.ts +26 -0
  28. package/dist/dashboard/runtime/job-runner.js +292 -0
  29. package/dist/dashboard/security/input-validation.d.ts +3 -0
  30. package/dist/dashboard/security/input-validation.js +27 -0
  31. package/dist/dashboard/security/localhost-guard.d.ts +5 -0
  32. package/dist/dashboard/security/localhost-guard.js +52 -0
  33. package/dist/dashboard/server.d.ts +14 -0
  34. package/dist/dashboard/server.js +293 -0
  35. package/dist/dashboard/types.d.ts +55 -0
  36. package/dist/dashboard/types.js +2 -0
  37. package/dist/dashboard/ui.d.ts +2 -0
  38. package/dist/dashboard/ui.js +2264 -0
  39. package/dist/discovery/discovery.js +20 -1
  40. package/dist/discovery/types.d.ts +1 -1
  41. package/dist/docs/contract.js +7 -1
  42. package/dist/errors/retry.js +15 -1
  43. package/dist/errors/types.d.ts +10 -0
  44. package/dist/errors/types.js +28 -0
  45. package/dist/logging/logger.js +5 -2
  46. package/dist/transport/env-filter.d.ts +6 -0
  47. package/dist/transport/env-filter.js +76 -0
  48. package/dist/transport/http-transport.js +10 -0
  49. package/dist/transport/mcp-client.d.ts +16 -9
  50. package/dist/transport/mcp-client.js +119 -88
  51. package/dist/transport/sse-transport.js +19 -0
  52. package/dist/version.js +2 -2
  53. package/package.json +5 -15
  54. package/man/bellwether.1 +0 -204
  55. package/man/bellwether.1.md +0 -148
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Utilities for parsing and merging HTTP headers from CLI/config.
3
+ */
4
+ /**
5
+ * Parse CLI --header values ("Name: value") into a validated header map.
6
+ */
7
+ export declare function parseCliHeaders(values?: string[]): Record<string, string> | undefined;
8
+ /**
9
+ * Merge two header maps case-insensitively, with override precedence.
10
+ */
11
+ export declare function mergeHeaders(base?: Record<string, string>, override?: Record<string, string>): Record<string, string> | undefined;
12
+ //# sourceMappingURL=headers.d.ts.map
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Utilities for parsing and merging HTTP headers from CLI/config.
3
+ */
4
+ const HEADER_NAME_PATTERN = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
5
+ /**
6
+ * Parse CLI --header values ("Name: value") into a validated header map.
7
+ */
8
+ export function parseCliHeaders(values) {
9
+ if (!values || values.length === 0) {
10
+ return undefined;
11
+ }
12
+ const headers = {};
13
+ for (const raw of values) {
14
+ const separator = raw.indexOf(':');
15
+ if (separator <= 0) {
16
+ throw new Error(`Invalid header "${raw}". Expected format: "Name: value" (example: "Authorization: Bearer token").`);
17
+ }
18
+ const name = raw.slice(0, separator).trim();
19
+ const value = raw.slice(separator + 1).trim();
20
+ if (!name) {
21
+ throw new Error(`Invalid header "${raw}". Header name cannot be empty.`);
22
+ }
23
+ if (!HEADER_NAME_PATTERN.test(name)) {
24
+ throw new Error(`Invalid header name "${name}". Header names may only include RFC 7230 token characters.`);
25
+ }
26
+ if (value.includes('\n') || value.includes('\r')) {
27
+ throw new Error(`Invalid header "${name}". Header value cannot contain newlines.`);
28
+ }
29
+ setHeaderCaseInsensitive(headers, name, value);
30
+ }
31
+ return Object.keys(headers).length > 0 ? headers : undefined;
32
+ }
33
+ /**
34
+ * Merge two header maps case-insensitively, with override precedence.
35
+ */
36
+ export function mergeHeaders(base, override) {
37
+ if (!base && !override) {
38
+ return undefined;
39
+ }
40
+ const merged = {};
41
+ if (base) {
42
+ for (const [name, value] of Object.entries(base)) {
43
+ setHeaderCaseInsensitive(merged, name, value);
44
+ }
45
+ }
46
+ if (override) {
47
+ for (const [name, value] of Object.entries(override)) {
48
+ setHeaderCaseInsensitive(merged, name, value);
49
+ }
50
+ }
51
+ return Object.keys(merged).length > 0 ? merged : undefined;
52
+ }
53
+ function setHeaderCaseInsensitive(headers, name, value) {
54
+ const normalized = name.toLowerCase();
55
+ for (const existing of Object.keys(headers)) {
56
+ if (existing.toLowerCase() === normalized) {
57
+ delete headers[existing];
58
+ break;
59
+ }
60
+ }
61
+ headers[name] = value;
62
+ }
63
+ //# sourceMappingURL=headers.js.map
@@ -6,6 +6,7 @@ export declare const CONFIG_DEFAULTS: {
6
6
  readonly transport: "stdio";
7
7
  readonly url: "";
8
8
  readonly sessionId: "";
9
+ readonly headers: Record<string, string> | undefined;
9
10
  };
10
11
  readonly llm: {
11
12
  readonly provider: "ollama";
@@ -128,6 +129,7 @@ export declare const CONFIG_DEFAULTS: {
128
129
  readonly transport: "stdio";
129
130
  readonly url: "";
130
131
  readonly sessionId: "";
132
+ readonly headers: Record<string, string> | undefined;
131
133
  };
132
134
  readonly registry: {
133
135
  readonly limit: 10;
@@ -8,6 +8,7 @@ export const CONFIG_DEFAULTS = {
8
8
  transport: 'stdio',
9
9
  url: '',
10
10
  sessionId: '',
11
+ headers: undefined,
11
12
  },
12
13
  llm: {
13
14
  provider: 'ollama',
@@ -137,6 +138,7 @@ export const CONFIG_DEFAULTS = {
137
138
  transport: 'stdio',
138
139
  url: '',
139
140
  sessionId: '',
141
+ headers: undefined,
140
142
  },
141
143
  registry: {
142
144
  limit: 10,
@@ -55,6 +55,12 @@ server:
55
55
  # Session ID for remote authentication (optional)
56
56
  # sessionId: "your-session-id"
57
57
 
58
+ # Custom headers for remote server authentication
59
+ # Headers support \${VAR} environment variable interpolation
60
+ # headers:
61
+ # Authorization: "Bearer \${MCP_SERVER_TOKEN}"
62
+ # X-API-Key: "\${MCP_API_KEY}"
63
+
58
64
  # Timeout for server startup and tool calls (milliseconds, default: ${defaults.server.timeout})
59
65
  timeout: ${defaults.server.timeout}
60
66
 
@@ -388,6 +394,12 @@ discovery:
388
394
  # Session ID for remote server authentication
389
395
  # sessionId: "session-id"
390
396
 
397
+ # Custom headers for remote server authentication
398
+ # Headers support \${VAR} environment variable interpolation
399
+ # headers:
400
+ # Authorization: "Bearer \${MCP_SERVER_TOKEN}"
401
+ # X-API-Key: "\${MCP_API_KEY}"
402
+
391
403
  # =============================================================================
392
404
  # REGISTRY COMMAND SETTINGS
393
405
  # =============================================================================
@@ -23,6 +23,8 @@ export declare const serverConfigSchema: z.ZodDefault<z.ZodObject<{
23
23
  sessionId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
24
24
  /** Additional environment variables */
25
25
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
26
+ /** Custom headers for remote server authentication */
27
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
26
28
  }, "strip", z.ZodTypeAny, {
27
29
  command: string;
28
30
  args: string[];
@@ -30,6 +32,7 @@ export declare const serverConfigSchema: z.ZodDefault<z.ZodObject<{
30
32
  timeout: number;
31
33
  sessionId: string;
32
34
  url: string;
35
+ headers?: Record<string, string> | undefined;
33
36
  env?: Record<string, string> | undefined;
34
37
  }, {
35
38
  command?: string | undefined;
@@ -37,6 +40,7 @@ export declare const serverConfigSchema: z.ZodDefault<z.ZodObject<{
37
40
  transport?: "stdio" | "sse" | "streamable-http" | undefined;
38
41
  timeout?: number | undefined;
39
42
  sessionId?: string | undefined;
43
+ headers?: Record<string, string> | undefined;
40
44
  url?: string | undefined;
41
45
  env?: Record<string, string> | undefined;
42
46
  }>>;
@@ -73,19 +77,19 @@ export declare const llmConfigSchema: z.ZodDefault<z.ZodObject<{
73
77
  /** Environment variable for Anthropic API key */
74
78
  anthropicApiKeyEnvVar: z.ZodOptional<z.ZodString>;
75
79
  }, "strip", z.ZodTypeAny, {
80
+ provider: "openai" | "anthropic" | "ollama";
81
+ model: string;
76
82
  ollama: {
77
83
  baseUrl: string;
78
84
  };
79
- model: string;
80
- provider: "openai" | "anthropic" | "ollama";
81
85
  openaiApiKeyEnvVar?: string | undefined;
82
86
  anthropicApiKeyEnvVar?: string | undefined;
83
87
  }, {
88
+ provider?: "openai" | "anthropic" | "ollama" | undefined;
89
+ model?: string | undefined;
84
90
  ollama?: {
85
91
  baseUrl?: string | undefined;
86
92
  } | undefined;
87
- model?: string | undefined;
88
- provider?: "openai" | "anthropic" | "ollama" | undefined;
89
93
  openaiApiKeyEnvVar?: string | undefined;
90
94
  anthropicApiKeyEnvVar?: string | undefined;
91
95
  }>>;
@@ -877,25 +881,25 @@ export declare const baselineConfigSchema: z.ZodDefault<z.ZodObject<{
877
881
  aspectOverrides?: Partial<Record<"error_handling" | "resource" | "server" | "security" | "response_format" | "response_structure" | "response_schema_evolution" | "error_pattern" | "performance" | "schema" | "description" | "prompt" | "capability", "none" | "info" | "warning" | "breaking">> | undefined;
878
882
  }>>;
879
883
  }, "strip", z.ZodTypeAny, {
880
- path: string;
881
884
  severity: {
882
885
  minimumSeverity: "none" | "info" | "warning" | "breaking";
883
886
  failOnSeverity: "none" | "info" | "warning" | "breaking";
884
887
  suppressWarnings: boolean;
885
888
  aspectOverrides?: Partial<Record<"error_handling" | "resource" | "server" | "security" | "response_format" | "response_structure" | "response_schema_evolution" | "error_pattern" | "performance" | "schema" | "description" | "prompt" | "capability", "none" | "info" | "warning" | "breaking">> | undefined;
886
889
  };
890
+ path: string;
887
891
  failOnDrift: boolean;
888
892
  outputFormat: "text" | "json" | "markdown" | "compact";
889
893
  savePath?: string | undefined;
890
894
  comparePath?: string | undefined;
891
895
  }, {
892
- path?: string | undefined;
893
896
  severity?: {
894
897
  minimumSeverity?: "none" | "info" | "warning" | "breaking" | undefined;
895
898
  failOnSeverity?: "none" | "info" | "warning" | "breaking" | undefined;
896
899
  suppressWarnings?: boolean | undefined;
897
900
  aspectOverrides?: Partial<Record<"error_handling" | "resource" | "server" | "security" | "response_format" | "response_structure" | "response_schema_evolution" | "error_pattern" | "performance" | "schema" | "description" | "prompt" | "capability", "none" | "info" | "warning" | "breaking">> | undefined;
898
901
  } | undefined;
902
+ path?: string | undefined;
899
903
  savePath?: string | undefined;
900
904
  comparePath?: string | undefined;
901
905
  failOnDrift?: boolean | undefined;
@@ -968,16 +972,20 @@ export declare const discoveryConfigSchema: z.ZodDefault<z.ZodObject<{
968
972
  url: z.ZodDefault<z.ZodOptional<z.ZodString>>;
969
973
  /** Session ID for remote auth */
970
974
  sessionId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
975
+ /** Custom headers for remote server authentication */
976
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
971
977
  }, "strip", z.ZodTypeAny, {
972
978
  transport: "stdio" | "sse" | "streamable-http";
973
979
  timeout: number;
974
980
  sessionId: string;
975
981
  url: string;
976
982
  json: boolean;
983
+ headers?: Record<string, string> | undefined;
977
984
  }, {
978
985
  transport?: "stdio" | "sse" | "streamable-http" | undefined;
979
986
  timeout?: number | undefined;
980
987
  sessionId?: string | undefined;
988
+ headers?: Record<string, string> | undefined;
981
989
  url?: string | undefined;
982
990
  json?: boolean | undefined;
983
991
  }>>;
@@ -1077,6 +1085,8 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1077
1085
  sessionId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1078
1086
  /** Additional environment variables */
1079
1087
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1088
+ /** Custom headers for remote server authentication */
1089
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1080
1090
  }, "strip", z.ZodTypeAny, {
1081
1091
  command: string;
1082
1092
  args: string[];
@@ -1084,6 +1094,7 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1084
1094
  timeout: number;
1085
1095
  sessionId: string;
1086
1096
  url: string;
1097
+ headers?: Record<string, string> | undefined;
1087
1098
  env?: Record<string, string> | undefined;
1088
1099
  }, {
1089
1100
  command?: string | undefined;
@@ -1091,6 +1102,7 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1091
1102
  transport?: "stdio" | "sse" | "streamable-http" | undefined;
1092
1103
  timeout?: number | undefined;
1093
1104
  sessionId?: string | undefined;
1105
+ headers?: Record<string, string> | undefined;
1094
1106
  url?: string | undefined;
1095
1107
  env?: Record<string, string> | undefined;
1096
1108
  }>>;
@@ -1114,19 +1126,19 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1114
1126
  /** Environment variable for Anthropic API key */
1115
1127
  anthropicApiKeyEnvVar: z.ZodOptional<z.ZodString>;
1116
1128
  }, "strip", z.ZodTypeAny, {
1129
+ provider: "openai" | "anthropic" | "ollama";
1130
+ model: string;
1117
1131
  ollama: {
1118
1132
  baseUrl: string;
1119
1133
  };
1120
- model: string;
1121
- provider: "openai" | "anthropic" | "ollama";
1122
1134
  openaiApiKeyEnvVar?: string | undefined;
1123
1135
  anthropicApiKeyEnvVar?: string | undefined;
1124
1136
  }, {
1137
+ provider?: "openai" | "anthropic" | "ollama" | undefined;
1138
+ model?: string | undefined;
1125
1139
  ollama?: {
1126
1140
  baseUrl?: string | undefined;
1127
1141
  } | undefined;
1128
- model?: string | undefined;
1129
- provider?: "openai" | "anthropic" | "ollama" | undefined;
1130
1142
  openaiApiKeyEnvVar?: string | undefined;
1131
1143
  anthropicApiKeyEnvVar?: string | undefined;
1132
1144
  }>>;
@@ -1629,25 +1641,25 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1629
1641
  aspectOverrides?: Partial<Record<"error_handling" | "resource" | "server" | "security" | "response_format" | "response_structure" | "response_schema_evolution" | "error_pattern" | "performance" | "schema" | "description" | "prompt" | "capability", "none" | "info" | "warning" | "breaking">> | undefined;
1630
1642
  }>>;
1631
1643
  }, "strip", z.ZodTypeAny, {
1632
- path: string;
1633
1644
  severity: {
1634
1645
  minimumSeverity: "none" | "info" | "warning" | "breaking";
1635
1646
  failOnSeverity: "none" | "info" | "warning" | "breaking";
1636
1647
  suppressWarnings: boolean;
1637
1648
  aspectOverrides?: Partial<Record<"error_handling" | "resource" | "server" | "security" | "response_format" | "response_structure" | "response_schema_evolution" | "error_pattern" | "performance" | "schema" | "description" | "prompt" | "capability", "none" | "info" | "warning" | "breaking">> | undefined;
1638
1649
  };
1650
+ path: string;
1639
1651
  failOnDrift: boolean;
1640
1652
  outputFormat: "text" | "json" | "markdown" | "compact";
1641
1653
  savePath?: string | undefined;
1642
1654
  comparePath?: string | undefined;
1643
1655
  }, {
1644
- path?: string | undefined;
1645
1656
  severity?: {
1646
1657
  minimumSeverity?: "none" | "info" | "warning" | "breaking" | undefined;
1647
1658
  failOnSeverity?: "none" | "info" | "warning" | "breaking" | undefined;
1648
1659
  suppressWarnings?: boolean | undefined;
1649
1660
  aspectOverrides?: Partial<Record<"error_handling" | "resource" | "server" | "security" | "response_format" | "response_structure" | "response_schema_evolution" | "error_pattern" | "performance" | "schema" | "description" | "prompt" | "capability", "none" | "info" | "warning" | "breaking">> | undefined;
1650
1661
  } | undefined;
1662
+ path?: string | undefined;
1651
1663
  savePath?: string | undefined;
1652
1664
  comparePath?: string | undefined;
1653
1665
  failOnDrift?: boolean | undefined;
@@ -1712,16 +1724,20 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1712
1724
  url: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1713
1725
  /** Session ID for remote auth */
1714
1726
  sessionId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1727
+ /** Custom headers for remote server authentication */
1728
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1715
1729
  }, "strip", z.ZodTypeAny, {
1716
1730
  transport: "stdio" | "sse" | "streamable-http";
1717
1731
  timeout: number;
1718
1732
  sessionId: string;
1719
1733
  url: string;
1720
1734
  json: boolean;
1735
+ headers?: Record<string, string> | undefined;
1721
1736
  }, {
1722
1737
  transport?: "stdio" | "sse" | "streamable-http" | undefined;
1723
1738
  timeout?: number | undefined;
1724
1739
  sessionId?: string | undefined;
1740
+ headers?: Record<string, string> | undefined;
1725
1741
  url?: string | undefined;
1726
1742
  json?: boolean | undefined;
1727
1743
  }>>;
@@ -1800,6 +1816,7 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1800
1816
  timeout: number;
1801
1817
  sessionId: string;
1802
1818
  url: string;
1819
+ headers?: Record<string, string> | undefined;
1803
1820
  env?: Record<string, string> | undefined;
1804
1821
  };
1805
1822
  discovery: {
@@ -1808,6 +1825,7 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1808
1825
  sessionId: string;
1809
1826
  url: string;
1810
1827
  json: boolean;
1828
+ headers?: Record<string, string> | undefined;
1811
1829
  };
1812
1830
  check: {
1813
1831
  security: {
@@ -1906,11 +1924,11 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1906
1924
  path?: string | undefined;
1907
1925
  };
1908
1926
  llm: {
1927
+ provider: "openai" | "anthropic" | "ollama";
1928
+ model: string;
1909
1929
  ollama: {
1910
1930
  baseUrl: string;
1911
1931
  };
1912
- model: string;
1913
- provider: "openai" | "anthropic" | "ollama";
1914
1932
  openaiApiKeyEnvVar?: string | undefined;
1915
1933
  anthropicApiKeyEnvVar?: string | undefined;
1916
1934
  };
@@ -1919,13 +1937,13 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1919
1937
  path?: string | undefined;
1920
1938
  };
1921
1939
  baseline: {
1922
- path: string;
1923
1940
  severity: {
1924
1941
  minimumSeverity: "none" | "info" | "warning" | "breaking";
1925
1942
  failOnSeverity: "none" | "info" | "warning" | "breaking";
1926
1943
  suppressWarnings: boolean;
1927
1944
  aspectOverrides?: Partial<Record<"error_handling" | "resource" | "server" | "security" | "response_format" | "response_structure" | "response_schema_evolution" | "error_pattern" | "performance" | "schema" | "description" | "prompt" | "capability", "none" | "info" | "warning" | "breaking">> | undefined;
1928
1945
  };
1946
+ path: string;
1929
1947
  failOnDrift: boolean;
1930
1948
  outputFormat: "text" | "json" | "markdown" | "compact";
1931
1949
  savePath?: string | undefined;
@@ -1967,6 +1985,7 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1967
1985
  transport?: "stdio" | "sse" | "streamable-http" | undefined;
1968
1986
  timeout?: number | undefined;
1969
1987
  sessionId?: string | undefined;
1988
+ headers?: Record<string, string> | undefined;
1970
1989
  url?: string | undefined;
1971
1990
  env?: Record<string, string> | undefined;
1972
1991
  } | undefined;
@@ -1974,6 +1993,7 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
1974
1993
  transport?: "stdio" | "sse" | "streamable-http" | undefined;
1975
1994
  timeout?: number | undefined;
1976
1995
  sessionId?: string | undefined;
1996
+ headers?: Record<string, string> | undefined;
1977
1997
  url?: string | undefined;
1978
1998
  json?: boolean | undefined;
1979
1999
  } | undefined;
@@ -2074,11 +2094,11 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
2074
2094
  autoGenerate?: boolean | undefined;
2075
2095
  } | undefined;
2076
2096
  llm?: {
2097
+ provider?: "openai" | "anthropic" | "ollama" | undefined;
2098
+ model?: string | undefined;
2077
2099
  ollama?: {
2078
2100
  baseUrl?: string | undefined;
2079
2101
  } | undefined;
2080
- model?: string | undefined;
2081
- provider?: "openai" | "anthropic" | "ollama" | undefined;
2082
2102
  openaiApiKeyEnvVar?: string | undefined;
2083
2103
  anthropicApiKeyEnvVar?: string | undefined;
2084
2104
  } | undefined;
@@ -2087,13 +2107,13 @@ export declare const bellwetherConfigSchema: z.ZodObject<{
2087
2107
  only?: boolean | undefined;
2088
2108
  } | undefined;
2089
2109
  baseline?: {
2090
- path?: string | undefined;
2091
2110
  severity?: {
2092
2111
  minimumSeverity?: "none" | "info" | "warning" | "breaking" | undefined;
2093
2112
  failOnSeverity?: "none" | "info" | "warning" | "breaking" | undefined;
2094
2113
  suppressWarnings?: boolean | undefined;
2095
2114
  aspectOverrides?: Partial<Record<"error_handling" | "resource" | "server" | "security" | "response_format" | "response_structure" | "response_schema_evolution" | "error_pattern" | "performance" | "schema" | "description" | "prompt" | "capability", "none" | "info" | "warning" | "breaking">> | undefined;
2096
2115
  } | undefined;
2116
+ path?: string | undefined;
2097
2117
  savePath?: string | undefined;
2098
2118
  comparePath?: string | undefined;
2099
2119
  failOnDrift?: boolean | undefined;
@@ -36,6 +36,8 @@ export const serverConfigSchema = z
36
36
  sessionId: z.string().optional().default(CONFIG_DEFAULTS.server.sessionId),
37
37
  /** Additional environment variables */
38
38
  env: z.record(z.string()).optional(),
39
+ /** Custom headers for remote server authentication */
40
+ headers: z.record(z.string()).optional(),
39
41
  })
40
42
  .default(CONFIG_DEFAULTS.server);
41
43
  /**
@@ -593,6 +595,8 @@ export const discoveryConfigSchema = z
593
595
  url: z.string().optional().default(CONFIG_DEFAULTS.discovery.url),
594
596
  /** Session ID for remote auth */
595
597
  sessionId: z.string().optional().default(CONFIG_DEFAULTS.discovery.sessionId),
598
+ /** Custom headers for remote server authentication */
599
+ headers: z.record(z.string()).optional(),
596
600
  })
597
601
  .default(CONFIG_DEFAULTS.discovery);
598
602
  /**
@@ -723,6 +727,12 @@ export function getConfigWarnings(config) {
723
727
  warnings.push('External services mode is set to "fail" but no credentials detected');
724
728
  }
725
729
  }
730
+ if ((config.server.transport ?? 'stdio') === 'stdio' && config.server.headers) {
731
+ warnings.push('server.headers is set but ignored when server.transport is stdio');
732
+ }
733
+ if ((config.discovery.transport ?? 'stdio') === 'stdio' && config.discovery.headers) {
734
+ warnings.push('discovery.headers is set but ignored when discovery.transport is stdio');
735
+ }
726
736
  return warnings;
727
737
  }
728
738
  /**
@@ -7,8 +7,8 @@ export declare const TIMEOUTS: {
7
7
  readonly WATCH_INTERVAL: 5000;
8
8
  /** Server startup delay (500ms) */
9
9
  readonly SERVER_STARTUP: 500;
10
- /** Minimum server startup wait (5 seconds) */
11
- readonly MIN_SERVER_STARTUP_WAIT: 5000;
10
+ /** Minimum server startup wait (500ms) */
11
+ readonly MIN_SERVER_STARTUP_WAIT: 500;
12
12
  /** Server ready poll interval (100ms) */
13
13
  readonly SERVER_READY_POLL: 100;
14
14
  /** Process shutdown SIGKILL timeout (5 seconds) */
@@ -49,6 +49,8 @@ export declare const TRANSPORT_ERRORS: {
49
49
  readonly BUFFER_OVERFLOW_PATTERNS: readonly RegExp[];
50
50
  /** Patterns indicating connection refusal */
51
51
  readonly CONNECTION_REFUSED_PATTERNS: readonly RegExp[];
52
+ /** Patterns indicating remote authentication/authorization failures */
53
+ readonly AUTH_FAILURE_PATTERNS: readonly RegExp[];
52
54
  /** Patterns indicating connection was lost */
53
55
  readonly CONNECTION_LOST_PATTERNS: readonly RegExp[];
54
56
  /** Patterns indicating MCP protocol violations */
@@ -7,8 +7,8 @@ export const TIMEOUTS = {
7
7
  WATCH_INTERVAL: 5000,
8
8
  /** Server startup delay (500ms) */
9
9
  SERVER_STARTUP: 500,
10
- /** Minimum server startup wait (5 seconds) */
11
- MIN_SERVER_STARTUP_WAIT: 5000,
10
+ /** Minimum server startup wait (500ms) */
11
+ MIN_SERVER_STARTUP_WAIT: 500,
12
12
  /** Server ready poll interval (100ms) */
13
13
  SERVER_READY_POLL: 100,
14
14
  /** Process shutdown SIGKILL timeout (5 seconds) */
@@ -71,6 +71,17 @@ export const TRANSPORT_ERRORS = {
71
71
  /cannot find module/i,
72
72
  /not found/i,
73
73
  ],
74
+ /** Patterns indicating remote authentication/authorization failures */
75
+ AUTH_FAILURE_PATTERNS: [
76
+ /\b401\b/i,
77
+ /\b403\b/i,
78
+ /\b407\b/i,
79
+ /unauthorized/i,
80
+ /forbidden/i,
81
+ /authentication/i,
82
+ /authorization/i,
83
+ /access denied/i,
84
+ ],
74
85
  /** Patterns indicating connection was lost */
75
86
  CONNECTION_LOST_PATTERNS: [
76
87
  /ECONNRESET/i,
@@ -0,0 +1,3 @@
1
+ import type { DashboardServerOptions, DashboardStartedServer } from './types.js';
2
+ export declare function startDashboard(options: DashboardServerOptions): Promise<DashboardStartedServer>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { DashboardServer } from './server.js';
2
+ export async function startDashboard(options) {
3
+ const server = new DashboardServer(options);
4
+ return server.start();
5
+ }
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,45 @@
1
+ export type DashboardArtifactKind = 'json' | 'markdown' | 'text' | 'yaml';
2
+ export interface DashboardArtifactSummary {
3
+ id: string;
4
+ label: string;
5
+ kind: DashboardArtifactKind;
6
+ path: string;
7
+ exists: boolean;
8
+ sizeBytes?: number;
9
+ updatedAt?: string;
10
+ }
11
+ export interface DashboardArtifactContent {
12
+ artifact: DashboardArtifactSummary;
13
+ raw: string;
14
+ parsedJson?: unknown;
15
+ parseError?: string;
16
+ }
17
+ export interface DashboardInterviewReportSummary {
18
+ available: boolean;
19
+ path: string;
20
+ summary?: string;
21
+ toolCount?: number;
22
+ promptCount?: number;
23
+ resourceCount?: number;
24
+ durationMs?: number;
25
+ errorCount?: number;
26
+ }
27
+ export interface DashboardGoldenStoreSummary {
28
+ available: boolean;
29
+ path: string;
30
+ outputCount?: number;
31
+ lastUpdated?: string;
32
+ }
33
+ export interface DashboardArtifactOverview {
34
+ check: DashboardInterviewReportSummary;
35
+ explore: DashboardInterviewReportSummary;
36
+ golden: DashboardGoldenStoreSummary;
37
+ contract: {
38
+ available: boolean;
39
+ path: string;
40
+ };
41
+ }
42
+ export declare function listArtifacts(cwd: string, configPath?: string): DashboardArtifactSummary[];
43
+ export declare function readArtifact(cwd: string, artifactId: string, configPath?: string): DashboardArtifactContent;
44
+ export declare function getArtifactOverview(cwd: string, configPath?: string): DashboardArtifactOverview;
45
+ //# sourceMappingURL=artifact-index.d.ts.map