agent-inspect 4.1.0 → 4.3.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.
@@ -4078,6 +4078,252 @@ function sessionKeyForRun(meta, options) {
4078
4078
  return void 0;
4079
4079
  }
4080
4080
 
4081
+ // packages/core/src/sessions/status.ts
4082
+ var DEFAULT_STALE_THRESHOLD_MS = 864e5;
4083
+ var EXPLICIT_STATUS_PRIORITY = {
4084
+ error: 5,
4085
+ waiting_input: 4,
4086
+ idle: 3,
4087
+ stale: 2,
4088
+ completed: 1
4089
+ };
4090
+ var EXPLICIT_SESSION_STATUSES = /* @__PURE__ */ new Set([
4091
+ "running",
4092
+ "waiting_input",
4093
+ "idle",
4094
+ "completed",
4095
+ "error",
4096
+ "stale",
4097
+ "unknown"
4098
+ ]);
4099
+ function isExplicitSessionStatus(value) {
4100
+ return typeof value === "string" && EXPLICIT_SESSION_STATUSES.has(value);
4101
+ }
4102
+ function activityMs(run) {
4103
+ return run.endedAt ?? run.startedAt ?? 0;
4104
+ }
4105
+ function latestActivityMs(runs) {
4106
+ let latest = 0;
4107
+ for (const run of runs) {
4108
+ const ms = activityMs(run);
4109
+ if (ms > latest) latest = ms;
4110
+ }
4111
+ return latest;
4112
+ }
4113
+ function earliestStart(runs) {
4114
+ let earliest;
4115
+ for (const run of runs) {
4116
+ if (run.startedAt === void 0) continue;
4117
+ if (earliest === void 0 || run.startedAt < earliest) {
4118
+ earliest = run.startedAt;
4119
+ }
4120
+ }
4121
+ return earliest;
4122
+ }
4123
+ function latestEndWhenAllEnded(runs) {
4124
+ if (runs.length === 0) return void 0;
4125
+ let latest;
4126
+ for (const run of runs) {
4127
+ if (run.endedAt === void 0) return void 0;
4128
+ if (latest === void 0 || run.endedAt > latest) latest = run.endedAt;
4129
+ }
4130
+ return latest;
4131
+ }
4132
+ function pickExplicitStatus(runs) {
4133
+ let best;
4134
+ let bestPriority = 0;
4135
+ for (const run of runs) {
4136
+ const raw = run.metadata?.sessionStatus;
4137
+ if (!isExplicitSessionStatus(raw)) continue;
4138
+ const priority = EXPLICIT_STATUS_PRIORITY[raw] ?? 0;
4139
+ if (priority > bestPriority) {
4140
+ bestPriority = priority;
4141
+ best = raw;
4142
+ }
4143
+ }
4144
+ return best;
4145
+ }
4146
+ function deriveLastError(runs) {
4147
+ const errorRuns = runs.filter((run) => run.status === "error").sort((a, b) => activityMs(b) - activityMs(a));
4148
+ const latest = errorRuns[0];
4149
+ if (!latest) return void 0;
4150
+ const meta = latest.metadata ?? {};
4151
+ const message = typeof meta.errorMessage === "string" && meta.errorMessage.trim() !== "" ? meta.errorMessage.trim() : latest.name ?? latest.runId;
4152
+ const code = typeof meta.errorCode === "string" && meta.errorCode.trim() !== "" ? meta.errorCode.trim() : void 0;
4153
+ return { runId: latest.runId, message, code };
4154
+ }
4155
+ function deriveCheckSummary(runs) {
4156
+ let pass = 0;
4157
+ let fail = 0;
4158
+ let warn2 = 0;
4159
+ let found = false;
4160
+ for (const run of runs) {
4161
+ const summary = run.metadata?.checkSummary;
4162
+ if (!summary || typeof summary !== "object") continue;
4163
+ const record = summary;
4164
+ if (typeof record.pass === "number") {
4165
+ pass += record.pass;
4166
+ found = true;
4167
+ }
4168
+ if (typeof record.fail === "number") {
4169
+ fail += record.fail;
4170
+ found = true;
4171
+ }
4172
+ if (typeof record.warn === "number") {
4173
+ warn2 += record.warn;
4174
+ found = true;
4175
+ }
4176
+ }
4177
+ return found ? { pass, fail, warn: warn2 } : void 0;
4178
+ }
4179
+ function deriveObservationSummary(runs) {
4180
+ for (const run of [...runs].sort((a, b) => activityMs(b) - activityMs(a))) {
4181
+ const value = run.metadata?.observationSummary;
4182
+ if (typeof value === "string" && value.trim() !== "") {
4183
+ return value.trim();
4184
+ }
4185
+ }
4186
+ return void 0;
4187
+ }
4188
+ function deriveSessionStatus(runs, options = {}) {
4189
+ if (runs.length === 0) return "unknown";
4190
+ if (runs.some((run) => run.status === "running")) return "running";
4191
+ const explicit = pickExplicitStatus(runs);
4192
+ if (explicit && explicit !== "running") return explicit;
4193
+ if (runs.some((run) => run.status === "error")) return "error";
4194
+ if (runs.every((run) => run.status === "success")) return "completed";
4195
+ const nowMs = options.nowMs ?? Date.now();
4196
+ const staleThresholdMs = options.staleThresholdMs ?? DEFAULT_STALE_THRESHOLD_MS;
4197
+ const lastMs = latestActivityMs(runs);
4198
+ if (lastMs > 0 && nowMs - lastMs > staleThresholdMs) return "stale";
4199
+ return "unknown";
4200
+ }
4201
+ function enrichSessionSummary(summary, runs, options = {}) {
4202
+ const sessionRuns = runs.filter((run) => summary.runIds.includes(run.runId)).sort((a, b) => a.runId.localeCompare(b.runId));
4203
+ const startedAt = earliestStart(sessionRuns);
4204
+ const endedAt = latestEndWhenAllEnded(sessionRuns);
4205
+ const durationMs2 = startedAt !== void 0 && endedAt !== void 0 ? endedAt - startedAt : void 0;
4206
+ let correlationId;
4207
+ let jobId;
4208
+ let workflowId;
4209
+ for (const run of sessionRuns) {
4210
+ const meta = extractSessionWorkflowMetadata(run.metadata);
4211
+ if (!correlationId && meta?.correlationId) correlationId = meta.correlationId;
4212
+ if (!jobId && meta?.jobId) jobId = meta.jobId;
4213
+ if (!workflowId && meta?.workflowName) workflowId = meta.workflowName;
4214
+ else if (!workflowId && meta?.workflowStep) workflowId = meta.workflowStep;
4215
+ }
4216
+ const lastMs = latestActivityMs(sessionRuns);
4217
+ const lastActivity = lastMs > 0 ? new Date(lastMs).toISOString() : (/* @__PURE__ */ new Date(0)).toISOString();
4218
+ const retryCount = summary.retries.filter(
4219
+ (retry) => retry.retryOf !== void 0 || (retry.attempt ?? 0) > 1
4220
+ ).length;
4221
+ return {
4222
+ ...summary,
4223
+ status: deriveSessionStatus(sessionRuns, options),
4224
+ startedAt,
4225
+ endedAt,
4226
+ durationMs: durationMs2,
4227
+ correlationId,
4228
+ jobId,
4229
+ workflowId,
4230
+ lastError: deriveLastError(sessionRuns),
4231
+ lastActivity,
4232
+ retryCount,
4233
+ observationSummary: deriveObservationSummary(sessionRuns),
4234
+ checkSummary: deriveCheckSummary(sessionRuns)
4235
+ };
4236
+ }
4237
+
4238
+ // packages/core/src/sessions/activity.ts
4239
+ function statusLine(session) {
4240
+ const name = session.workflowId ?? session.correlationId ?? session.sessionId;
4241
+ const status = session.status;
4242
+ if (session.lastError) {
4243
+ return `${name} session ${session.sessionId} failed at ${session.lastError.message}`;
4244
+ }
4245
+ if (session.observationSummary) {
4246
+ return `${name} session ${session.sessionId} ${status} with observation warning`;
4247
+ }
4248
+ return `${name} session ${session.sessionId} ${status}`;
4249
+ }
4250
+ function parseSinceMs(since, nowMs) {
4251
+ if (!since || since.trim() === "") return nowMs - 7 * 864e5;
4252
+ const trimmed = since.trim().toLowerCase();
4253
+ const match = /^(\d+)([smhd])$/.exec(trimmed);
4254
+ if (!match) return nowMs - 7 * 864e5;
4255
+ const amount = Number.parseInt(match[1], 10);
4256
+ const unit = match[2];
4257
+ const mult = unit === "s" ? 1e3 : unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5;
4258
+ return nowMs - amount * mult;
4259
+ }
4260
+ function isFailed(status) {
4261
+ return status === "error";
4262
+ }
4263
+ function isStale(status) {
4264
+ return status === "stale";
4265
+ }
4266
+ function guardrailWarnings(session) {
4267
+ const summary = session.checkSummary;
4268
+ if (!summary) return 0;
4269
+ return summary.warn;
4270
+ }
4271
+ function buildActivitySummary(index, options = {}) {
4272
+ const nowMs = options.nowMs ?? Date.now();
4273
+ const sinceMs = parseSinceMs(options.since, nowMs);
4274
+ const sinceIso = new Date(sinceMs).toISOString();
4275
+ const limit = Number.isInteger(options.limit) && options.limit > 0 ? options.limit : 20;
4276
+ const inWindow = index.sessions.filter((session) => {
4277
+ const activityMs2 = Date.parse(session.lastActivity);
4278
+ return Number.isFinite(activityMs2) && activityMs2 >= sinceMs;
4279
+ });
4280
+ const entries = [...inWindow].sort((a, b) => Date.parse(b.lastActivity) - Date.parse(a.lastActivity)).slice(0, limit).map((session) => ({
4281
+ sessionId: session.sessionId,
4282
+ status: session.status,
4283
+ summary: statusLine(session),
4284
+ lastActivity: session.lastActivity,
4285
+ runCount: session.runIds.length
4286
+ }));
4287
+ let failed = 0;
4288
+ let stale = 0;
4289
+ let guardrailWarningTotal = 0;
4290
+ for (const session of inWindow) {
4291
+ if (isFailed(session.status)) failed += 1;
4292
+ if (isStale(session.status)) stale += 1;
4293
+ guardrailWarningTotal += guardrailWarnings(session);
4294
+ }
4295
+ return {
4296
+ since: sinceIso,
4297
+ sessions: inWindow.length,
4298
+ failed,
4299
+ stale,
4300
+ guardrailWarnings: guardrailWarningTotal,
4301
+ entries
4302
+ };
4303
+ }
4304
+ function renderActivitySummaryHuman(summary) {
4305
+ const lines = [];
4306
+ const todayStart = /* @__PURE__ */ new Date();
4307
+ todayStart.setHours(0, 0, 0, 0);
4308
+ const todayMs = todayStart.getTime();
4309
+ const today = summary.entries.filter(
4310
+ (entry) => Date.parse(entry.lastActivity) >= todayMs
4311
+ );
4312
+ if (today.length > 0) {
4313
+ lines.push("Today");
4314
+ for (const entry of today) {
4315
+ lines.push(` ${entry.summary}`);
4316
+ }
4317
+ lines.push("");
4318
+ }
4319
+ lines.push(`Since ${summary.since}`);
4320
+ lines.push(` ${summary.sessions} sessions`);
4321
+ lines.push(` ${summary.failed} failed`);
4322
+ lines.push(` ${summary.stale} stale`);
4323
+ lines.push(` ${summary.guardrailWarnings} guardrail warnings`);
4324
+ return lines.join("\n");
4325
+ }
4326
+
4081
4327
  // packages/core/src/sessions/types.ts
