fullstackgtm 0.56.1 → 0.58.0

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/src/runReport.ts CHANGED
@@ -126,6 +126,10 @@ let inflightHeartbeat: AbortController | null = null;
126
126
  * commands simply never stream.
127
127
  */
128
128
  export function beginRunReport(args: string[], startedAt: number): void {
129
+ counts = undefined;
130
+ findings = undefined;
131
+ crm = undefined;
132
+ events.length = 0;
129
133
  lastHeartbeatAt = 0;
130
134
  heartbeatBroker = undefined;
131
135
  inflightHeartbeat = null;
@@ -241,6 +245,14 @@ export async function flushRunReport(
241
245
  // replay of local history never duplicates.
242
246
  const identity = runIdentity(args, startedAt);
243
247
  if (!identity) return;
248
+ // A successful command with no result, finding, event, or live progress is
249
+ // terminal telemetry rather than something a person can explore. Keep it
250
+ // out of Runs. Errors always report; heartbeating commands still send their
251
+ // terminal status so an in-progress row cannot be stranded.
252
+ const hasUsefulOutput = Boolean(
253
+ (counts && Object.keys(counts).length > 0) || findings?.length || events.length,
254
+ );
255
+ if (status === "success" && !hasUsefulOutput && lastHeartbeatAt === 0) return;
244
256
  const broker = getCredential("broker");
245
257
  if (!broker?.baseUrl || !broker.accessToken) return; // opt-in: only when paired
246
258