taist 0.2.13 → 0.2.14

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.
@@ -542,9 +542,22 @@ export function report(trace) {
542
542
  * Flush the global reporter
543
543
  */
544
544
  export async function flush() {
545
- if (globalReporter) {
546
- await globalReporter.flush();
545
+ const reporter = globalThis[TAIST_REPORTER_KEY];
546
+ if (reporter) {
547
+ await reporter.flush();
547
548
  }
548
549
  }
549
550
 
551
+ /**
552
+ * Reset the global reporter (for testing purposes).
553
+ * Closes the existing reporter and clears the singleton.
554
+ */
555
+ export function resetGlobalReporter() {
556
+ const reporter = globalThis[TAIST_REPORTER_KEY];
557
+ if (reporter) {
558
+ reporter.close();
559
+ }
560
+ globalThis[TAIST_REPORTER_KEY] = null;
561
+ }
562
+
550
563
  export default TraceReporter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taist",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Token-Optimized Testing Framework for AI-Assisted Development",
5
5
  "main": "index.js",
6
6
  "type": "module",