// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. /** * Canonical event protocol, reporter manager, and built-in reporters for Rush. * * @remarks * This package is released as a public beta with a **full beta license until * 1.0**: both the TypeScript API surface and the wire format may change in * 0.x releases. A breaking wire change always ships with a protocol-major * bump, so cross-process peers detect the skew through the handshake * `RUSH_PROTOCOL_UPDATE_REQUIRED` diagnostic rather than failing silently. * Frozen golden snapshots are regression detectors, not stability promises. * * @packageDocumentation */ /** * The npm package name of this package. * * @beta */ export const REPORTER_PACKAGE_NAME: '@rushstack/rush-reporter' = '@rushstack/rush-reporter'; export type { IReporterProtocolVersion } from './events/ReporterProtocolVersion'; export type { ReporterPrivacyClassification } from './events/ReporterPrivacyClassification'; export type { ReporterJsonNull, ReporterJsonValue } from './events/ReporterJsonValue'; export type { ReporterEventType } from './events/ReporterEventType'; export { REPORTER_EVENT_TYPES, isReporterEventRequired } from './events/ReporterEventType'; export type { IReporterEventSource, IReporterEventScope, IReporterEventEnvelope } from './events/IReporterEventEnvelope'; export type { IMessageEmittedPayload } from './events/IMessageEmittedPayload'; export type { RushDiagnosticSeverity, IRushDiagnostic } from './diagnostics/IRushDiagnostic'; export type { KnownRushDiagnosticCategory, RushDiagnosticCategory } from './diagnostics/RushDiagnosticCategory'; export type { OneOrMoreRushDiagnosticCodeSegments, RushDiagnosticCode, RushDiagnosticCodeSegment } from './diagnostics/RushDiagnosticCode'; export type { RushRemediationSafety, IRushRemediationAction } from './diagnostics/IRushRemediationAction'; export type { IRushDiagnosticSource, IRushFileDiagnosticSource, IRushToolDiagnosticSource } from './diagnostics/IRushDiagnosticSource'; export type { IClassifiedDiagnosticValue } from './diagnostics/IClassifiedDiagnosticValue'; export { getPrivacyClassificationRank, computeEnvelopePrivacyFloor } from './diagnostics/DiagnosticPrivacy'; export type { IRushDiagnosticCodeDefinition, RushDiagnosticCodes, RushDiagnosticDetailKey, RushDiagnosticSummaryKey, RushDiagnosticTemplateKey } from './diagnostics/RushDiagnosticCodeRegistry'; export { RUSH_INTERNAL_ERROR_CODE, isValidRushDiagnosticCode, RUSH_DIAGNOSTIC_CODE_DEFINITIONS, RUSH_DIAGNOSTIC_CODES, RUSH_DIAGNOSTIC_TEMPLATES } from './diagnostics/RushDiagnosticCodeRegistry'; export { RushError } from './diagnostics/RushError'; export type { ICreateRushDiagnosticOptions } from './diagnostics/createRushDiagnostic'; export { createRushDiagnostic } from './diagnostics/createRushDiagnostic'; export type { IReporterProtocolLimits } from './protocol/ReporterProtocol'; export { REPORTER_PROTOCOL_VERSION, REPORTER_PROTOCOL_LIMITS, isReporterProtocolCompatible } from './protocol/ReporterProtocol'; export type { INdjsonOptions } from './protocol/Ndjson'; export { NdjsonInvalidRecordError, NdjsonRecordTooLargeError, encodeNdjsonRecord, NdjsonDecoder } from './protocol/Ndjson'; export type { IReporterChildContext, IReporterHello, IReporterHelloAck, IReporterHandshakeOptions, IReporterHandshakeResult, ReporterCapability } from './protocol/ReporterHandshake'; export { InvalidReporterHelloAckError, InvalidReporterHelloError, negotiateReporterHello, parseReporterHelloAck, parseReporterHello, REPORTER_KNOWN_CAPABILITIES } from './protocol/ReporterHandshake'; export type { IReporter, IReporterContext } from './manager/IReporter'; export type { IReporterRegistrationOptions, IReporterManagerOptions } from './manager/ReporterManager'; export { ReporterManager, DEFAULT_FLUSH_TIMEOUT_MS, DEFAULT_SIGNAL_FLUSH_TIMEOUT_MS } from './manager/ReporterManager'; export { ReporterMultiplexer } from './manager/ReporterMultiplexer'; export { BOOTSTRAP_PROTOCOL_MAJOR, BOOTSTRAP_BUFFER_MAX_BYTES, BOOTSTRAP_EXTERNAL_CHUNK_MAX_BYTES, RUSH_REPORTER_BOOTSTRAP_HANDOFF_ENV_VAR, RUSH_REPORTER_BOOTSTRAP_NONCE_ENV_VAR, BOOTSTRAP_BUFFER_TRUNCATED_EXTENSION_NAME } from './bootstrap/BootstrapProtocol'; export type { BootstrapPrivacyClassification, IBootstrapEventSource, IBootstrapEventInput, IBootstrapTruncation, IBootstrapEventBufferOptions } from './bootstrap/BootstrapEventBuffer'; export { BootstrapEventBuffer } from './bootstrap/BootstrapEventBuffer'; export type { IWriteBootstrapHandoffOptions, IBootstrapHandoffHeader, IBootstrapHandoffWriteResult } from './bootstrap/BootstrapHandoff'; export { BOOTSTRAP_HANDOFF_FILE_PREFIX, BOOTSTRAP_HANDOFF_FILE_SUFFIX, isBootstrapHandoffFileName, writeBootstrapHandoffFileAsync, readBootstrapHandoffFileAsync, deleteBootstrapHandoffFileAsync } from './bootstrap/BootstrapHandoff'; export type { IEarlyReporterControls } from './bootstrap/EarlyReporterControls'; export { parseEarlyReporterControls } from './bootstrap/EarlyReporterControls'; export type { IReporterHostOptions, IBootstrapReplayResult, IBootstrapLegacyOutput } from './frontend/ReporterHost'; export { ReporterHost, DEFAULT_HANDOFF_RETENTION_MS } from './frontend/ReporterHost'; export type { IReporterFrontendDescriptor, IReporterEngineDescriptor, ReporterCompatibilityMode, IReporterCompatibilityDecision } from './compat/ReporterCompatibility'; export { resolveReporterCompatibility } from './compat/ReporterCompatibility'; export type { IEngineSinkResolution } from './compat/LegacyFallbackSink'; export { LegacyFallbackSink, createEngineSink } from './compat/LegacyFallbackSink'; export type { IOldEngineOutputAdapterOptions } from './compat/OldEngineOutputAdapter'; export { OldEngineOutputAdapter } from './compat/OldEngineOutputAdapter'; export { ALREADY_REPORTED_ERROR_NAME, LEGACY_ERROR_BRIDGE_REMOVAL_CRITERIA, AlreadyReportedError, isAlreadyReportedSentinel, LegacyErrorBridge } from './compat/LegacyErrorBridge'; export type { ICreateScopedReporterOptions } from './session/ScopedReporterFactory'; export { createScopedReporter } from './session/ScopedReporterFactory'; export type { IScopedLogger } from './session/ScopedLogger'; export { createScopedLogger } from './session/ScopedLogger'; export type { IRushSessionReportingOptions, IReporterExecutionContext } from './session/RushSessionReporting'; export { RushSessionReporting } from './session/RushSessionReporting'; export type { IRushPluginManifest } from './session/PluginApi'; export { isRushVersionSupported, createPluginApiIncompatibleDiagnostic } from './session/PluginApi'; export type { OperationStatus, ISessionStartedPayload, ISessionCompletedPayload, ICommandStartedPayload, ICommandCompletedPayload, IOperationRegisteredPayload, IOperationStatusChangedPayload, IOperationStreamClosedPayload, IOperationCompletedPayload, ICommandResultPayload, IWatchCycleCompletedPayload } from './lifecycle/LifecycleEvents'; export type { ILifecycleEmitterOptions } from './lifecycle/LifecycleEmitter'; export { LifecycleEmitter } from './lifecycle/LifecycleEmitter'; export type { IShadowResultSummary } from './lifecycle/ShadowParity'; export { deriveExitCodeFromEvents, summarizeShadowResult } from './lifecycle/ShadowParity'; export type { TelemetryResult, ITelemetryAggregate } from './telemetry/TelemetryAggregate'; export { TELEMETRY_AGGREGATE_KEYS } from './telemetry/TelemetryAggregate'; export { TelemetrySubscriber, createTelemetryReporter } from './telemetry/TelemetrySubscriber'; export type { LegacyBeforeLogHook } from './telemetry/BeforeLogAdapter'; export { createBeforeLogAdapter } from './telemetry/BeforeLogAdapter'; export type { RushCommandOutcome, IRushExitStatus, IResolveExitStatusOptions, IResolveExitStatusFromEventsOptions } from './exit/ExitStatus'; export { EXIT_CODE_SUCCESS, EXIT_CODE_FAILURE, getSignalExitCode, resolveExitStatus, resolveExitStatusFromEvents } from './exit/ExitStatus'; export type { IJsonControls } from './exit/CommandJson'; export { separateJsonControls } from './exit/CommandJson'; export type { ReporterName, ReporterLogLevel } from './config/ReporterNames'; export { SUPPORTED_REPORTER_NAMES, SUPPORTED_LOG_LEVELS, isSupportedReporterName, isSupportedLogLevel } from './config/ReporterNames'; export { COPILOT_CLI_ENV_VAR, KNOWN_CI_ENV_VARS, isAgentVariableActive, detectAgent, isCiDetected } from './config/AgentDetection'; export type { IReporterOutputTarget } from './config/OutputControl'; export { parseOutputControl } from './config/OutputControl'; export type { IReporterSelectionInput, IReporterSelection } from './config/ReporterSelection'; export { resolveReporterSelection } from './config/ReporterSelection'; export { FILE_REPORTER_DEFAULT_LOG_LEVEL, getLogLevelRank, getEventMinimumLogLevel, shouldRenderAtLogLevel, filterEventsForLogLevel } from './config/LogLevelFilter'; export type { PlaintextVariant, IReporterPlanEntry, IAutomaticReporterPlan } from './config/AutomaticReporterMatrix'; export { isMachineReporter, planAutomaticReporters, describeReporterPlan } from './config/AutomaticReporterMatrix'; export type { ILiveRegionState, IColorizer, IRenderLiveRegionOptions } from './reporters/InteractiveRendering'; export { SPINNER_FRAMES, MIN_REFRESH_INTERVAL_MS, resolveColorEnabled, createColorizer, truncateToWidth, renderActiveProjectsRow, renderLiveRegion, shouldRefresh } from './reporters/InteractiveRendering'; export type { IInteractiveTerminal, IDefaultInteractiveReporterOptions } from './reporters/DefaultInteractiveReporter'; export { DefaultInteractiveReporter } from './reporters/DefaultInteractiveReporter'; export type { IPlaintextReporterOptions } from './reporters/PlaintextReporter'; export { PlaintextReporter } from './reporters/PlaintextReporter'; export type { IJsonReporterOptions } from './reporters/JsonReporter'; export { JsonReporter } from './reporters/JsonReporter'; export type { IAiDiagnostic, IAiLogReference, IAiFinalRecord, IAiReporterOptions } from './reporters/AiReporter'; export { AiReporter } from './reporters/AiReporter'; export type { IFileReporterArtifact, IFileReporterOptions } from './reporters/FileReporter'; export { FileReporter, RUSH_LOGS_DIR_NAME, LATEST_LOG_NAME } from './reporters/FileReporter'; export type { ILegacyReporterOptions } from './reporters/LegacyReporter'; export { LegacyReporter, RUSH_REPORTER_ENV_VAR, isLegacyEmergencyFallbackRequested } from './reporters/LegacyReporter'; export type { IOperationStreamEmitterOptions } from './scheduler/OperationStreamEmitter'; export { OperationStreamEmitter } from './scheduler/OperationStreamEmitter'; export type { IExternalOutputChunk } from './scheduler/OperationOutputGrouping'; export { iterateExternalOutput, regroupOperationOutput } from './scheduler/OperationOutputGrouping'; export { normalizeAnsi } from './matchers/AnsiNormalization'; export type { IProblemMatch, IProblemMatcher } from './matchers/ProblemMatcher'; export type { IGetMatchersOptions } from './matchers/ProblemMatcherRegistry'; export { ProblemMatcherRegistry } from './matchers/ProblemMatcherRegistry'; export type { IRunProblemMatchersOptions, IProblemMatcherResult } from './matchers/ProblemMatcherRunner'; export { ProblemMatcherRunner, runProblemMatchers } from './matchers/ProblemMatcherRunner'; export type { IChildDescriptorPlan, IHeftChildOutputStreams, IHeftChildOutputTargets } from './heft/HeftDescriptor'; export { RUSH_REPORTER_CHILD_ACK_FD_ENV_VAR, RUSH_REPORTER_CHILD_FD_ENV_VAR, allocateChildDescriptor, readChildAckDescriptorFd, readChildDescriptorFd, relayHeftChildOutput } from './heft/HeftDescriptor'; export type { HeftChildReporterMode, IHeftChildEventInput, IHeftChildEmitterOptions } from './heft/HeftChildEmitter'; export { HeftChildEmitter } from './heft/HeftChildEmitter'; export type { IHeftDescriptorHostOptions, IHeftChildResult } from './heft/HeftDescriptorHost'; export { HeftDescriptorHost } from './heft/HeftDescriptorHost'; export type { IReporterEmitEventInput, IReporterEventSink } from './producers/IReporterEventSink'; export type { ReporterMessageSeverity, IScopedMessageOptions, IScopedReporter } from './producers/IScopedReporter'; export type { ReporterExtensionEventName } from './producers/ReporterExtensionEventName'; export { isReporterExtensionEventName, parseReporterExtensionEventName } from './producers/ReporterExtensionEventName'; export type { IReporterPerformanceBudgets, IReporterTelemetryLimits } from './perf/PerformanceBudgets'; export { REPORTER_PERFORMANCE_BUDGETS, computeWallTimeRegressionPercent, isWithinWallTimeBudget, isWithinMemoryBudget } from './perf/PerformanceBudgets'; export type { IAiReporterQualificationThresholds, IAiReporterQualificationCaseResult, IAiReporterQualificationGateResult, IAiReporterQualificationResult, IQualifiedAiReporterDecision } from './qualification/AiReporterQualification'; export { AI_REPORTER_QUALIFICATION_SCHEMA_VERSION, AI_REPORTER_QUALIFICATION_THRESHOLDS, evaluateAiReporterQualification, formatAiReporterQualificationFailures, getQualifiedAiReporterDecision } from './qualification/AiReporterQualification'; export { runAiReporterQualificationCorpusAsync } from './qualification/AiReporterQualificationCorpus'; export type { ReporterMigrationPhaseId, IReporterMigrationPhase } from './migration/MigrationPhase'; export { REPORTER_MIGRATION_PHASES, getReporterMigrationPhase } from './migration/MigrationPhase'; export type { IReporterMajorDefaults, IAutomaticSelectionContext } from './migration/DaemonAlignedMajorDefaults'; export { REMOVED_TERMINAL_APIS, PRE_FLIP_REPORTER_DEFAULTS, DAEMON_ALIGNED_MAJOR_REPORTER_DEFAULTS, isTerminalApiRemoved, isEmergencyLegacyFallback, isAutomaticSelectionEnabled } from './migration/DaemonAlignedMajorDefaults'; export type { IPluginApplyGateOptions, IPluginApplyDecision } from './migration/PluginApplyGate'; export { evaluatePluginApplyGate, getBlockedPlugins } from './migration/PluginApplyGate';