@gleanwork/mcp-server-tester 2.0.0-beta.2 → 2.0.0-beta.4

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/index.d.cts CHANGED
@@ -9,6 +9,76 @@ import '@modelcontextprotocol/sdk/client/auth.js';
9
9
  import '@modelcontextprotocol/sdk/shared/auth.js';
10
10
  import 'oauth4webapi';
11
11
 
12
+ interface AuditCoworkNativeRunOptions {
13
+ rawResultsPath: string;
14
+ nativeRoot: string;
15
+ expectedCases: number;
16
+ expectedModel?: string;
17
+ }
18
+ type CoworkNativeAuditIssue = 'INVALID_OPTIONS' | 'INPUT_UNREADABLE' | 'INPUT_LIMIT' | 'UNSAFE_PATH' | 'INVALID_RESULTS' | 'CASE_COUNT_MISMATCH' | 'DUPLICATE_CASE_ID' | 'INVALID_CASE_ID' | 'INVALID_SESSION_ID' | 'DUPLICATE_SESSION_ID' | 'SESSION_UNREADABLE' | 'SESSION_ID_MISMATCH' | 'TRANSCRIPT_AMBIGUOUS' | 'NATIVE_PARSE_FAILED' | 'AUDIT_NOT_PARSED' | 'TRANSCRIPT_NOT_PARSED' | 'PARSE_WARNINGS' | 'NATIVE_INCOMPLETE' | 'NATIVE_ERROR' | 'USAGE_UNAVAILABLE' | 'COST_UNAVAILABLE' | 'TIMING_UNAVAILABLE' | 'MODEL_UNAVAILABLE' | 'MODEL_MISMATCH' | 'PROMPT_MISMATCH' | 'FINAL_RESPONSE_MISMATCH' | 'EVENTS_MISMATCH' | 'TOOL_CALLS_MISMATCH' | 'USAGE_MISMATCH' | 'TIMING_MISMATCH' | 'TELEMETRY_MISMATCH' | 'EVIDENCE_FLAGS_MISMATCH' | 'ARM_RESULTS_MISMATCH' | 'TOOL_OUTPUT_UNAVAILABLE' | 'ATTACHMENT_MISSING' | 'ATTACHMENT_EMPTY' | 'ATTACHMENT_UNSAFE' | 'ATTACHMENT_LIMIT';
19
+ interface CoworkNativeAuditUsage {
20
+ inputTokens: number | null;
21
+ outputTokens: number | null;
22
+ cacheReadInputTokens: number | null;
23
+ cacheCreationInputTokens: number | null;
24
+ totalCostUsd: number | null;
25
+ }
26
+ interface CoworkNativeAuditTiming {
27
+ durationMs: number | null;
28
+ durationApiMs: number | null;
29
+ }
30
+ interface CoworkNativeAuditAttachment {
31
+ /** Index in the native-normalized tool call order. No recorded paths are returned. */
32
+ toolCallIndex: number;
33
+ valid: boolean;
34
+ sizeBytes: number | null;
35
+ sha256: string | null;
36
+ issues: CoworkNativeAuditIssue[];
37
+ }
38
+ interface CoworkNativeAuditCase {
39
+ /** Recognized numeric case IDs are retained; all other IDs are SHA-256 pseudonyms. */
40
+ id: string;
41
+ pass: boolean | null;
42
+ sessionId: string | null;
43
+ model: string | null;
44
+ usage: CoworkNativeAuditUsage | null;
45
+ timing: CoworkNativeAuditTiming | null;
46
+ toolCounts: {
47
+ total: number;
48
+ mcp: number;
49
+ host: number;
50
+ errors: number | null;
51
+ } | null;
52
+ validity: {
53
+ auditParsed: boolean | null;
54
+ transcriptParsed: boolean | null;
55
+ complete: boolean | null;
56
+ nonError: boolean | null;
57
+ hasUsage: boolean | null;
58
+ hasCost: boolean | null;
59
+ noWarnings: boolean | null;
60
+ };
61
+ attachments: CoworkNativeAuditAttachment[];
62
+ evidencePassed: boolean;
63
+ issues: CoworkNativeAuditIssue[];
64
+ }
65
+ interface CoworkNativeAuditReport {
66
+ schemaVersion: 1;
67
+ expectedCases: number;
68
+ observedCases: number;
69
+ qualityPassed: boolean | null;
70
+ evidencePassed: boolean;
71
+ status: 'verified' | 'failed';
72
+ cases: CoworkNativeAuditCase[];
73
+ issues: CoworkNativeAuditIssue[];
74
+ /** Available only for verified evidence. Each unknown field stays null. */
75
+ totals: (CoworkNativeAuditUsage & CoworkNativeAuditTiming & {
76
+ costScope: 'native-inference-only';
77
+ }) | null;
78
+ }
79
+ /** Offline, metadata-only audit of MST schema-v1 raw results and a saved Linux Cowork archive. */
80
+ declare function auditCoworkNativeRun(options: AuditCoworkNativeRunOptions): Promise<CoworkNativeAuditReport>;
81
+
12
82
  /**
13
83
  * MCP Host Simulation - Main entry point
14
84
  *
@@ -914,4 +984,4 @@ declare function getExternalHostReference(): Record<string, unknown>;
914
984
  */
