@tangle-network/traces 0.22.0 → 0.23.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.
package/dist/cli.js CHANGED
@@ -13,7 +13,6 @@ import {
13
13
  assertOutsideSourceBundle,
14
14
  assessSpans,
15
15
  buildPolicyEvidenceRecord,
16
- buildSessionFactsReport,
17
16
  buildSessionIndexFromRows,
18
17
  buildSkillUsageReport,
19
18
  cmdReplayVerify,
@@ -22,6 +21,7 @@ import {
22
21
  collectSessionSelection,
23
22
  commandAnalyzer,
24
23
  commandRedactor,
24
+ createSessionFactsReportBuilder,
25
25
  defaultSkillUsageStorePath,
26
26
  diffRuns,
27
27
  executeUpload,
@@ -47,6 +47,7 @@ import {
47
47
  parseIsoToEpochMs,
48
48
  parseSession,
49
49
  parseSince,
50
+ parseTimeBound,
50
51
  planUpload,
51
52
  primeAnalyzer,
52
53
  projectSessionBundle,
@@ -66,6 +67,7 @@ import {
66
67
  runTraceInvestigation,
67
68
  runTraceQuestions,
68
69
  saveReport,
70
+ scanSessions,
69
71
  selectAdapters,
70
72
  serializePolicyEvidence,
71
73
  serializeSessionIndex,
@@ -90,7 +92,7 @@ import {
90
92
  writeSessionIndexFile,
91
93
  writeTraceEvidenceExportFile,
92
94
  writeTraceQuestionsArtifacts
93
- } from "./chunk-DON6NQ7H.js";
95
+ } from "./chunk-7DVZCCZI.js";
94
96
 
95
97
  // src/cli.ts
96
98
  import { readFileSync } from "fs";
@@ -489,6 +491,9 @@ function parseArgs(argv) {
489
491
  case "--since":
490
492
  a.since = next();
491
493
  break;
494
+ case "--until":
495
+ a.until = next();
496
+ break;
492
497
  case "--out":
493
498
  a.out = next();
494
499
  break;
@@ -703,6 +708,10 @@ function validateViewSelection(args) {
703
708
  `--view is not supported by ${args.command}. A view is a projection of an assembled bundle: run \`traces bundle ... --out <dir>\` first, then \`traces bundle-view <dir> --view evidence-only --out <view-dir>\`.`
704
709
  );
705
710
  }
711
+ function validateUntilSelection(args) {
712
+ if (args.until === void 0 || args.command === "facts") return args;
713
+ throw new Error(`--until is not supported by ${args.command}; it bounds the facts window (traces facts --since <t> --until <t>)`);
714
+ }
706
715
  function validateWorkflowSelection(args) {
707
716
  if (!args.workflow && !args.latestTurn) return args;
708
717
  if (!WORKFLOW_COMMANDS.has(args.command)) {
@@ -736,7 +745,7 @@ function adaptersFor(args) {
736
745
  return selectAdapters({ all: args.all, harnesses: [args.harness] });
737
746
  }
738
747
  async function discover(args) {
739
- const sinceMs = args.since ? Date.parse(args.since) : void 0;
748
+ const sinceMs = args.since ? parseSince(args.since) : void 0;
740
749
  const out = [];
741
750
  for (const adapter of adaptersFor(args)) {
742
751
  let refs = await locateSessions(adapter, { cwd: args.cwd, sinceMs });
@@ -1201,10 +1210,50 @@ async function cmdFacts(args) {
1201
1210
  if (format !== "json" && format !== "text") {
1202
1211
  throw new Error(`unknown facts format "${format}" (expected json or text)`);
1203
1212
  }
1204
- const collected = await collectSpans(args);
1205
- if (collected.spans.length === 0) throw new Error("no spans found for the given selection");
1206
- warnIncompleteWorkflow(collected.workflow);
1207
- const report = buildSessionFactsReport(collected.spans, { harness: collected.harness, includeContent: !args.noContent });
1213
+ const window = args.since !== void 0 || args.until !== void 0 ? {
1214
+ ...args.since !== void 0 ? { since: new Date(parseSince(args.since)).toISOString() } : {},
1215
+ ...args.until !== void 0 ? { until: new Date(parseTimeBound(args.until, "--until")).toISOString() } : {}
1216
+ } : void 0;
1217
+ const builder = createSessionFactsReportBuilder({ includeContent: !args.noContent, window });
1218
+ let report;
1219
+ const discoversWindow = window !== void 0 && !args.session && !args.otlp && !args.input && !args.sourceBundle && !args.workflow;
1220
+ if (discoversWindow) {
1221
+ const harnesses = /* @__PURE__ */ new Set();
1222
+ for await (const scanned of scanSessions({
1223
+ adapters: adaptersFor(args),
1224
+ cwd: args.cwd,
1225
+ sinceMs: window.since === void 0 ? void 0 : Date.parse(window.since),
1226
+ last: args.last > 0 ? args.last : void 0,
1227
+ taskScope: args.latestTurn ? "latest" : "all",
1228
+ onError: (error, ref) => {
1229
+ if (!ref) throw error;
1230
+ builder.addUnread({
1231
+ sessionId: ref.sessionId,
1232
+ traceId: null,
1233
+ source: ref.path,
1234
+ reason: error instanceof Error ? error.message : String(error)
1235
+ });
1236
+ }
1237
+ })) {
1238
+ harnesses.add(scanned.adapter.harness);
1239
+ builder.add(scanned.spans);
1240
+ }
1241
+ report = { ...builder.build(), harness: [...harnesses].join("+") || args.harness };
1242
+ } else {
1243
+ const collected = await collectSpans(args);
1244
+ if (collected.spans.length === 0) throw new Error("no spans found for the given selection");
1245
+ warnIncompleteWorkflow(collected.workflow);
1246
+ builder.add(collected.spans);
1247
+ report = { ...builder.build(), harness: collected.harness };
1248
+ }
1249
+ const unreadInWindow = report.selection?.unreadSessions ?? [];
1250
+ if (unreadInWindow.length > 0) {
1251
+ const named = unreadInWindow.slice(0, 3).map((entry) => entry.source ?? entry.sessionId ?? entry.traceId);
1252
+ process.stderr.write(
1253
+ `warning: ${unreadInWindow.length} session(s) could not be read; each is named with its reason in selection.unreadSessions (${named.join(", ")}${unreadInWindow.length > named.length ? ", \u2026" : ""})
1254
+ `
1255
+ );
1256
+ }
1208
1257
  const unread = report.sessions.filter((facts) => facts.recordSpans === 0);
1209
1258
  if (unread.length > 0) {
1210
1259
  throw new Error(
@@ -2050,10 +2099,15 @@ Commands:
2050
2099
  sessions: tool calls excluding synthesized spans, subagent spawns
2051
2100
  with task names, human turns in order, the final message per task,
2052
2101
  changed paths, first/last record times, the harness token total, and
2053
- the first failure by agent-eval's fixed precedence (or none).
2102
+ the first failure by agent-eval's fixed precedence (or none), the
2103
+ session's recorded working directory, and for each human turn the
2104
+ agent message it answered.
2054
2105
  No model call, no budget, $0. Every fact names the span ids it came
2055
2106
  from; a fact the spans cannot support is null with its reason.
2056
- --format json (default) or text (exit 1 when a session cannot be read)
2107
+ --since/--until select every session with a record in the window and
2108
+ count only that window's turns; a session that cannot be read is named
2109
+ in selection.unreadSessions. Without a window: exit 1 when a selected
2110
+ session cannot be read. --format json (default) or text
2057
2111
  skills Count skill use across Claude Code, Codex, and Kimi Code sessions on this
2058
2112
  machine, and list installed skills with no use in the window.
2059
2113
  Incremental: a run reads only transcript bytes appended since the
@@ -2129,7 +2183,11 @@ Options:
2129
2183
  accepted vs rejected. Rolls up when the dir holds many runs.
2130
2184
  analyze reads Runtime journals and recorded startup failures.
2131
2185
  watch reads a live Runtime journal and OTLP span files.
2132
- --since <t> upload: window, 30m / 2h / 7d or an ISO date (default 24h); analyze: ISO cutoff
2186
+ --since <t> 30m / 2h / 7d (before now) or an ISO date. Selection commands read
2187
+ sessions modified at or after it; upload: its window (default 24h).
2188
+ facts: opens a time window and selects EVERY session with a record
2189
+ in it, not only the newest; its turn facts keep only turns inside it
2190
+ --until <t> facts: closes the window (exclusive), same forms as --since
2133
2191
  --out <path> Write report to a file
2134
2192
  --dir <path> improve/ask: write artifacts to this directory
2135
2193
  --otlp <file|dir> READ OTLP-JSONL emitted by any system, skipping the adapters.
@@ -2261,7 +2319,7 @@ async function main() {
2261
2319
  return;
2262
2320
  }
2263
2321
  const args = validateOtlpSelection(
2264
- validateViewSelection(validateWorkflowSelection(applyCurrentSessionSelection(parsedArgs)))
2322
+ validateViewSelection(validateWorkflowSelection(validateUntilSelection(applyCurrentSessionSelection(parsedArgs))))
2265
2323
  );
2266
2324
  switch (args.command) {
2267
2325
  case "help":
package/dist/index.d.ts CHANGED
@@ -900,6 +900,14 @@ declare const ATTR: {
900
900
  * in-container path even when no such path exists on this host. */
901
901
  readonly ENVIRONMENT_CWD: "tangle.environment.cwd";
902
902
  };
903
+ /**
904
+ * The working directory the harness recorded for a session, verbatim, on the
905
+ * adapter's root `session` span. Unlike `tangle.cwd` it is never repaired,
906
+ * decoded from a directory name, or inferred from paths the spans mention: an
907
+ * adapter sets it only from a field the session source itself carries, and
908
+ * leaves it absent when the source names none.
909
+ */
910
+ declare const SESSION_CWD_ATTR = "traces.session.cwd";
903
911
  /** `tangle.ingest_source` value for CLI-uploaded traces. Wire contract. */
904
912
  declare const INGEST_SOURCE_CLI = "cli";
905
913
  /**
@@ -957,6 +965,9 @@ declare function parseIsoToEpochMs(ts: string): number;
957
965
  /** Parse a `--since` window: `30m` / `2h` / `7d` (relative to now) or an ISO
958
966
  * date, → epoch ms. Throws on a malformed value (fail-loud, not silent). */
959
967
  declare function parseSince(value: string): number;
968
+ /** Parse one time bound the way `--since` reads it: `30m` / `2h` / `7d` before
969
+ * now, or an ISO date. `flag` names the option in the error. */
970
+ declare function parseTimeBound(value: string, flag: string): number;
960
971
 
961
972
  type JsonSourceErrorKind = 'read' | 'parse';
962
973
  declare class JsonSourceError extends Error {
@@ -3844,10 +3855,28 @@ declare function readPullRequests(spans: readonly OtlpSpan[]): PullRequestReadin
3844
3855
  * deltas, which is a different (and smaller) number.
3845
3856
  */
3846
3857
  /** Cache invalidation key for deterministic measurements and prepared analyst context. */
3847
- declare const SESSION_FACTS_MEASUREMENT_VERSION = "3";
3858
+ declare const SESSION_FACTS_MEASUREMENT_VERSION = "4";
3859
+ /**
3860
+ * A half-open time window: a time `t` is inside when `since <= t < until`.
3861
+ * Either bound may be absent, which leaves that side open.
3862
+ */
3863
+ interface SessionFactsWindow {
3864
+ /** ISO-8601 lower bound, inclusive. */
3865
+ readonly since?: string;
3866
+ /** ISO-8601 upper bound, exclusive. */
3867
+ readonly until?: string;
3868
+ }
3848
3869
  interface SessionFactsOptions {
3849
3870
  /** Defaults to true for compatibility. False withholds conversation, commands, paths and assignment text. */
3850
3871
  readonly includeContent?: boolean;
3872
+ /**
3873
+ * Limit the turn facts to a time window. `humanTurns`, `excludedTurns` and
3874
+ * `turnsByActor` keep only `user.prompt` turns that started inside it; every
3875
+ * other fact still covers the whole session. A report built with a window
3876
+ * also leaves out every session with no record inside it, and names them in
3877
+ * {@link SessionFactsReport.selection}.
3878
+ */
3879
+ readonly window?: SessionFactsWindow;
3851
3880
  }
3852
3881
  declare const SESSION_TOKEN_TOTAL_ATTR = "traces.session.total_tokens";
3853
3882
  /**
@@ -3859,6 +3888,8 @@ declare const SESSION_TOKEN_TOTAL_ATTR = "traces.session.total_tokens";
3859
3888
  declare const SPAN_SYNTHESIZED_ATTR = "traces.codex.span_synthesized";
3860
3889
  /** Max characters of message or prompt text kept per fact entry. */
3861
3890
  declare const FACT_TEXT_CAP = 2000;
3891
+ /** Max characters of the agent message kept in {@link SessionTurnFact.answered}. */
3892
+ declare const ANSWERED_TEXT_CAP = 1500;
3862
3893
  /** Entries kept per list field before the sheet reports the rest as omitted. */
3863
3894
  declare const FACT_LIST_CAP = 200;
3864
3895
  /**
@@ -3904,6 +3935,15 @@ interface SessionTurnFact {
3904
3935
  readonly at: string;
3905
3936
  readonly text: string;
3906
3937
  readonly spanId: string;
3938
+ /**
3939
+ * The text of the last message this session's own agent wrote before the
3940
+ * turn: what the person was answering. Clipped to {@link ANSWERED_TEXT_CAP}
3941
+ * characters with a visible `… [+N chars]` marker. Null when the agent had
3942
+ * written no text before the turn.
3943
+ */
3944
+ readonly answered: string | null;
3945
+ /** The `message.assistant` span `answered` was read from. */
3946
+ readonly answeredSpanId: string | null;
3907
3947
  }
3908
3948
  /** How many `user.prompt` turns each actor produced. */
3909
3949
  interface TurnActorCount {
@@ -3952,6 +3992,13 @@ interface SessionFacts {
3952
3992
  readonly traceId: string;
3953
3993
  readonly sessionId: string | null;
3954
3994
  readonly harness: string | null;
3995
+ /**
3996
+ * The working directory the harness recorded for the session, read from
3997
+ * `traces.session.cwd` on the adapter's root span. Null with the reason when
3998
+ * no span carries it; never decoded from a directory name or inferred from
3999
+ * the paths the session touched.
4000
+ */
4001
+ readonly cwd: SessionFact<string>;
3955
4002
  /** Spans in this trace, including the synthesized ones. */
3956
4003
  readonly spanCount: number;
3957
4004
  /**
@@ -4002,18 +4049,45 @@ interface SessionFacts {
4002
4049
  readonly firstFailure: FirstFailure;
4003
4050
  readonly measurements: SessionMeasurements;
4004
4051
  }
4052
+ /** A session the report could not read, so whether it belongs in the window is unknown. */
4053
+ interface UnreadSessionFact {
4054
+ readonly sessionId: string | null;
4055
+ readonly traceId: string | null;
4056
+ /** Where the session was read from, when the reader knows. */
4057
+ readonly source: string | null;
4058
+ readonly reason: string;
4059
+ }
4060
+ /** How a windowed report chose its sessions and turns. Null on a report built without a window. */
4061
+ interface SessionFactsSelection {
4062
+ /** The window's inclusive lower bound, or null when open. */
4063
+ readonly since: string | null;
4064
+ /** The window's exclusive upper bound, or null when open. */
4065
+ readonly until: string | null;
4066
+ /** Which sessions the report holds. */
4067
+ readonly sessionRule: string;
4068
+ /** Which turns `humanTurns`, `excludedTurns` and `turnsByActor` hold. */
4069
+ readonly turnRule: string;
4070
+ /** Sessions read in full whose records all fall outside the window, by session id. */
4071
+ readonly outsideWindow: readonly string[];
4072
+ /** Sessions that could not be read; each is named with the reason, never counted as empty. */
4073
+ readonly unreadSessions: readonly UnreadSessionFact[];
4074
+ }
4005
4075
  interface SessionFactsReport {
4006
4076
  readonly schemaVersion: 1;
4007
4077
  readonly kind: 'traces.session_facts_report';
4008
4078
  readonly generatedAt: string;
4009
4079
  readonly measurementVersion: typeof SESSION_FACTS_MEASUREMENT_VERSION;
4010
- /** SHA-256 of the canonical selected spans, including content, attributes, links and timing. */
4080
+ /**
4081
+ * SHA-256 over the selected sessions in trace-id order, each contributing the
4082
+ * SHA-256 of its canonical spans (content, attributes, links and timing).
4083
+ */
4011
4084
  readonly sourceDigest: string;
4012
4085
  /** Latest recorded endpoint, not the last time the filesystem was checked. */
4013
4086
  readonly evidenceThrough: string | null;
4014
4087
  readonly contentIncluded: boolean;
4015
4088
  readonly harness: string | null;
4016
4089
  readonly spanCount: number;
4090
+ readonly selection: SessionFactsSelection | null;
4017
4091
  readonly sessions: readonly SessionFacts[];
4018
4092
  }
4019
4093
  /**
@@ -4022,11 +4096,25 @@ interface SessionFactsReport {
4022
4096
  * model, network call, or budget is involved.
4023
4097
  */
4024
4098
  declare function computeSessionFacts(spans: readonly OtlpSpan[], options?: SessionFactsOptions): SessionFacts[];
4025
- /** The facts sheet for a set of spans, as one report. */
4026
- declare function buildSessionFactsReport(spans: readonly OtlpSpan[], options?: SessionFactsOptions & {
4099
+ type SessionFactsReportOptions = SessionFactsOptions & {
4027
4100
  harness?: string | null;
4028
4101
  generatedAt?: string;
4029
- }): SessionFactsReport;
4102
+ };
4103
+ /** The facts sheet for a set of spans, as one report. */
4104
+ declare function buildSessionFactsReport(spans: readonly OtlpSpan[], options?: SessionFactsReportOptions): SessionFactsReport;
4105
+ /**
4106
+ * Builds one report from sessions supplied a batch at a time, so a caller
4107
+ * reading many sessions holds one session's spans at once rather than all of
4108
+ * them. `add` the whole spans of one or more sessions per call; a trace split
4109
+ * across two calls is reported as two sessions.
4110
+ */
4111
+ interface SessionFactsReportBuilder {
4112
+ add(spans: readonly OtlpSpan[]): void;
4113
+ /** Name a session that could not be read at all. Only a windowed report holds these. */
4114
+ addUnread(session: UnreadSessionFact): void;
4115
+ build(): SessionFactsReport;
4116
+ }
4117
+ declare function createSessionFactsReportBuilder(options?: SessionFactsReportOptions): SessionFactsReportBuilder;
4030
4118
  /** The short readable form: the same facts, one screen, no span-id lists. */
4031
4119
  declare function renderSessionFacts(report: SessionFactsReport): string;
4032
4120
  /**
@@ -5129,4 +5217,4 @@ declare function parseRetainedSession(input: {
5129
5217
  readonly signal?: AbortSignal;
5130
5218
  }): Promise<RetainedSessionSelection>;
5131
5219
 
5132
- export { ACTOR_ATTR, ATTR, type Actor, type AdoptionOptions, type AdoptionReport, AmpAdapter, type AnalysisEngineFromEnvOptions, type AnalyzeOptions, type AnalyzeResult, type AnswerSchema, type AssembleSessionBundleOptions, BLOBS_DIR, type BuildPolicyEvidenceOptions, type BuildSessionIndexOptions, type BuildTraceFindingPacketOptions, CHANGED_FILE_LIST_CAP, CITATION_NORMALIZATION_VERSION, CONTENT_CAP, COORDINATION_LOG_FILE, CORRECTIVE_REACTIONS, type ChangedFileFact, type ChatTrajectory, type ChatTrajectoryMessage, type ChatTrajectoryOptions, ClaudeAdapter, type CodeTraceBenchFileRef, type CodeTraceBenchImportOptions, type CodeTraceBenchImportReceipt, type CodeTraceBenchImportResult, type CodeTraceBenchImportedTrace, type CodeTraceBenchStep, CodexAdapter, CodexExecAdapter, CodexExecStreamError, CodexTaskScopeError, type CollectOptions, type CollectPolicyEvidenceOptions, type CollectSessionIndexOptions, type CollectSessionSelectionOptions, type CollectSessionWorkflowOptions, type CompactionMeasurement, type ConformanceRenderOptions, type ContentFootprint, type CoordinationLog, type CoordinationQuestion, type CoordinationSteer, CopilotAdapter, type CorruptionMode, type CoveredMeasurement, DEFAULT_ANALYST_MODEL, DEFAULT_ASK_CONCURRENCY, DEFAULT_HARNESS, DEFAULT_SANDBOX_BASE_URL, DEFAULT_SWEEP_THRESHOLD, EMPTY_SPAN_RUN_SNAPSHOT, EXPORT_RULE, EmptySessionError, type EvidenceOnlyVerdict, type ExcludedTurnFact, type ExecuteOptions, type ExportRule, type ExternalAnalysisKind, type ExternalAnalysisPayload, type ExternalAnalysisResult, type ExternalAnalyzer, type ExternalAnalyzerOptions, type ExternalDiscoveryCandidate, FACT_LIST_CAP, FACT_TEXT_CAP, FactoryAdapter, type FailureFollowUp, type FailureFollowUpReport, type FileRunContextReaderOptions, type FinalMessageFact, type FindSessionTextLeaksOptions, type FindingRejectionCounts, type FindingRejectionReasons, type FindingRejectionTally, type FindingsFileOutcome, type FollowUpKind, GeminiAdapter, type HaloAnalyzerOptions, type HaloReasoningEffort, HarnessSessionsAdapter, type HarnessTraceAdapter, type HodoscopeAnalyzerOptions, type HodoscopeInput, type HodoscopeMessage, type HodoscopeSourceMapEntry, type HodoscopeTrajectory, INGEST_SOURCE_CLI, INHERITED_SOURCE_ATTR, INHERITED_SPANS_OMITTED_ATTR, INHERITED_SPAN_ATTR, INHERITED_SPAN_COUNT_ATTR, type InheritedSpanSource, type InspectSessionIndexOptions, type InstalledSkill, JsonSourceError, type JsonlCorruptionReceipt, JsonlParseError, type JsonlReadOptions, type LiveBatchOptions, type LocateOptions, type LoopConvergence, type LoopConvergenceReport, type LoopIteration, type LoopTrend, type LoopTrendBasis, MAX_SHELL_DEPTH, MAX_TRACE_QUESTION_CHARS, type ObservedLoop, type ObserverOptions, OpencodeAdapter, type OtlpIngestIssue, type OtlpIngestIssueKind, type OtlpInput, type OtlpInputFile, type OtlpRowConversion, type OtlpSpan, type OtlpSpanKind, type OtlpSpanLink, type OtlpStatusCode, POLICY_EVIDENCE_NOTE, PREPARED_CONTEXT_BYTE_CEILING, type ParentTaskResolution, type ParseOptions, PartialUploadError, PiAdapter, type PiAdapterOptions, type PipelineOptions, type PipelineReport, type PlanOptions, type PolicyEvidenceLoopSummary, type PolicyEvidenceRecord, type PolicyEvidenceToolSummary, type PrimeAnalyzerOptions, type PrimeTransport, type PrimeTransportRequest, type PrimeTransportResponse, type ProjectSessionBundleOptions, type ProjectSessionBundleResult, type PullRequestFact, type PullRequestFacts, type PullRequestReading, QwenAdapter, REACTIONS, RESULT_FILE, RETAINED_SESSION_READER_VERSION, RULE, type Reaction, type ReactionReport, type ReactionSessionReport, type RedactSpansOptions, type Redactor, type RefusedSession, type RepoAttrs, type RepoResolution, type RepoResolutionSource, type ResolvedOtlpInput, type RetainedSessionFile, type RetainedSessionSelection, type RunContextJournal, type RunContextNode, type RunContextResult, type RunContextSnapshot, type RunDiffOptions, type RunDiffReport, type RunDiffSide, type RunResult, type RunWatchSnapshot, type RunWatchTarget, type RuntimeTrace, SESSION_FACTS_MEASUREMENT_VERSION, SESSION_FACTS_VERSION_SUFFIX, SESSION_TOKEN_TOTAL_ATTR, SOURCE_ATTRIBUTE_PREFIX, SPAN_SYNTHESIZED_ATTR, SPAWN_JOURNAL_FILE, STATUS_MARK, SYNTHESIZED_SOURCE_ATTR, SYNTHESIZED_SPAN_ATTR, type SandboxReplayBackendOptions, type ScanOptions, type ScannedSession, type SessionBatch, type SessionBundleAbsence, type SessionBundleCarriedSignatures, type SessionBundleExclusion, type SessionBundleExclusionRule, type SessionBundleFile, type SessionBundleIssue, type SessionBundleIssueKind, type SessionBundleLeakCheck, type SessionBundleLedgerSlice, type SessionBundleManifest, type SessionBundleProjection, type SessionBundleResult, type SessionBundleSliceRule, type SessionBundleVerification, type SessionBundleView, type SessionCorruptionReceipt, type SessionEnvironment, type SessionFact, type SessionFacts, type SessionFactsOptions, type SessionFactsReport, type SessionIdentityConflict, type SessionIdentityIndex, type SessionIntegrity, type SessionMeasurements, type SessionRef, type SessionRelationship, type SessionRole, type SessionSeedGroup, type SessionSelection, type SessionSelectionRow, type SessionSourceFile, type SessionTextLeak, type SessionTextLeakReport, type SessionTurnFact, type SessionWorkflow, SessionWorkflowError, type SessionWorkflowErrorCode, type SessionWorkflowIssue, type SessionWorkflowSession, type SessionWorkflowSummary, type SkillCatalogRoots, type SkillUsageEvent, type SkillUsageHarness, type SkillUsageKind, type SkillUsageRefresh, type SkillUsageReport, type SkillUsageReportOptions, type SkillUsageRow, type SkillUsageSources, SkillUsageStore, type SkippedAnalysis, type SkippedInputFile, type SourceRecordReference, type SpanInput, type SpanNodeStatus, type SpanRedaction, type SpanRunNode, type SpanRunSnapshot, type SpanStructure, type SpawnedChildResolution, type SpendRoll, type SteeringChainReport, type SteeringEdge, type SubagentSpawnFact, TRACE_QUESTION_PREVIEW_HEAD_CHARS, type ToolMeasurement, type TraceAgenticRoute, type TraceAgenticRouteReason, type TraceAgenticRouteReasonCode, type TraceContextIndex, type TraceContextRoot, type TraceEvidenceExportOptions, type TraceEvidenceExportResult, type TraceEvidenceFormatOption, type TraceEvidenceInputFormat, type TraceEvidenceRow, type TraceExecutionOptions, type TraceFindingPacket, type TraceImprovementArtifacts, type TraceImprovementOptions, type TraceImprovementResult, type TraceIndexedFile, type TraceInspectionArea, type TraceInspectionFinding, type TraceInspectionReport, type TraceInspectionSeverity, type TraceInvestigationOptions, type TraceInvestigationResult, type TraceLiveAction, type TraceLiveActionKind, type TraceLiveAnalysisContext, type TraceLiveAnalyst, type TraceLiveBatch, type TraceLiveEvidence, type TraceLiveFinding, type TraceLiveLoop, type TraceLiveSeverity, type TraceQuestion, type TraceQuestionAnswer, type TraceQuestionCitation, type TraceQuestionFailureKind, type TraceQuestionTrace, type TraceQuestionsArtifacts, type TraceQuestionsOptions, type TraceQuestionsResult, type TraceQuestionsTotals, type TraceSessionIndex, type TraceSessionIndexRow, type TraceStoreInvestigationOptions, type TraceStoreInvestigationResult, type TraceStreamEvent, type TraceStreamOptions, type TraceStreamReplayOptions, type TraceStreamSession, type TracesConfig, type TriggerPair, type TurnActorCount, type UnavailableCapabilities, type UploadBackend, type UploadIdentity, type UploadItem, type UploadPlan, type UploadRecord, type UploadResult, type UploadState, type UserPromptInput, type VerifySafeOptions, type VerifySafeResult, type WatchRunTargetOptions, ZERO_ROLL, type ZaiChatCallerOptions, addSpend, alreadyUploaded, analysisEngineFromEnv, analyzeAdoption, analyzeLiveBatch, analyzeLoopConvergence, analyzeReactions, analyzeSpans, analyzeSteeringChain, answerSchemaErrors, applyRedactor, assembleSessionBundle, assertAnswerSchema, assertSandboxReachable, assessSpans, buildPolicyEvidenceRecord, buildSessionFactsReport, buildSessionIndex, buildSessionIndexFromRows, buildSkillUsageReport, buildSpanRunTree, buildTraceFindingPacket, capText, chatTrajectoryToSpans, classifyEvidenceOnlyPath, classifyFailureFollowUps, classifyLiveActions, classifyReaction, claudeActor, codexActor, collectPolicyEvidence, collectSessionIndex, collectSessionSelection, collectSessionWorkflow, collectSessions, commandAnalyzer, commandRedactor, commandTextFromInput, computeAdoption, computeSessionFacts, conformanceOfSpans, connectors, countSkillRunsJsonl, createBundleSourceReader, createFindingRejectionTally, cwdMatchesSelection, cwdMatchesSelectionResolved, defaultSkillCatalogRoots, defaultSkillUsageSources, defaultSkillUsageStorePath, defaultTraceLiveAnalysts, describeSessionRelationship, diffRuns, engineCallReservationFloorUsd, environmentAttributes, environmentFromSpanAttributes, equivalentGitCwds, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, externalFailureMessage, fileRunContextSupervisorRunReader, fileSha256, findContextRoot, findSessionTextLeaks, findSpanSourceFiles, findingRejection, findingRejectionDetail, forEachTreeNode, formatFindingRejections, formatVerdict, haloAnalyzer, hashSessionBundleFiles, hodoscopeAnalyzer, httpJsonTransport, importCodeTraceBench, incompleteInputsNote, indexSessionIdsByTrace, inferRole, inferSpanKind, inspectSessionIndex, int, isBridgeMismatchError, isChatTrajectory, isChatTrajectoryMessage, isFileRunContextDir, isInheritedSpan, isSynthesizedSpan, iterSerializedSpans, knownHarnesses, listAdapters, listSessionBundleFiles, loadState, loadTraceQuestionsFile, loadTracesConfig, locateSessions, looksLikeAgentPrompt, mergeRolls, mergeTracesConfig, ms, normalizeAnalystCitations, normalizeRemote, normalizeTraceQuestions, otlpRowToSpan, outboundHash, parseIsoToEpochMs, parseJsonAnswer, parseRetainedSession, parseSession, parseSince, planTraceAgenticRoute, planUpload, primeAnalyzer, projectSessionBundle, readCoordinationLog, readFileRunContext, readInstalledSkills, readJsonFile, readJsonl, readOtlpInput, readPullRequests, readRunContextJournal, readRunContextSnapshot, readRunSide, readRunWatchSnapshot, readSessionBundleManifest, readSessionIndexFile, readSpanRunSnapshot, recordSessionCorruption, redactSpans, renderConformance, renderInspectionReport, renderRunContextSnapshot, renderRunDiff, renderRunWatchSnapshot, renderSessionFacts, renderSessionFactsContext, renderSkillUsage, renderSpanRunSnapshot, renderTraceQuestionInstructions, renderTraceQuestionPrompt, renderTraceQuestionsReport, renderValidation, resolveAdapter, resolveOtlpInputFiles, resolveRepoAttrs, resolveRunContextDir, resolveRunWatchTarget, resolveSessionRepoAttrs, runCommand, runExternalAnalyzers, runPipelines, runTotals, runTraceImprovement, runTraceInvestigation, runTraceQuestions, runTraceStoreInvestigation, sandboxReplayBackend, saveReport, saveState, scanSessions, selectAdapters, serializeInspectionReport, serializePolicyEvidence, serializeSessionIndex, serializeSpans, serializeTraceStreamEvent, sessionFactsContext, sessionHash, sessionIdFromAttributes, sessionIntegrityAttributes, sessionTextSignatures, shellCommands, skippedAnalyses, span, spanRunTotals, stampEnvironmentAttrs, stampRepoAttrs, stampSessionIdentity, stampSessionIntegrity, stampSpanWorkdirRepoAttrs, streamSessions, summarizeOtlpExecution, summarizeSpanExecution, summarizeSpanStructure, takeJsonl, textIsSynthetic, toOpenInferenceSpan, toRuntimeStore, toTraceSpanEvents, tokens, totalAgenticFailureMessage, totalFindingRejections, traceAgenticKinds, traceCitationsInText, traceStreamEventsFromSpans, unavailableCapabilities, uploadKey, usd, userPromptSpan, validateOtlpSpans, validationExitCode, verdictExitCode, verifyFindingsInSandbox, verifySafe, verifySessionBundle, watchRunTarget, watchSessions, withSessionFactsContext, wrap, writeHodoscopeInput, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionBundleManifest, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts, writeTraceQuestionsArtifacts, zaiChatCaller, zeroPricedCost };
5220
+ export { ACTOR_ATTR, ANSWERED_TEXT_CAP, ATTR, type Actor, type AdoptionOptions, type AdoptionReport, AmpAdapter, type AnalysisEngineFromEnvOptions, type AnalyzeOptions, type AnalyzeResult, type AnswerSchema, type AssembleSessionBundleOptions, BLOBS_DIR, type BuildPolicyEvidenceOptions, type BuildSessionIndexOptions, type BuildTraceFindingPacketOptions, CHANGED_FILE_LIST_CAP, CITATION_NORMALIZATION_VERSION, CONTENT_CAP, COORDINATION_LOG_FILE, CORRECTIVE_REACTIONS, type ChangedFileFact, type ChatTrajectory, type ChatTrajectoryMessage, type ChatTrajectoryOptions, ClaudeAdapter, type CodeTraceBenchFileRef, type CodeTraceBenchImportOptions, type CodeTraceBenchImportReceipt, type CodeTraceBenchImportResult, type CodeTraceBenchImportedTrace, type CodeTraceBenchStep, CodexAdapter, CodexExecAdapter, CodexExecStreamError, CodexTaskScopeError, type CollectOptions, type CollectPolicyEvidenceOptions, type CollectSessionIndexOptions, type CollectSessionSelectionOptions, type CollectSessionWorkflowOptions, type CompactionMeasurement, type ConformanceRenderOptions, type ContentFootprint, type CoordinationLog, type CoordinationQuestion, type CoordinationSteer, CopilotAdapter, type CorruptionMode, type CoveredMeasurement, DEFAULT_ANALYST_MODEL, DEFAULT_ASK_CONCURRENCY, DEFAULT_HARNESS, DEFAULT_SANDBOX_BASE_URL, DEFAULT_SWEEP_THRESHOLD, EMPTY_SPAN_RUN_SNAPSHOT, EXPORT_RULE, EmptySessionError, type EvidenceOnlyVerdict, type ExcludedTurnFact, type ExecuteOptions, type ExportRule, type ExternalAnalysisKind, type ExternalAnalysisPayload, type ExternalAnalysisResult, type ExternalAnalyzer, type ExternalAnalyzerOptions, type ExternalDiscoveryCandidate, FACT_LIST_CAP, FACT_TEXT_CAP, FactoryAdapter, type FailureFollowUp, type FailureFollowUpReport, type FileRunContextReaderOptions, type FinalMessageFact, type FindSessionTextLeaksOptions, type FindingRejectionCounts, type FindingRejectionReasons, type FindingRejectionTally, type FindingsFileOutcome, type FollowUpKind, GeminiAdapter, type HaloAnalyzerOptions, type HaloReasoningEffort, HarnessSessionsAdapter, type HarnessTraceAdapter, type HodoscopeAnalyzerOptions, type HodoscopeInput, type HodoscopeMessage, type HodoscopeSourceMapEntry, type HodoscopeTrajectory, INGEST_SOURCE_CLI, INHERITED_SOURCE_ATTR, INHERITED_SPANS_OMITTED_ATTR, INHERITED_SPAN_ATTR, INHERITED_SPAN_COUNT_ATTR, type InheritedSpanSource, type InspectSessionIndexOptions, type InstalledSkill, JsonSourceError, type JsonlCorruptionReceipt, JsonlParseError, type JsonlReadOptions, type LiveBatchOptions, type LocateOptions, type LoopConvergence, type LoopConvergenceReport, type LoopIteration, type LoopTrend, type LoopTrendBasis, MAX_SHELL_DEPTH, MAX_TRACE_QUESTION_CHARS, type ObservedLoop, type ObserverOptions, OpencodeAdapter, type OtlpIngestIssue, type OtlpIngestIssueKind, type OtlpInput, type OtlpInputFile, type OtlpRowConversion, type OtlpSpan, type OtlpSpanKind, type OtlpSpanLink, type OtlpStatusCode, POLICY_EVIDENCE_NOTE, PREPARED_CONTEXT_BYTE_CEILING, type ParentTaskResolution, type ParseOptions, PartialUploadError, PiAdapter, type PiAdapterOptions, type PipelineOptions, type PipelineReport, type PlanOptions, type PolicyEvidenceLoopSummary, type PolicyEvidenceRecord, type PolicyEvidenceToolSummary, type PrimeAnalyzerOptions, type PrimeTransport, type PrimeTransportRequest, type PrimeTransportResponse, type ProjectSessionBundleOptions, type ProjectSessionBundleResult, type PullRequestFact, type PullRequestFacts, type PullRequestReading, QwenAdapter, REACTIONS, RESULT_FILE, RETAINED_SESSION_READER_VERSION, RULE, type Reaction, type ReactionReport, type ReactionSessionReport, type RedactSpansOptions, type Redactor, type RefusedSession, type RepoAttrs, type RepoResolution, type RepoResolutionSource, type ResolvedOtlpInput, type RetainedSessionFile, type RetainedSessionSelection, type RunContextJournal, type RunContextNode, type RunContextResult, type RunContextSnapshot, type RunDiffOptions, type RunDiffReport, type RunDiffSide, type RunResult, type RunWatchSnapshot, type RunWatchTarget, type RuntimeTrace, SESSION_CWD_ATTR, SESSION_FACTS_MEASUREMENT_VERSION, SESSION_FACTS_VERSION_SUFFIX, SESSION_TOKEN_TOTAL_ATTR, SOURCE_ATTRIBUTE_PREFIX, SPAN_SYNTHESIZED_ATTR, SPAWN_JOURNAL_FILE, STATUS_MARK, SYNTHESIZED_SOURCE_ATTR, SYNTHESIZED_SPAN_ATTR, type SandboxReplayBackendOptions, type ScanOptions, type ScannedSession, type SessionBatch, type SessionBundleAbsence, type SessionBundleCarriedSignatures, type SessionBundleExclusion, type SessionBundleExclusionRule, type SessionBundleFile, type SessionBundleIssue, type SessionBundleIssueKind, type SessionBundleLeakCheck, type SessionBundleLedgerSlice, type SessionBundleManifest, type SessionBundleProjection, type SessionBundleResult, type SessionBundleSliceRule, type SessionBundleVerification, type SessionBundleView, type SessionCorruptionReceipt, type SessionEnvironment, type SessionFact, type SessionFacts, type SessionFactsOptions, type SessionFactsReport, type SessionFactsReportBuilder, type SessionFactsReportOptions, type SessionFactsSelection, type SessionFactsWindow, type SessionIdentityConflict, type SessionIdentityIndex, type SessionIntegrity, type SessionMeasurements, type SessionRef, type SessionRelationship, type SessionRole, type SessionSeedGroup, type SessionSelection, type SessionSelectionRow, type SessionSourceFile, type SessionTextLeak, type SessionTextLeakReport, type SessionTurnFact, type SessionWorkflow, SessionWorkflowError, type SessionWorkflowErrorCode, type SessionWorkflowIssue, type SessionWorkflowSession, type SessionWorkflowSummary, type SkillCatalogRoots, type SkillUsageEvent, type SkillUsageHarness, type SkillUsageKind, type SkillUsageRefresh, type SkillUsageReport, type SkillUsageReportOptions, type SkillUsageRow, type SkillUsageSources, SkillUsageStore, type SkippedAnalysis, type SkippedInputFile, type SourceRecordReference, type SpanInput, type SpanNodeStatus, type SpanRedaction, type SpanRunNode, type SpanRunSnapshot, type SpanStructure, type SpawnedChildResolution, type SpendRoll, type SteeringChainReport, type SteeringEdge, type SubagentSpawnFact, TRACE_QUESTION_PREVIEW_HEAD_CHARS, type ToolMeasurement, type TraceAgenticRoute, type TraceAgenticRouteReason, type TraceAgenticRouteReasonCode, type TraceContextIndex, type TraceContextRoot, type TraceEvidenceExportOptions, type TraceEvidenceExportResult, type TraceEvidenceFormatOption, type TraceEvidenceInputFormat, type TraceEvidenceRow, type TraceExecutionOptions, type TraceFindingPacket, type TraceImprovementArtifacts, type TraceImprovementOptions, type TraceImprovementResult, type TraceIndexedFile, type TraceInspectionArea, type TraceInspectionFinding, type TraceInspectionReport, type TraceInspectionSeverity, type TraceInvestigationOptions, type TraceInvestigationResult, type TraceLiveAction, type TraceLiveActionKind, type TraceLiveAnalysisContext, type TraceLiveAnalyst, type TraceLiveBatch, type TraceLiveEvidence, type TraceLiveFinding, type TraceLiveLoop, type TraceLiveSeverity, type TraceQuestion, type TraceQuestionAnswer, type TraceQuestionCitation, type TraceQuestionFailureKind, type TraceQuestionTrace, type TraceQuestionsArtifacts, type TraceQuestionsOptions, type TraceQuestionsResult, type TraceQuestionsTotals, type TraceSessionIndex, type TraceSessionIndexRow, type TraceStoreInvestigationOptions, type TraceStoreInvestigationResult, type TraceStreamEvent, type TraceStreamOptions, type TraceStreamReplayOptions, type TraceStreamSession, type TracesConfig, type TriggerPair, type TurnActorCount, type UnavailableCapabilities, type UnreadSessionFact, type UploadBackend, type UploadIdentity, type UploadItem, type UploadPlan, type UploadRecord, type UploadResult, type UploadState, type UserPromptInput, type VerifySafeOptions, type VerifySafeResult, type WatchRunTargetOptions, ZERO_ROLL, type ZaiChatCallerOptions, addSpend, alreadyUploaded, analysisEngineFromEnv, analyzeAdoption, analyzeLiveBatch, analyzeLoopConvergence, analyzeReactions, analyzeSpans, analyzeSteeringChain, answerSchemaErrors, applyRedactor, assembleSessionBundle, assertAnswerSchema, assertSandboxReachable, assessSpans, buildPolicyEvidenceRecord, buildSessionFactsReport, buildSessionIndex, buildSessionIndexFromRows, buildSkillUsageReport, buildSpanRunTree, buildTraceFindingPacket, capText, chatTrajectoryToSpans, classifyEvidenceOnlyPath, classifyFailureFollowUps, classifyLiveActions, classifyReaction, claudeActor, codexActor, collectPolicyEvidence, collectSessionIndex, collectSessionSelection, collectSessionWorkflow, collectSessions, commandAnalyzer, commandRedactor, commandTextFromInput, computeAdoption, computeSessionFacts, conformanceOfSpans, connectors, countSkillRunsJsonl, createBundleSourceReader, createFindingRejectionTally, createSessionFactsReportBuilder, cwdMatchesSelection, cwdMatchesSelectionResolved, defaultSkillCatalogRoots, defaultSkillUsageSources, defaultSkillUsageStorePath, defaultTraceLiveAnalysts, describeSessionRelationship, diffRuns, engineCallReservationFloorUsd, environmentAttributes, environmentFromSpanAttributes, equivalentGitCwds, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, externalFailureMessage, fileRunContextSupervisorRunReader, fileSha256, findContextRoot, findSessionTextLeaks, findSpanSourceFiles, findingRejection, findingRejectionDetail, forEachTreeNode, formatFindingRejections, formatVerdict, haloAnalyzer, hashSessionBundleFiles, hodoscopeAnalyzer, httpJsonTransport, importCodeTraceBench, incompleteInputsNote, indexSessionIdsByTrace, inferRole, inferSpanKind, inspectSessionIndex, int, isBridgeMismatchError, isChatTrajectory, isChatTrajectoryMessage, isFileRunContextDir, isInheritedSpan, isSynthesizedSpan, iterSerializedSpans, knownHarnesses, listAdapters, listSessionBundleFiles, loadState, loadTraceQuestionsFile, loadTracesConfig, locateSessions, looksLikeAgentPrompt, mergeRolls, mergeTracesConfig, ms, normalizeAnalystCitations, normalizeRemote, normalizeTraceQuestions, otlpRowToSpan, outboundHash, parseIsoToEpochMs, parseJsonAnswer, parseRetainedSession, parseSession, parseSince, parseTimeBound, planTraceAgenticRoute, planUpload, primeAnalyzer, projectSessionBundle, readCoordinationLog, readFileRunContext, readInstalledSkills, readJsonFile, readJsonl, readOtlpInput, readPullRequests, readRunContextJournal, readRunContextSnapshot, readRunSide, readRunWatchSnapshot, readSessionBundleManifest, readSessionIndexFile, readSpanRunSnapshot, recordSessionCorruption, redactSpans, renderConformance, renderInspectionReport, renderRunContextSnapshot, renderRunDiff, renderRunWatchSnapshot, renderSessionFacts, renderSessionFactsContext, renderSkillUsage, renderSpanRunSnapshot, renderTraceQuestionInstructions, renderTraceQuestionPrompt, renderTraceQuestionsReport, renderValidation, resolveAdapter, resolveOtlpInputFiles, resolveRepoAttrs, resolveRunContextDir, resolveRunWatchTarget, resolveSessionRepoAttrs, runCommand, runExternalAnalyzers, runPipelines, runTotals, runTraceImprovement, runTraceInvestigation, runTraceQuestions, runTraceStoreInvestigation, sandboxReplayBackend, saveReport, saveState, scanSessions, selectAdapters, serializeInspectionReport, serializePolicyEvidence, serializeSessionIndex, serializeSpans, serializeTraceStreamEvent, sessionFactsContext, sessionHash, sessionIdFromAttributes, sessionIntegrityAttributes, sessionTextSignatures, shellCommands, skippedAnalyses, span, spanRunTotals, stampEnvironmentAttrs, stampRepoAttrs, stampSessionIdentity, stampSessionIntegrity, stampSpanWorkdirRepoAttrs, streamSessions, summarizeOtlpExecution, summarizeSpanExecution, summarizeSpanStructure, takeJsonl, textIsSynthetic, toOpenInferenceSpan, toRuntimeStore, toTraceSpanEvents, tokens, totalAgenticFailureMessage, totalFindingRejections, traceAgenticKinds, traceCitationsInText, traceStreamEventsFromSpans, unavailableCapabilities, uploadKey, usd, userPromptSpan, validateOtlpSpans, validationExitCode, verdictExitCode, verifyFindingsInSandbox, verifySafe, verifySessionBundle, watchRunTarget, watchSessions, withSessionFactsContext, wrap, writeHodoscopeInput, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionBundleManifest, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts, writeTraceQuestionsArtifacts, zaiChatCaller, zeroPricedCost };
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  ACTOR_ATTR,
3
+ ANSWERED_TEXT_CAP,
3
4
  ATTR,
4
5
  AmpAdapter,
5
6
  BLOBS_DIR,
@@ -43,6 +44,7 @@ import {
43
44
  REACTIONS,
44
45
  RESULT_FILE,
45
46
  RULE,
47
+ SESSION_CWD_ATTR,
46
48
  SESSION_FACTS_MEASUREMENT_VERSION,
47
49
  SESSION_FACTS_VERSION_SUFFIX,
48
50
  SESSION_TOKEN_TOTAL_ATTR,
@@ -100,6 +102,7 @@ import {
100
102
  countSkillRunsJsonl,
101
103
  createBundleSourceReader,
102
104
  createFindingRejectionTally,
105
+ createSessionFactsReportBuilder,
103
106
  cwdMatchesSelection,
104
107
  cwdMatchesSelectionResolved,
105
108
  defaultSkillCatalogRoots,
@@ -167,6 +170,7 @@ import {
167
170
  parseJsonAnswer,
168
171
  parseSession,
169
172
  parseSince,
173
+ parseTimeBound,
170
174
  planTraceAgenticRoute,
171
175
  planUpload,
172
176
  primeAnalyzer,
@@ -283,7 +287,7 @@ import {
283
287
  writeTraceQuestionsArtifacts,
284
288
  zaiChatCaller,
285
289
  zeroPricedCost
286
- } from "./chunk-DON6NQ7H.js";
290
+ } from "./chunk-7DVZCCZI.js";
287
291
 
288
292
  // src/adapters/factory.ts
289
293
  import { readdir, stat } from "fs/promises";
@@ -936,6 +940,7 @@ async function parseRetainedSession(input) {
936
940
  }
937
941
  export {
938
942
  ACTOR_ATTR,
943
+ ANSWERED_TEXT_CAP,
939
944
  ATTR,
940
945
  AmpAdapter,
941
946
  AnalystRegistry,
@@ -983,6 +988,7 @@ export {
983
988
  RESULT_FILE,
984
989
  RETAINED_SESSION_READER_VERSION,
985
990
  RULE,
991
+ SESSION_CWD_ATTR,
986
992
  SESSION_FACTS_MEASUREMENT_VERSION,
987
993
  SESSION_FACTS_VERSION_SUFFIX,
988
994
  SESSION_TOKEN_TOTAL_ATTR,
@@ -1044,6 +1050,7 @@ export {
1044
1050
  createBundleSourceReader,
1045
1051
  createFindingRejectionTally,
1046
1052
  createHostedClient,
1053
+ createSessionFactsReportBuilder,
1047
1054
  cwdMatchesSelection,
1048
1055
  cwdMatchesSelectionResolved,
1049
1056
  defaultSkillCatalogRoots,
@@ -1112,6 +1119,7 @@ export {
1112
1119
  parseRetainedSession,
1113
1120
  parseSession,
1114
1121
  parseSince,
1122
+ parseTimeBound,
1115
1123
  planTraceAgenticRoute,
1116
1124
  planUpload,
1117
1125
  primeAnalyzer,
@@ -198,7 +198,8 @@ The sheet is that extraction, made part of the tool.
198
198
  | `subagentToolSpans` | TOOL spans excluded because a subagent, not this agent, made the call |
199
199
  | `subagents` | every subagent-spawning call, with the task name the call recorded |
200
200
  | `pullRequests` | pull requests the commands created and merged, each named by number or head branch, with the command span and the join evidence |
201
- | `humanTurns` | `user.prompt` turns a person typed into this session, in order, with timestamps |
201
+ | `cwd` | the working directory the harness recorded for the session, or `null` with the reason |
202
+ | `humanTurns` | `user.prompt` turns a person typed into this session, in order, with timestamps, each with the agent message it `answered` |
202
203
  | `excludedTurns` | every `user.prompt` turn `humanTurns` left out, grouped by the reason, with the span ids |
203
204
  | `turnsByActor` | every `user.prompt` turn by actor, so the human filter is checkable |
204
205
  | `finalMessages` | the last message of the session's own agent, and of each subagent task, separately |
@@ -242,7 +243,7 @@ It reaches the built-in kinds run by `analyze --llm`, `investigate`, and `improv
242
243
 
243
244
  - The sheet is bounded at `PREPARED_CONTEXT_BYTE_CEILING` (30,000 bytes), a fifth of the `perCallByteCeiling` of 150,000 the trace tools work to, so the rest of the budget stays available for the tool calls the model still makes.
244
245
  - When the sheet does not fit, fields are shed from the largest downward and the shed is listed in `omitted_fields`. The tool-call counts are the last facts to go.
245
- - Receiving the sheet changes an analyst's behavior, so its version carries `+session-facts.2`. `createTraceAnalyst` records `prepare_context` in the exact-run identity, and a changed prepared context must not hide behind an unchanged version.
246
+ - Receiving the sheet changes an analyst's behavior, so its version carries `SESSION_FACTS_VERSION_SUFFIX` (`+session-facts.` and the sheet's `measurementVersion`). `createTraceAnalyst` records `prepare_context` in the exact-run identity, and a changed prepared context must not hide behind an unchanged version.
246
247
  - The sheet is not evidence. Citations still resolve against the raw spans, which is why every fact names its span ids rather than asking the model to trust the sheet.
247
248
 
248
249
  Pass `sessionFactsContext: false` to `analyzeSpans` to run an analyst without it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/traces",
3
- "version": "0.22.0",
3
+ "version": "0.23.1",
4
4
  "description": "Point it at your coding-agent session traces (Claude Code, Codex, OpenCode, Gemini, Pi, \u2026) and get failure-mode + efficiency findings. CLI + SDK over the @tangle-network/agent-eval analyst suite \u2014 observe live sessions, run your own analysts, redact, and upload to the Tangle Intelligence Platform.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,7 +65,7 @@
65
65
  "@tangle-network/agent-interface": "5.2.0",
66
66
  "@tangle-network/agent-runtime": "0.318.0",
67
67
  "@tangle-network/agent-trace-contract": "2.0.0",
68
- "@tangle-network/harness-sessions": "0.1.0",
68
+ "@tangle-network/harness-sessions": "0.1.3",
69
69
  "@tangle-network/sandbox": "0.60.49"
70
70
  },
71
71
  "devDependencies": {