4082
4328
  var SESSION_WORKFLOW_KEYS = [
4083
4329
  "sessionId",
@@ -4488,12 +4734,12 @@ function buildCriticalPath(runs, handoffs) {
4488
4734
  handoffs.filter((edge) => edge.confidence === "explicit").map((edge) => edge.from)
4489
4735
  );
4490
4736
  const ordered = [...runs].sort(compareRuns);
4491
- const path5 = [];
4737
+ const path6 = [];
4492
4738
  const visited = /* @__PURE__ */ new Set();
4493
4739
  const pushRun = (run, confidence, source) => {
4494
4740
  if (visited.has(run.runId)) return;
4495
4741
  visited.add(run.runId);
4496
- path5.push({
4742
+ path6.push({
4497
4743
  runId: run.runId,
4498
4744
  name: run.name,
4499
4745
  startedAt: run.startedAt,
@@ -4518,7 +4764,7 @@ function buildCriticalPath(runs, handoffs) {
4518
4764
  const confidence = explicitTargets.has(run.runId) || explicitSources.has(run.runId) ? "explicit" : "correlated";
4519
4765
  pushRun(run, confidence, confidence === "explicit" ? "manual" : "inferred");
4520
4766
  }
4521
- return path5;
4767
+ return path6;
4522
4768
  }
4523
4769
  function metaRunIdMatches(run, token, runById) {
4524
4770
  const meta = extractSessionWorkflowMetadata(run.metadata);
@@ -4560,14 +4806,21 @@ function buildSessionIndex(inputRuns, options = {}) {
4560
4806
  sessionId
4561
4807
  });
4562
4808
  }
4563
- return {
4564
- sessionId,
4565
- runIds,
4566
- groups,
4567
- handoffs,
4568
- retries,
4569
- criticalPath
4570
- };
4809
+ return enrichSessionSummary(
4810
+ {
4811
+ sessionId,
4812
+ runIds,
4813
+ groups,
4814
+ handoffs,
4815
+ retries,
4816
+ criticalPath
4817
+ },
4818
+ runs,
4819
+ {
4820
+ nowMs: options.nowMs,
4821
+ staleThresholdMs: options.staleThresholdMs
4822
+ }
4823
+ );
4571
4824
  });
4572
4825
  if (sessions.length === 0 && runs.length > 0) {
4573
4826
  warnings.push({
@@ -4631,6 +4884,190 @@ async function isAgentInspectTrace(filePath) {
4631
4884
  }
4632
4885
  }
4633
4886
 
4887
+ // packages/core/src/bundle/resolve.ts
4888
+ function parseSinceCutoff(since) {
4889
+ const trimmed = since.trim();
4890
+ if (trimmed === "") {
4891
+ throw new Error("--since requires a non-empty duration (e.g. 24h, 7d).");
4892
+ }
4893
+ return Date.now() - parseDuration(trimmed);
4894
+ }
4895
+ function runActivityMs(run) {
4896
+ if (run.startedAt !== void 0 && Number.isFinite(run.startedAt)) return run.startedAt;
4897
+ if (run.endedAt !== void 0 && Number.isFinite(run.endedAt)) return run.endedAt;
4898
+ return void 0;
4899
+ }
4900
+ function runsInSinceWindow(runs, since) {
4901
+ const cutoff = parseSinceCutoff(since);
4902
+ const ids = [];
4903
+ for (const run of runs) {
4904
+ const activity = runActivityMs(run);
4905
+ if (activity !== void 0 && activity >= cutoff) {
4906
+ ids.push(run.runId);
4907
+ }
4908
+ }
4909
+ return ids.sort((a, b) => a.localeCompare(b));
4910
+ }
4911
+ function findSession(index, sessionId) {
4912
+ return index.sessions.find((session) => session.sessionId === sessionId);
4913
+ }
4914
+ function resolveBundleRunIds(index, runs, options) {
4915
+ const runId = options.runId?.trim();
4916
+ const sessionId = options.sessionId?.trim();
4917
+ const since = options.since?.trim();
4918
+ const modes = [runId ? 1 : 0, sessionId ? 1 : 0, since ? 1 : 0].reduce((a, b) => a + b, 0);
4919
+ if (modes === 0) {
4920
+ throw new Error(
4921
+ "bundle requires a run id, --session <sessionId>, or --since <duration>."
4922
+ );
4923
+ }
4924
+ if (modes > 1) {
4925
+ throw new Error(
4926
+ "bundle accepts only one target: a run id, --session, or --since (not combined)."
4927
+ );
4928
+ }
4929
+ if (runId) {
4930
+ const known = runs.some((run) => run.runId === runId);
4931
+ if (!known) {
4932
+ throw new Error(`Run "${runId}" was not found in the trace directory.`);
4933
+ }
4934
+ return { runIds: [runId] };
4935
+ }
4936
+ if (sessionId) {
4937
+ const session = findSession(index, sessionId);
4938
+ if (!session) {
4939
+ throw new Error(`Session "${sessionId}" was not found.`);
4940
+ }
4941
+ if (session.runIds.length === 0) {
4942
+ throw new Error(`Session "${sessionId}" has no runs to bundle.`);
4943
+ }
4944
+ return {
4945
+ runIds: [...session.runIds].sort((a, b) => a.localeCompare(b)),
4946
+ sessionId
4947
+ };
4948
+ }
4949
+ const runIds = runsInSinceWindow(runs, since);
4950
+ if (runIds.length === 0) {
4951
+ throw new Error(`No runs matched --since ${since}.`);
4952
+ }
4953
+ return { runIds, since };
4954
+ }
4955
+
4956
+ // packages/core/src/bundle/safety-status.ts
4957
+ function aggregateBundleSafeStatus(statuses) {
4958
+ if (statuses.length === 0) return "UNKNOWN";
4959
+ if (statuses.some((status) => status === "UNSAFE")) return "UNSAFE";
4960
+ if (statuses.some((status) => status === "UNKNOWN")) return "UNKNOWN";
4961
+ if (statuses.some((status) => status === "SAFE WITH WARNINGS")) return "SAFE WITH WARNINGS";
4962
+ return "SAFE";
4963
+ }
4964
+ function toMetadataSafeStatus(status) {
4965
+ if (status === "SAFE WITH WARNINGS") return "SAFE_WITH_WARNINGS";
4966
+ return status;
4967
+ }
4968
+ function bundleFailsOnSafety(status, allowUnsafe) {
4969
+ if (allowUnsafe) return false;
4970
+ return status === "UNSAFE" || status === "UNKNOWN";
4971
+ }
4972
+
4973
+ // packages/core/src/bundle/manifest.ts
4974
+ var BUNDLE_NOTE = "Generated locally by AgentInspect. Bundles are derived copies for review \u2014 not compliance or security certification. Review before sharing.";
4975
+ var PLACEHOLDER_NOTE = "No eval or performance artifacts were requested for this bundle.";
4976
+ function buildBundleMetadata(parts) {
4977
+ const aggregate = aggregateBundleSafeStatus(
4978
+ parts.checks.runs.map((run) => run.status)
4979
+ );
4980
+ return {
4981
+ createdAt: parts.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
4982
+ agentInspectVersion: parts.agentInspectVersion,
4983
+ redactionProfile: parts.profile,
4984
+ sourceTraceCount: parts.resolve.runIds.length,
4985
+ runIds: [...parts.resolve.runIds],
4986
+ safeStatus: toMetadataSafeStatus(aggregate),
4987
+ files: [...parts.files].sort((a, b) => a.localeCompare(b)),
4988
+ note: BUNDLE_NOTE,
4989
+ ...parts.resolve.sessionId !== void 0 ? { sessionId: parts.resolve.sessionId } : {},
4990
+ ...parts.resolve.since !== void 0 ? { since: parts.resolve.since } : {}
4991
+ };
4992
+ }
4993
+ function buildPlaceholderArtifact() {
4994
+ return {
4995
+ status: "not_requested",
4996
+ note: PLACEHOLDER_NOTE
4997
+ };
4998
+ }
4999
+
5000
+ // packages/core/src/bundle/summary.ts
5001
+ function markdownTable(rows) {
5002
+ const lines = ["| Field | Value |", "| --- | --- |"];
5003
+ for (const [key, value] of rows) {
5004
+ lines.push(`| ${key} | ${value ?? "unknown"} |`);
5005
+ }
5006
+ return lines.join("\n");
5007
+ }
5008
+ function buildBundleSummaryMarkdown(parts) {
5009
+ const { metadata, checks, redaction } = parts;
5010
+ const lines = [
5011
+ "# AgentInspect trace bundle",
5012
+ "",
5013
+ metadata.note,
5014
+ "",
5015
+ "## Overview",
5016
+ "",
5017
+ markdownTable([
5018
+ ["Created", metadata.createdAt],
5019
+ ["AgentInspect", metadata.agentInspectVersion],
5020
+ ["Redaction profile", metadata.redactionProfile],
5021
+ ["Safe status", metadata.safeStatus],
5022
+ ["Source traces", metadata.sourceTraceCount],
5023
+ ["Runs", metadata.runIds.join(", ")],
5024
+ ...metadata.sessionId ? [["Session", metadata.sessionId]] : [],
5025
+ ...metadata.since ? [["Since", metadata.since]] : []
5026
+ ]),
5027
+ "",
5028
+ "## Safety checks",
5029
+ "",
5030
+ `Aggregate: **${checks.aggregateStatus}**`,
5031
+ ""
5032
+ ];
5033
+ for (const run of checks.runs) {
5034
+ lines.push(
5035
+ `- \`${run.runId}\`: ${run.status} (${run.findings} finding(s), ${run.errors} error(s), ${run.warnings} warning(s))`
5036
+ );
5037
+ }
5038
+ lines.push("", "## Redaction", "", `Total findings: ${redaction.totalFindings}`, "");
5039
+ for (const run of redaction.runs) {
5040
+ const detectors = run.detectors.length > 0 ? run.detectors.join(", ") : "none";
5041
+ lines.push(`- \`${run.runId}\`: ${run.findings} finding(s); detectors: ${detectors}`);
5042
+ }
5043
+ lines.push(
5044
+ "",
5045
+ "## Files",
5046
+ "",
5047
+ ...metadata.files.map((file) => `- \`${file}\``),
5048
+ "",
5049
+ "_Review every generated artifact before sharing outside your team._",
5050
+ ""
5051
+ );
5052
+ return lines.join("\n");
5053
+ }
5054
+ function normalizeBundleOutputPath(out) {
5055
+ const trimmed = out.trim();
5056
+ if (trimmed === "") {
5057
+ throw new Error("--out requires a non-empty path.");
5058
+ }
5059
+ const resolved = path__default.default.resolve(trimmed);
5060
+ if (resolved.toLowerCase().endsWith(".zip")) {
5061
+ return resolved.slice(0, -4);
5062
+ }
5063
+ return resolved;
5064
+ }
5065
+ function defaultBundleOutputPath(runIds) {
5066
+ const label = runIds.length === 1 ? runIds[0] : `multi-${runIds.length}`;
5067
+ const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
5068
+ return path__default.default.resolve(`agent-inspect-bundle-${label}-${stamp}`);
5069
+ }
5070
+
4634
5071
  // packages/core/src/inspect-run.ts
4635
5072
  function normalizeRunName(name) {
4636
5073
  if (typeof name !== "string" || name.trim() === "") {
@@ -4773,18 +5210,27 @@ exports.RUNS_DIR_NAME = RUNS_DIR_NAME;
4773
5210
  exports.SESSION_WORKFLOW_KEYS = SESSION_WORKFLOW_KEYS;
4774
5211
  exports.TERMINAL_INDENT = TERMINAL_INDENT;
4775
5212
  exports.TraceDirectory = TraceDirectory;
5213
+ exports.aggregateBundleSafeStatus = aggregateBundleSafeStatus;
4776
5214
  exports.aggregateSessionCheckResults = aggregateSessionCheckResults;
5215
+ exports.buildActivitySummary = buildActivitySummary;
5216
+ exports.buildBundleMetadata = buildBundleMetadata;
5217
+ exports.buildBundleSummaryMarkdown = buildBundleSummaryMarkdown;
4777
5218
  exports.buildLocalExplanation = buildLocalExplanation;
5219
+ exports.buildPlaceholderArtifact = buildPlaceholderArtifact;
4778
5220
  exports.buildRunSummary = buildRunSummary;
4779
5221
  exports.buildRunTimeline = buildRunTimeline;
4780
5222
  exports.buildRunWhatSummary = buildRunWhatSummary;
4781
5223
  exports.buildSessionIndex = buildSessionIndex;
4782
5224
  exports.buildTraceStats = buildTraceStats;
5225
+ exports.bundleFailsOnSafety = bundleFailsOnSafety;
4783
5226
  exports.createInspector = createInspector;
4784
5227
  exports.createInspectorRuntime = createInspectorRuntime;
4785
5228
  exports.createRunId = createRunId;
4786
5229
  exports.createStepId = createStepId;
5230
+ exports.defaultBundleOutputPath = defaultBundleOutputPath;
5231
+ exports.deriveSessionStatus = deriveSessionStatus;
4787
5232
  exports.enrichSessionRunRecord = enrichSessionRunRecord;
5233
+ exports.enrichSessionSummary = enrichSessionSummary;
4788
5234
  exports.ensureTraceDir = ensureTraceDir;
4789
5235
  exports.extractMetadata = extractMetadata;
4790
5236
  exports.extractSessionWorkflowMetadata = extractSessionWorkflowMetadata;
@@ -4820,6 +5266,7 @@ exports.listTraceFiles = listTraceFiles;
4820
5266
  exports.loadSessionRunRecords = loadSessionRunRecords;
4821
5267
  exports.loadTraceMetadataList = loadTraceMetadataList;
4822
5268
  exports.maybeInspectRun = maybeInspectRun;
5269
+ exports.normalizeBundleOutputPath = normalizeBundleOutputPath;
4823
5270
  exports.parseDuration = parseDuration;
4824
5271
  exports.parseDurationFilter = parseDurationFilter;
4825
5272
  exports.parseTraceJsonl = parseTraceJsonl;
@@ -4833,12 +5280,14 @@ exports.printStepComplete = printStepComplete;
4833
5280
  exports.printStepStart = printStepStart;
4834
5281
  exports.readTraceEvents = readTraceEvents;
4835
5282
  exports.readTraceFile = readTraceFile;
5283
+ exports.renderActivitySummaryHuman = renderActivitySummaryHuman;
4836
5284
  exports.renderErrorLine = renderErrorLine;
4837
5285
  exports.renderRunSummary = renderRunSummary;
4838
5286
  exports.renderRunWhat = renderRunWhat;
4839
5287
  exports.renderStepLine = renderStepLine;
4840
5288
  exports.renderTimeline = renderTimeline;
4841
5289
  exports.renderTraceStats = renderTraceStats;
5290
+ exports.resolveBundleRunIds = resolveBundleRunIds;
4842
5291
  exports.resolveRedactionProfile = resolveRedactionProfile;
4843
5292
  exports.resolveTraceDir = resolveTraceDir;
4844
5293
  exports.resolveTraceSafetyOptions = resolveTraceSafetyOptions;
@@ -4847,6 +5296,7 @@ exports.runWithStepContext = runWithStepContext;
4847
5296
  exports.searchTraces = searchTraces;
4848
5297
  exports.serializeEvent = serializeEvent;
4849
5298
  exports.sessionKeyForRun = sessionKeyForRun;
5299
+ exports.toMetadataSafeStatus = toMetadataSafeStatus;
4850
5300
  exports.traceMetasToSessionRunRecords = traceMetasToSessionRunRecords;
4851
5301
  exports.truncateName = truncateName;
4852
5302
  exports.unknownTraceFormatMessage = unknownTraceFormatMessage;