915
985
  declare function createJudge(config?: JudgeConfig): Judge;
916
986
 
917
- export { AuthType, BUILT_IN_METRICS, DatasetConfig, DatasetSource, type EvalBatchItem, EvalCaseResult, EvalDataset, EvalManifest, type EvalPluginModule, EvalRunnerResult, EvaluationBatchItem, EvaluationBatchOptions, EvaluationBatchResult, EvaluationSummary, ExtensionConfig, ExternalHostCapabilitiesConfig, ExternalHostCapabilityImplementation, ExternalHostConfig, type ExternalHostDriverReference, ExternalHostRunResult, HostDefinition, HostDriverConfig, HostDriverId, Judge, JudgeConfig, JudgeDefinition, JudgeMatcherOptions, LLMProvider, type LoadPluginsOptions, MCPConfig, MCPFixtureApi, MCPHostConfig, MCPHostSimulationResult, METRIC_REGISTRY, MetricDefinition, MetricValue, OAuthSetupConfig, PatternValidatorOptions, ResultStoreDefinition, RubricSpec, type RunEvalBatchOptions, type RunEvalBatchResult, type RunEvalSuiteOptions, type RunEvalSuiteResult, SchemaValidatorOptions, SizeValidatorOptions, SnapshotSanitizer, TextValidatorOptions, ToolCallCountOptions, ToolCallExpectation, ToolPredicate, ValidationResult, buildEvalDataset, clearDatasetSources, clearHosts, clearJudges, clearMetrics, clearResultStores, computeMetrics, createJudge, createTokenAuthHeaders, driverToSlug, expect, getBuiltinHostConfig, getDatasetSource, getExternalHostConfigJsonSchema, getExternalHostReference, getHost, getJudge, getMetric, getMissingDependencyMessage, getResponseSizeBytes, getResultStore, isProviderAvailable, isTokenExpired, isTokenExpiringSoon, listDatasetSources, listExternalHostDriverReferences, listHosts, listJudges, listMetrics, listResultStores, loadPluginModule, loadPlugins, normalizeHostDriver, normalizeWhitespace, parseDriverSlug, performOAuthSetup, performOAuthSetupIfNeeded, registerDatasetSource, registerExternalHostCapability, registerHost, registerMetric, registerResultStore, resolveMetric, resolveResultStoreConfig, runEvalBatch, runEvalSuite, runExternalHostScenario, simulateMCPHost, test, validateAccessToken, validateError, validateManifestRegistrations, validatePattern, validateResponse, validateSchema, validateSize, validateText };
987
+ export { type AuditCoworkNativeRunOptions, AuthType, BUILT_IN_METRICS, type CoworkNativeAuditAttachment, type CoworkNativeAuditCase, type CoworkNativeAuditIssue, type CoworkNativeAuditReport, type CoworkNativeAuditTiming, type CoworkNativeAuditUsage, DatasetConfig, DatasetSource, type EvalBatchItem, EvalCaseResult, EvalDataset, EvalManifest, type EvalPluginModule, EvalRunnerResult, EvaluationBatchItem, EvaluationBatchOptions, EvaluationBatchResult, EvaluationSummary, ExtensionConfig, ExternalHostCapabilitiesConfig, ExternalHostCapabilityImplementation, ExternalHostConfig, type ExternalHostDriverReference, ExternalHostRunResult, HostDefinition, HostDriverConfig, HostDriverId, Judge, JudgeConfig, JudgeDefinition, JudgeMatcherOptions, LLMProvider, type LoadPluginsOptions, MCPConfig, MCPFixtureApi, MCPHostConfig, MCPHostSimulationResult, METRIC_REGISTRY, MetricDefinition, MetricValue, OAuthSetupConfig, PatternValidatorOptions, ResultStoreDefinition, RubricSpec, type RunEvalBatchOptions, type RunEvalBatchResult, type RunEvalSuiteOptions, type RunEvalSuiteResult, SchemaValidatorOptions, SizeValidatorOptions, SnapshotSanitizer, TextValidatorOptions, ToolCallCountOptions, ToolCallExpectation, ToolPredicate, ValidationResult, auditCoworkNativeRun, buildEvalDataset, clearDatasetSources, clearHosts, clearJudges, clearMetrics, clearResultStores, computeMetrics, createJudge, createTokenAuthHeaders, driverToSlug, expect, getBuiltinHostConfig, getDatasetSource, getExternalHostConfigJsonSchema, getExternalHostReference, getHost, getJudge, getMetric, getMissingDependencyMessage, getResponseSizeBytes, getResultStore, isProviderAvailable, isTokenExpired, isTokenExpiringSoon, listDatasetSources, listExternalHostDriverReferences, listHosts, listJudges, listMetrics, listResultStores, loadPluginModule, loadPlugins, normalizeHostDriver, normalizeWhitespace, parseDriverSlug, performOAuthSetup, performOAuthSetupIfNeeded, registerDatasetSource, registerExternalHostCapability, registerHost, registerMetric, registerResultStore, resolveMetric, resolveResultStoreConfig, runEvalBatch, runEvalSuite, runExternalHostScenario, simulateMCPHost, test, validateAccessToken, validateError, validateManifestRegistrations, validatePattern, validateResponse, validateSchema, validateSize, validateText };
package/dist/index.d.ts CHANGED
@@ -9,6 +9,76 @@ import '@modelcontextprotocol/sdk/client/auth.js';
9
9
  import '@modelcontextprotocol/sdk/shared/auth.js';
