@http-forge/core 0.6.0 → 0.6.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.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * JUnit XML Report Generator for Test Suite Results
3
+ *
4
+ * Reads the same persisted run artifacts as {@link HtmlReportGenerator}
5
+ * (manifest + index pages + per-result files produced by ResultStorageService)
6
+ * and emits a JUnit-compatible XML report that CI systems (GitHub Actions,
7
+ * GitLab CI, Jenkins, etc.) can parse and display.
8
+ *
9
+ * Output: {basePath}/{suiteId}/{runId}/junit.xml
10
+ *
11
+ * Mapping:
12
+ * <testsuites> aggregate across the whole run
13
+ * <testsuite> one per (collection + folder path) group
14
+ * <testcase> one per request execution (per iteration)
15
+ * <failure> present when assertions failed
16
+ * <error> present when the request itself errored
17
+ * <system-out> console output, when captured
18
+ */
19
+ export declare class JUnitReportGenerator {
20
+ private readonly basePath;
21
+ constructor(basePath: string);
22
+ /**
23
+ * Generate a JUnit XML report for the given run.
24
+ * @returns absolute path to the written junit.xml
25
+ */
26
+ generate(suiteId: string, runId: string): Promise<string>;
27
+ private loadAllSummaries;
28
+ /** Load detail files (for per-assertion failure messages and console output). */
29
+ private loadAllDetails;
30
+ /**
31
+ * Group request executions by (collection + folder path), preserving
32
+ * execution order. Iteration is folded into the test case name when the run
33
+ * has more than one iteration.
34
+ */
35
+ private buildGroups;
36
+ private buildXml;
37
+ }
@@ -21,6 +21,8 @@ export interface McpDispatchServices {
21
21
  collection: ICollectionService;
22
22
  testSuite: ITestSuiteService;
23
23
  environmentConfig: IEnvironmentConfigService;
24
+ /** Absolute path to the workspace folder — used by AI-native tools. */
25
+ workspaceFolder?: string;
24
26
  }
25
27
  /**
26
28
  * Callbacks for the four execution tools that differ between server
@@ -40,4 +40,6 @@ export declare class McpRunStore {
40
40
  require(runId: unknown): McpRunRecord;
41
41
  /** Remove records older than the TTL. Called automatically before each create(). */
42
42
  prune(): void;
43
+ /** Iterate all stored run records (non-expired). */
44
+ values(): IterableIterator<McpRunRecord>;
43
45
  }
@@ -226,6 +226,9 @@ export declare const GENERIC_TOOL_NAMES: {
226
226
  readonly unsetEnvironmentVariable: "unset_environment_variable";
227
227
  readonly setGlobalVariable: "set_global_variable";
228
228
  readonly getGlobals: "get_globals";
229
+ readonly scaffoldCollectionFromOpenApi: "scaffold_collection_from_openapi";
230
+ readonly suggestAssertions: "suggest_assertions";
231
+ readonly explainFailure: "explain_failure";
229
232
  };
230
233
  export type GenericToolName = (typeof GENERIC_TOOL_NAMES)[keyof typeof GENERIC_TOOL_NAMES];
231
234
  interface GenericToolDef {
@@ -81,6 +81,8 @@ export interface RunRequestOptions {
81
81
  body?: string;
82
82
  /** Extra response fields to include: headers, cookies, tests, consoleOutput, report */
83
83
  include?: string[];
84
+ /** Additional machine-readable reports to generate, e.g. ['junit'] */
85
+ reporters?: string[];
84
86
  }
85
87
  /**
86
88
  * Options for directly executing all requests in a collection without MCP.
@@ -114,6 +116,8 @@ export interface RunCollectionOptions {
114
116
  delay?: number;
115
117
  /** Extra response fields to include: perRequest, failedOnly, consoleOutput */
116
118
  include?: string[];
119
+ /** Additional machine-readable reports to generate, e.g. ['junit'] */
120
+ reporters?: string[];
117
121
  /**
118
122
  * Restrict execution to requests under this folder path (slash-separated
119
123
  * folder names, e.g. "Auth/Login"). When omitted, the whole collection runs.
@@ -147,6 +151,8 @@ export interface RunSuiteOptions {
147
151
  requestFilter?: string[];
148
152
  /** Extra response fields to include: perRequest, failedOnly, consoleOutput */
149
153
  include?: string[];
154
+ /** Additional machine-readable reports to generate, e.g. ['junit'] */
155
+ reporters?: string[];
150
156
  }
151
157
  /**
152
158
  * Execute a single request directly without MCP server.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@http-forge/core",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Headless HTTP testing engine with Postman collection support, dynamic variables, and script-based automation.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",