10
10
  import 'oauth4webapi';
11
11
 
12
+ interface AuditCoworkNativeRunOptions {
13
+ rawResultsPath: string;
14
+ nativeRoot: string;
15
+ expectedCases: number;
16
+ expectedModel?: string;
17
+ }
18
+ type CoworkNativeAuditIssue = 'INVALID_OPTIONS' | 'INPUT_UNREADABLE' | 'INPUT_LIMIT' | 'UNSAFE_PATH' | 'INVALID_RESULTS' | 'CASE_COUNT_MISMATCH' | 'DUPLICATE_CASE_ID' | 'INVALID_CASE_ID' | 'INVALID_SESSION_ID' | 'DUPLICATE_SESSION_ID' | 'SESSION_UNREADABLE' | 'SESSION_ID_MISMATCH' | 'TRANSCRIPT_AMBIGUOUS' | 'NATIVE_PARSE_FAILED' | 'AUDIT_NOT_PARSED' | 'TRANSCRIPT_NOT_PARSED' | 'PARSE_WARNINGS' | 'NATIVE_INCOMPLETE' | 'NATIVE_ERROR' | 'USAGE_UNAVAILABLE' | 'COST_UNAVAILABLE' | 'TIMING_UNAVAILABLE' | 'MODEL_UNAVAILABLE' | 'MODEL_MISMATCH' | 'PROMPT_MISMATCH' | 'FINAL_RESPONSE_MISMATCH' | 'EVENTS_MISMATCH' | 'TOOL_CALLS_MISMATCH' | 'USAGE_MISMATCH' | 'TIMING_MISMATCH' | 'TELEMETRY_MISMATCH' | 'EVIDENCE_FLAGS_MISMATCH' | 'ARM_RESULTS_MISMATCH' | 'TOOL_OUTPUT_UNAVAILABLE' | 'ATTACHMENT_MISSING' | 'ATTACHMENT_EMPTY' | 'ATTACHMENT_UNSAFE' | 'ATTACHMENT_LIMIT';
19
+ interface CoworkNativeAuditUsage {
20
+ inputTokens: number | null;
21
+ outputTokens: number | null;
22
+ cacheReadInputTokens: number | null;
23
+ cacheCreationInputTokens: number | null;
24
+ totalCostUsd: number | null;
25
+ }
26
+ interface CoworkNativeAuditTiming {
27
+ durationMs: number | null;
28
+ durationApiMs: number | null;
29
+ }
30
+ interface CoworkNativeAuditAttachment {
31
+ /** Index in the native-normalized tool call order. No recorded paths are returned. */
32
+ toolCallIndex: number;
33
+ valid: boolean;
34
+ sizeBytes: number | null;
35
+ sha256: string | null;
36
+ issues: CoworkNativeAuditIssue[];
37
+ }
38
+ interface CoworkNativeAuditCase {
39
+ /** Recognized numeric case IDs are retained; all other IDs are SHA-256 pseudonyms. */
40
+ id: string;
41
+ pass: boolean | null;
42
+ sessionId: string | null;
43
+ model: string | null;
44
+ usage: CoworkNativeAuditUsage | null;
45
+ timing: CoworkNativeAuditTiming | null;
46
+ toolCounts: {
47
+ total: number;
48
+ mcp: number;
49
+ host: number;
50
+ errors: number | null;
51
+ } | null;
52
+ validity: {
53
+ auditParsed: boolean | null;
54
+ transcriptParsed: boolean | null;
55
+ complete: boolean | null;
56
+ nonError: boolean | null;
57
+ hasUsage: boolean | null;
58
+ hasCost: boolean | null;
59
+ noWarnings: boolean | null;
60
+ };
61
+ attachments: CoworkNativeAuditAttachment[];
62
+ evidencePassed: boolean;
63
+ issues: CoworkNativeAuditIssue[];
64
+ }
65
+ interface CoworkNativeAuditReport {
66
+ schemaVersion: 1;
67
+ expectedCases: number;
68
+ observedCases: number;
69
+ qualityPassed: boolean | null;
70
+ evidencePassed: boolean;
71
+ status: 'verified' | 'failed';
72
+ cases: CoworkNativeAuditCase[];
73
+ issues: CoworkNativeAuditIssue[];
74
+ /** Available only for verified evidence. Each unknown field stays null. */
75
+ totals: (CoworkNativeAuditUsage & CoworkNativeAuditTiming & {
76
+ costScope: 'native-inference-only';
77
+ }) | null;
78
+ }
79
+ /** Offline, metadata-only audit of MST schema-v1 raw results and a saved Linux Cowork archive. */
80
+ declare function auditCoworkNativeRun(options: AuditCoworkNativeRunOptions): Promise<CoworkNativeAuditReport>;
81
+
12
82
  /**
13
83
  * MCP Host Simulation - Main entry point
14
84
  *
@@ -914,4 +984,4 @@ declare function getExternalHostReference(): Record<string, unknown>;
914
984
  */
915
985
  declare function createJudge(config?: JudgeConfig): Judge;
916
986
 
917
- export { AuthType, BUILT_IN_METRICS, DatasetConfig, DatasetSource, type EvalBatchItem, EvalCaseResult, EvalDataset, EvalManifest, type EvalPluginModule, EvalRunnerResult, EvaluationBatchItem, EvaluationBatchOptions, EvaluationBatchResult, EvaluationSummary, ExtensionConfig, ExternalHostCapabilitiesConfig, ExternalHostCapabilityImplementation, ExternalHostConfig, type ExternalHostDriverReference, ExternalHostRunResult, HostDefinition, HostDriverConfig, HostDriverId, Judge, JudgeConfig, JudgeDefinition, JudgeMatcherOptions, LLMProvider, type LoadPluginsOptions, MCPConfig, MCPFixtureApi, MCPHostConfig, MCPHostSimulationResult, METRIC_REGISTRY, MetricDefinition, MetricValue, OAuthSetupConfig, PatternValidatorOptions, ResultStoreDefinition, RubricSpec, type RunEvalBatchOptions, type RunEvalBatchResult, type RunEvalSuiteOptions, type RunEvalSuiteResult, SchemaValidatorOptions, SizeValidatorOptions, SnapshotSanitizer, TextValidatorOptions, ToolCallCountOptions, ToolCallExpectation, ToolPredicate, ValidationResult, buildEvalDataset, clearDatasetSources, clearHosts, clearJudges, clearMetrics, clearResultStores, computeMetrics, createJudge, createTokenAuthHeaders, driverToSlug, expect, getBuiltinHostConfig, getDatasetSource, getExternalHostConfigJsonSchema, getExternalHostReference, getHost, getJudge, getMetric, getMissingDependencyMessage, getResponseSizeBytes, getResultStore, isProviderAvailable, isTokenExpired, isTokenExpiringSoon, listDatasetSources, listExternalHostDriverReferences, listHosts, listJudges, listMetrics, listResultStores, loadPluginModule, loadPlugins, normalizeHostDriver, normalizeWhitespace, parseDriverSlug, performOAuthSetup, performOAuthSetupIfNeeded, registerDatasetSource, registerExternalHostCapability, registerHost, registerMetric, registerResultStore, resolveMetric, resolveResultStoreConfig, runEvalBatch, runEvalSuite, runExternalHostScenario, simulateMCPHost, test, validateAccessToken, validateError, validateManifestRegistrations, validatePattern, validateResponse, validateSchema, validateSize, validateText };
987
+ export { type AuditCoworkNativeRunOptions, AuthType, BUILT_IN_METRICS, type CoworkNativeAuditAttachment, type CoworkNativeAuditCase, type CoworkNativeAuditIssue, type CoworkNativeAuditReport, type CoworkNativeAuditTiming, type CoworkNativeAuditUsage, DatasetConfig, DatasetSource, type EvalBatchItem, EvalCaseResult, EvalDataset, EvalManifest, type EvalPluginModule, EvalRunnerResult, EvaluationBatchItem, EvaluationBatchOptions, EvaluationBatchResult, EvaluationSummary, ExtensionConfig, ExternalHostCapabilitiesConfig, ExternalHostCapabilityImplementation, ExternalHostConfig, type ExternalHostDriverReference, ExternalHostRunResult, HostDefinition, HostDriverConfig, HostDriverId, Judge, JudgeConfig, JudgeDefinition, JudgeMatcherOptions, LLMProvider, type LoadPluginsOptions, MCPConfig, MCPFixtureApi, MCPHostConfig, MCPHostSimulationResult, METRIC_REGISTRY, MetricDefinition, MetricValue, OAuthSetupConfig, PatternValidatorOptions, ResultStoreDefinition, RubricSpec, type RunEvalBatchOptions, type RunEvalBatchResult, type RunEvalSuiteOptions, type RunEvalSuiteResult, SchemaValidatorOptions, SizeValidatorOptions, SnapshotSanitizer, TextValidatorOptions, ToolCallCountOptions, ToolCallExpectation, ToolPredicate, ValidationResult, auditCoworkNativeRun, buildEvalDataset, clearDatasetSources, clearHosts, clearJudges, clearMetrics, clearResultStores, computeMetrics, createJudge, createTokenAuthHeaders, driverToSlug, expect, getBuiltinHostConfig, getDatasetSource, getExternalHostConfigJsonSchema, getExternalHostReference, getHost, getJudge, getMetric, getMissingDependencyMessage, getResponseSizeBytes, getResultStore, isProviderAvailable, isTokenExpired, isTokenExpiringSoon, listDatasetSources, listExternalHostDriverReferences, listHosts, listJudges, listMetrics, listResultStores, loadPluginModule, loadPlugins, normalizeHostDriver, normalizeWhitespace, parseDriverSlug, performOAuthSetup, performOAuthSetupIfNeeded, registerDatasetSource, registerExternalHostCapability, registerHost, registerMetric, registerResultStore, resolveMetric, resolveResultStoreConfig, runEvalBatch, runEvalSuite, runExternalHostScenario, simulateMCPHost, test, validateAccessToken, validateError, validateManifestRegistrations, validatePattern, validateResponse, validateSchema, validateSize, validateText };