@tangle-network/traces 0.11.5 → 0.11.6

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/index.d.ts CHANGED
@@ -420,6 +420,25 @@ interface SessionIntegrity {
420
420
  status: 'degraded_not_lossless';
421
421
  corruptions: SessionCorruptionReceipt[];
422
422
  }
423
+ /**
424
+ * Execution-environment identity for a session — what replay verification
425
+ * needs to reconstruct where the session's commands actually ran. Populated
426
+ * by adapters/importers where known: sandbox sessions know their image
427
+ * (`runtime.ready` carries it); host-harness sessions usually do not.
428
+ * Absent fields mean "not recorded", never "none".
429
+ */
430
+ interface SessionEnvironment {
431
+ /** Container image reference (repo:tag or repo@digest) the session executed in. */
432
+ image?: string;
433
+ /** Immutable image digest (`sha256:…`) — the replay-grade pin when known. */
434
+ imageDigest?: string;
435
+ /** Sandbox/container instance id that executed the session. */
436
+ sandboxId?: string;
437
+ /** Working directory commands executed from; null when unrecorded. */
438
+ cwd: string | null;
439
+ /** Commit hash the workspace was at when the session ran, when recorded. */
440
+ gitCommit?: string;
441
+ }
423
442
  /** A single discovered session, before parsing. */
424
443
  interface SessionRef {
425
444
  /** Harness id (matches the nix profile / backend name). */
@@ -434,6 +453,8 @@ interface SessionRef {
434
453
  mtimeMs: number;
435
454
  /** Present when parsing recovered valid records around corrupt source records. */
436
455
  integrity?: SessionIntegrity;
456
+ /** Execution-environment identity, when the source records it (sandbox sessions). */
457
+ environment?: SessionEnvironment;
437
458
  }
438
459
  interface LocateOptions {
439
460
  /** Limit discovery to sessions whose cwd matches (exact or prefix). */
@@ -819,9 +840,44 @@ declare const ATTR: {
819
840
  readonly CORRUPTION_BYTE_LENGTH: "traces.session.corruption.byte_length";
820
841
  readonly CORRUPTION_SHA256: "traces.session.corruption.sha256";
821
842
  readonly RAW_SOURCE_RETENTION: "traces.session.raw_source_retention";
843
+ /** Container image reference the session executed in (OTel semconv key). */
844
+ readonly CONTAINER_IMAGE: "container.image.name";
845
+ /** Immutable image digest (`sha256:…`) — the replay-grade environment pin. */
846
+ readonly CONTAINER_IMAGE_DIGEST: "container.image.digest";
847
+ /** Sandbox/container instance id that executed the session. */
848
+ readonly SANDBOX_ID: "tangle.sandbox.id";
849
+ /** Recorded execution cwd, verbatim. Unlike `tangle.cwd` it is never
850
+ * repaired against the host filesystem — replay verification needs the
851
+ * in-container path even when no such path exists on this host. */
852
+ readonly ENVIRONMENT_CWD: "tangle.environment.cwd";
822
853
  };
823
854
  /** `tangle.ingest_source` value for CLI-uploaded traces. Wire contract. */
824
855
  declare const INGEST_SOURCE_CLI = "cli";
856
+ /**
857
+ * Project a `SessionEnvironment` onto span-attribute keys. Only recorded
858
+ * fields are emitted — an absent image stays absent, so "environment not
859
+ * captured" and "environment captured without an image" remain different
860
+ * artifacts downstream.
861
+ */
862
+ declare function environmentAttributes(environment: SessionEnvironment | undefined): Record<string, string>;
863
+ /**
864
+ * Stamp environment identity onto every span so it survives into the OTLP
865
+ * resource block (see `toOpenInferenceSpan`). Additive — a value an adapter
866
+ * already set deliberately is never clobbered.
867
+ */
868
+ declare function stampEnvironmentAttrs(spans: readonly {
869
+ attributes: Record<string, unknown>;
870
+ }[], environment: SessionEnvironment | undefined): void;
871
+ /**
872
+ * Recover a `SessionEnvironment` from stamped span attributes — the read
873
+ * counterpart of `stampEnvironmentAttrs`, for consumers that hold only the
874
+ * OTLP artifact (replay-environment resolution reads the exported spans, not
875
+ * the source session). Returns null when no environment identity was
876
+ * recorded — "not captured" stays distinguishable from any captured value.
877
+ */
878
+ declare function environmentFromSpanAttributes(spans: readonly {
879
+ attributes: Readonly<Record<string, unknown>>;
880
+ }[]): SessionEnvironment | null;
825
881
  /** Harness used when none is specified on a single-harness command. */
826
882
  declare const DEFAULT_HARNESS = "claude-code";
827
883
  declare function sessionIdFromAttributes(attributes: Readonly<Record<string, unknown>>): string | undefined;
@@ -1722,6 +1778,13 @@ interface TraceExecutionOptions {
1722
1778
  declare function summarizeOtlpExecution(otlpJsonl: string, opts?: TraceExecutionOptions): ExecutionReport;
1723
1779
  declare function summarizeSpanExecution(spans: readonly OtlpSpan[], opts?: TraceExecutionOptions): ExecutionReport;
1724
1780
 
1781
+ /**
1782
+ * The one sentence of prose every policy-evidence record carries. It is the
1783
+ * same for every session, so a content check that compares an evidence file
1784
+ * against a transcript must subtract it: a session that reads or writes this
1785
+ * package's source would otherwise look like it leaked its own text.
1786
+ */
1787
+ declare const POLICY_EVIDENCE_NOTE = "This is normalized coding-agent session evidence for downstream policy mining; it is not an eval campaign cell.";
1725
1788
  interface PolicyEvidenceToolSummary {
1726
1789
  readonly name: string;
1727
1790
  readonly calls: number;
@@ -1890,6 +1953,14 @@ interface CollectSessionIndexOptions extends ScanOptions, BuildSessionIndexOptio
1890
1953
  declare function buildSessionIndex(records: readonly PolicyEvidenceRecord[], opts?: BuildSessionIndexOptions & {
1891
1954
  context?: TraceContextIndex;
1892
1955
  }): TraceSessionIndex;
1956
+ /**
1957
+ * Walk up from a session cwd to the root the session's local context lives
1958
+ * under: the first ancestor carrying `.git`, `.evolve`, `AGENTS.md`, or
1959
+ * `CLAUDE.md`. The context index and the session bundler both anchor their
1960
+ * `.evolve` reads here so "which ledger belongs to this session" has exactly
1961
+ * one answer.
1962
+ */
1963
+ declare function findContextRoot(cwd: string | null | undefined): Promise<string | null>;
1893
1964
  declare function buildSessionIndexFromRows(rows: readonly {
1894
1965
  ref: SessionRef;
1895
1966
  spans: readonly OtlpSpan[];
@@ -1898,6 +1969,306 @@ declare function collectSessionIndex(opts?: CollectSessionIndexOptions): Promise
1898
1969
  declare function serializeSessionIndex(index: TraceSessionIndex): string;
1899
1970
  declare function writeSessionIndexFile(index: TraceSessionIndex, outPath?: string): Promise<string>;
1900
1971
 
1972
+ /**
1973
+ * `traces bundle` — assemble one session's durable evidence directory.
1974
+ *
1975
+ * A bundle is the input contract for downstream consumers (distillers,
1976
+ * report writers, auditors) that must cite a session long after the live
1977
+ * stores have rotated: the raw transcript + subagent transcripts, every
1978
+ * derived artifact this CLI already knows how to produce (session index,
1979
+ * deterministic analyze report, policy evidence, OTLP spans), the repo's
1980
+ * `.evolve` ledger sliced to the session window, the git log for that
1981
+ * window, and a manifest with a SHA-256 per file so any later claim can be
1982
+ * checked against the exact bytes it cites.
1983
+ *
1984
+ * The transcript is REQUIRED — no transcript, no bundle, loudly. Everything
1985
+ * else is an optional input whose absence is a recorded fact in the
1986
+ * manifest (`absent`, with the reason), never a silent gap and never an
1987
+ * error: a session without subagents or without an `.evolve` ledger is a
1988
+ * complete bundle of a smaller session.
1989
+ *
1990
+ * This module assembles the FULL view. `bundle-view.ts` projects that full
1991
+ * bundle down to the evidence-only view for a consumer that must not read the
1992
+ * session's own words; `manifest.view` names which of the two a directory is.
1993
+ */
1994
+
1995
+ interface SessionBundleFile {
1996
+ /** Bundle-relative path, `/`-separated. */
1997
+ readonly path: string;
1998
+ readonly bytes: number;
1999
+ readonly sha256: string;
2000
+ }
2001
+ interface SessionBundleAbsence {
2002
+ /** Bundle-relative path the artifact would have occupied. */
2003
+ readonly path: string;
2004
+ readonly reason: string;
2005
+ }
2006
+ type SessionBundleSliceRule =
2007
+ /** JSONL rows kept verbatim when their `ts` falls inside the padded session window. */
2008
+ 'session-window-rows' | 'copied-whole'
2009
+ /** The lexically last `handoff-*.md` — names are date-prefixed, so name order is time order. */
2010
+ | 'latest-by-name'
2011
+ /** Files whose name carries a `YYYY-MM-DD` date inside the session window's dates. */
2012
+ | 'session-window-dated-files';
2013
+ interface SessionBundleLedgerSlice {
2014
+ readonly path: string;
2015
+ /** Absolute source path the slice was read from. */
2016
+ readonly source: string;
2017
+ readonly rule: SessionBundleSliceRule;
2018
+ readonly totalRows?: number;
2019
+ readonly keptRows?: number;
2020
+ /** Rows excluded because no `ts` could be parsed — counted, never silently dropped. */
2021
+ readonly unparseableTsRows?: number;
2022
+ }
2023
+ /**
2024
+ * Which projection of a session a bundle directory holds.
2025
+ *
2026
+ * `full` is the auditor's copy: every source byte, so a claim can be checked
2027
+ * against the exact text it cites. `evidence-only` is the writer's copy: the
2028
+ * counted artifacts, with the session's own words removed, so a writer that
2029
+ * must reach its own conclusion cannot read an earlier one instead.
2030
+ */
2031
+ type SessionBundleView = 'full' | 'evidence-only';
2032
+ type SessionBundleExclusionRule =
2033
+ /** The session's raw text: transcript and subagent transcripts. */
2034
+ 'session-source'
2035
+ /** A derived artifact that replays session text (prompt lines, excerpts, span content). */
2036
+ | 'session-text-derived'
2037
+ /** A file whose body is prose someone authored: ledger notes, handoffs, commit subjects. */
2038
+ | 'authored-prose'
2039
+ /** An allow-listed file dropped because its own text repeats an excluded source. */
2040
+ | 'content-signature'
2041
+ /** Default deny: the evidence-only view carries an allow-list, and this path is not on it. */
2042
+ | 'not-allow-listed';
2043
+ interface SessionBundleExclusion {
2044
+ /** Bundle-relative path in the FULL bundle this view was projected from. */
2045
+ readonly path: string;
2046
+ readonly bytes: number;
2047
+ /** SHA-256 of the excluded bytes, so an auditor can prove which file was dropped. */
2048
+ readonly sha256: string;
2049
+ readonly rule: SessionBundleExclusionRule;
2050
+ readonly reason: string;
2051
+ /**
2052
+ * Present when `rule` is `content-signature`: how much text the file shared
2053
+ * with which excluded sources. Counts and paths only — quoting the matched
2054
+ * text here would carry into the view the very text the exclusion removes.
2055
+ */
2056
+ readonly contentMatch?: {
2057
+ readonly signatures: number;
2058
+ readonly sources: readonly string[];
2059
+ };
2060
+ }
2061
+ interface SessionBundleCarriedSignatures {
2062
+ readonly path: string;
2063
+ /** What the artifact is made of, which is the reason it is safe to carry. */
2064
+ readonly carries: string;
2065
+ /** Distinct content signatures the carried file holds at all. 0 = no prose run of that length. */
2066
+ readonly signatures: number;
2067
+ }
2068
+ /**
2069
+ * The projection's own proof that no excluded file's text survived into the
2070
+ * view. `matches` is typed `0` because a match aborts the projection: a view
2071
+ * directory carrying a leak is never written, so the artifact cannot record one.
2072
+ */
2073
+ interface SessionBundleLeakCheck {
2074
+ /** Consecutive words per content signature. */
2075
+ readonly signatureWords: number;
2076
+ /** Excluded files whose text supplied the signatures compared against. */
2077
+ readonly comparedSources: readonly string[];
2078
+ readonly sourceSignatures: number;
2079
+ readonly carried: readonly SessionBundleCarriedSignatures[];
2080
+ readonly matches: 0;
2081
+ }
2082
+ interface SessionBundleProjection {
2083
+ /** Absolute directory of the full bundle this view was projected from. */
2084
+ readonly sourceDirectory: string;
2085
+ /** SHA-256 of that bundle's `manifest.json` bytes. */
2086
+ readonly sourceManifestSha256: string;
2087
+ readonly leakCheck: SessionBundleLeakCheck;
2088
+ }
2089
+ interface SessionBundleManifest {
2090
+ readonly schemaVersion: 2;
2091
+ readonly kind: 'traces.session_bundle';
2092
+ /** Which projection this directory is. A reader must branch on this, never on the file list. */
2093
+ readonly view: SessionBundleView;
2094
+ readonly createdAt: string;
2095
+ readonly provenance: {
2096
+ readonly sessionId: string;
2097
+ readonly harness: string;
2098
+ readonly cwd: string | null;
2099
+ /** Absolute path of the source transcript at assembly time. */
2100
+ readonly transcriptPath: string;
2101
+ readonly transcriptSha256: string;
2102
+ /** Root the `.evolve` ledger and git log were read under, when found. */
2103
+ readonly contextRoot: string | null;
2104
+ readonly tracesVersion: string;
2105
+ readonly sessionWindow: {
2106
+ readonly firstSpanAt: string | null;
2107
+ readonly lastSpanAt: string | null;
2108
+ /** Pad applied to each side of the window when slicing ledger rows. */
2109
+ readonly padMs: number;
2110
+ };
2111
+ };
2112
+ readonly files: readonly SessionBundleFile[];
2113
+ readonly absent: readonly SessionBundleAbsence[];
2114
+ /** Files the view deliberately dropped. Empty in the `full` view: it drops nothing. */
2115
+ readonly excluded: readonly SessionBundleExclusion[];
2116
+ readonly ledgerSlices: readonly SessionBundleLedgerSlice[];
2117
+ readonly knownLimits: readonly string[];
2118
+ /** Present only in a projected view: where it came from, and the leak check that passed. */
2119
+ readonly projection?: SessionBundleProjection;
2120
+ }
2121
+ interface SessionBundleResult {
2122
+ readonly directory: string;
2123
+ readonly manifestPath: string;
2124
+ readonly manifest: SessionBundleManifest;
2125
+ }
2126
+ interface AssembleSessionBundleOptions {
2127
+ readonly adapter: HarnessTraceAdapter;
2128
+ readonly ref: SessionRef;
2129
+ /** Bundle directory to create. Must be new or empty: one bundle, one session. */
2130
+ readonly outDir: string;
2131
+ readonly generatedAt?: string;
2132
+ readonly minLoopOccurrences?: number;
2133
+ readonly signal?: AbortSignal;
2134
+ readonly log?: (msg: string, fields?: Record<string, unknown>) => void;
2135
+ }
2136
+ /**
2137
+ * Every file under a bundle directory, as sorted bundle-relative
2138
+ * `/`-separated paths. Both the manifest writer and the view projector walk a
2139
+ * bundle through here, so neither can see a file the other does not.
2140
+ */
2141
+ declare function listSessionBundleFiles(root: string): Promise<string[]>;
2142
+ /**
2143
+ * Assemble one session's bundle directory. Throws when the transcript is
2144
+ * missing or unparseable — a bundle without its primary source is not a
2145
+ * degraded bundle, it is not a bundle. Optional inputs (subagents directory,
2146
+ * `.evolve` ledger, git history) that are absent are recorded in
2147
+ * `manifest.absent` with the probed path and reason.
2148
+ */
2149
+ declare function assembleSessionBundle(opts: AssembleSessionBundleOptions): Promise<SessionBundleResult>;
2150
+ /** SHA-256 + byte count for every file under a bundle directory, manifest included when present. */
2151
+ declare function hashSessionBundleFiles(root: string): Promise<SessionBundleFile[]>;
2152
+ declare function writeSessionBundleManifest(outDir: string, manifest: SessionBundleManifest): Promise<string>;
2153
+ /**
2154
+ * Read a bundle's manifest and prove it is one. A directory that merely looks
2155
+ * like a bundle must not be projected: the view guarantee is only as good as
2156
+ * the classification, and the classification only holds over paths this
2157
+ * package wrote.
2158
+ */
2159
+ declare function readSessionBundleManifest(bundleDir: string): Promise<SessionBundleManifest>;
2160
+
2161
+ /**
2162
+ * `traces bundle-view` — project a full session bundle down to one view.
2163
+ *
2164
+ * A bundle has two consumers with opposite needs. An AUDITOR cites the
2165
+ * session and needs every source byte. A WRITER must reach its own conclusion
2166
+ * about the session and therefore must not be able to read the conclusion the
2167
+ * session already reached — which the transcript holds verbatim, including the
2168
+ * shell call that authored an earlier report.
2169
+ *
2170
+ * Serving both from one directory cannot work, and policing it by grep cannot
2171
+ * work either: a check that looks for the earlier report FILE passes while its
2172
+ * CONTENT sits in the transcript. So the two consumers get two directories.
2173
+ * The evidence-only view is a projection of the full bundle: an explicit
2174
+ * allow-list of counted artifacts, every other path excluded by name with its
2175
+ * reason and its hash, and a content check that proves no excluded file's text
2176
+ * survived into the view.
2177
+ *
2178
+ * The allow-list is the structure. The content check is the proof that the
2179
+ * structure is right: before anything is written, every candidate is compared
2180
+ * against every excluded file, and a candidate that repeats one is dropped
2181
+ * from the view and named in the manifest. So the written view never carries
2182
+ * text from a file the view says it removed.
2183
+ */
2184
+
2185
+ /**
2186
+ * Distinct signatures in one text: every run of `SIGNATURE_WORDS` consecutive
2187
+ * words, lowercased, taken WITHIN one line's prose. Signatures never span a
2188
+ * newline, so memory stays bounded by the longest line rather than the file,
2189
+ * and a structure whose every line is a key and a number produces no
2190
+ * signatures at all — which is the true statement about it: it holds no prose.
2191
+ */
2192
+ declare function sessionTextSignatures(text: string): Set<string>;
2193
+ interface SessionTextLeak {
2194
+ /** Bundle-relative path of the carried file that repeats excluded text. */
2195
+ readonly viewPath: string;
2196
+ /** Bundle-relative paths of the excluded files the repeated text came from. */
2197
+ readonly sources: readonly string[];
2198
+ /** Distinct signatures this file shares with those sources. */
2199
+ readonly signatures: number;
2200
+ /**
2201
+ * One matched signature, for a diagnostic message only. It is a fragment of
2202
+ * the excluded text, so it must never be written into a view artifact.
2203
+ */
2204
+ readonly example: string;
2205
+ }
2206
+ interface FindSessionTextLeaksOptions {
2207
+ /** Directory holding the carried files. */
2208
+ readonly viewDir: string;
2209
+ /** Directory holding the excluded files. */
2210
+ readonly sourceDir: string;
2211
+ /** Bundle-relative paths under `viewDir` to check. */
2212
+ readonly carriedPaths: readonly string[];
2213
+ /** Bundle-relative paths under `sourceDir` whose text must not appear in the view. */
2214
+ readonly excludedPaths: readonly string[];
2215
+ }
2216
+ interface SessionTextLeakReport {
2217
+ /** One entry per carried file that repeats excluded text. Empty is the pass. */
2218
+ readonly leaks: readonly SessionTextLeak[];
2219
+ readonly carried: readonly {
2220
+ readonly path: string;
2221
+ readonly signatures: number;
2222
+ }[];
2223
+ readonly comparedSources: readonly string[];
2224
+ readonly sourceSignatures: number;
2225
+ }
2226
+ /**
2227
+ * Compare a set of carried files against the files a view excluded.
2228
+ *
2229
+ * The signature index is built from the CARRIED files, which are small, and
2230
+ * the excluded files are then read one at a time and tested against it — the
2231
+ * cheap direction, since a transcript can be orders of magnitude larger than
2232
+ * everything a view keeps. Every excluded file is scanned to the end, so the
2233
+ * per-file counts are totals rather than "however many we saw before stopping".
2234
+ */
2235
+ declare function findSessionTextLeaks(opts: FindSessionTextLeaksOptions): Promise<SessionTextLeakReport>;
2236
+ type EvidenceOnlyVerdict = {
2237
+ readonly carried: true;
2238
+ readonly owned: boolean;
2239
+ readonly carries: string;
2240
+ } | {
2241
+ readonly carried: false;
2242
+ readonly rule: SessionBundleExclusionRule;
2243
+ readonly reason: string;
2244
+ };
2245
+ /** Classify one bundle-relative path against the evidence-only view. */
2246
+ declare function classifyEvidenceOnlyPath(path: string): EvidenceOnlyVerdict;
2247
+ interface ProjectSessionBundleOptions {
2248
+ /** Directory holding the FULL bundle to project. */
2249
+ readonly bundleDir: string;
2250
+ /** View directory to create. Must be new or empty: one directory, one view. */
2251
+ readonly outDir: string;
2252
+ readonly view: SessionBundleView;
2253
+ readonly generatedAt?: string;
2254
+ }
2255
+ interface ProjectSessionBundleResult {
2256
+ readonly directory: string;
2257
+ readonly manifestPath: string;
2258
+ readonly manifest: SessionBundleManifest;
2259
+ readonly leakCheck: SessionBundleLeakCheck;
2260
+ }
2261
+ /**
2262
+ * Project a full bundle into a narrower view.
2263
+ *
2264
+ * Every file is verified against the source manifest's hash first: a bundle
2265
+ * whose bytes have drifted from its own manifest cannot be projected, because
2266
+ * the classification is only meaningful over the files this package wrote.
2267
+ * The content check then runs before anything is written, so a candidate that
2268
+ * repeats an excluded source is dropped instead of copied.
2269
+ */
2270
+ declare function projectSessionBundle(opts: ProjectSessionBundleOptions): Promise<ProjectSessionBundleResult>;
2271
+
1901
2272
  type TraceInspectionSeverity = 'high' | 'medium' | 'low';
1902
2273
  type TraceInspectionArea = 'index' | 'session' | 'repo' | 'context';
1903
2274
  interface TraceInspectionFinding {
@@ -2516,6 +2887,85 @@ declare function writeHodoscopeInput(otlpPath: string, options?: {
2516
2887
  /** Run Hodoscope as a behavior-discovery engine. Its output requires review. */
2517
2888
  declare function hodoscopeAnalyzer(options?: HodoscopeAnalyzerOptions): ExternalAnalyzer;
2518
2889
 
2890
+ /**
2891
+ * Prime analyst engine — a bundled {@link ExternalAnalyzer} that runs a
2892
+ * one-shot RLM over the OTLP-JSONL artifact through an OpenAI-compatible
2893
+ * bridge (cli-bridge's prime backend, or any `/v1/chat/completions` endpoint).
2894
+ *
2895
+ * Protocol, in one pass with no tools:
2896
+ * 1. The FULL span projection is inlined into the prompt as JSON — prime has
2897
+ * no REPL and no trace tools, so unlike the dspy-rlm analysts (which
2898
+ * drill via viewSpans/searchTrace) every fact must travel in the prompt.
2899
+ * 2. The reply contract is one fenced ```json block of SHORT strings
2900
+ * (long strings get corrupted in transport), citing span ids verbatim.
2901
+ * 3. A structurally malformed reply gets ONE bounded stateless repair turn
2902
+ * carrying the malformed reply plus the contract — never the trajectory —
2903
+ * mirroring the typed-adapter repair the dspy arm gets, so both arms face
2904
+ * the same structured-output affordance.
2905
+ * 4. Cited span ids are resolved against the artifact; rows citing unknown
2906
+ * or ambiguous ids are rejected with a recorded reason, never guessed.
2907
+ * Zero findings from a well-formed reply is an honest null, not an error.
2908
+ *
2909
+ * Oversized traces: when the rendered projection exceeds the inline budget it
2910
+ * is re-rendered with a per-attribute character cap (the prompt-side analog of
2911
+ * the trace store's per-attribute byte cap); if still oversized the run fails
2912
+ * loud — inline delivery is the only delivery, so silently dropping spans
2913
+ * would understate the trajectory. The delivery decision is recorded in the
2914
+ * result output.
2915
+ *
2916
+ * Usage (bridge-reported token counts and call count) is recorded in the
2917
+ * result output; cost stays uncaptured because the bridge reports no priced
2918
+ * cost and this adapter carries no pricing table.
2919
+ */
2920
+
2921
+ interface PrimeTransportRequest {
2922
+ url: string;
2923
+ body: {
2924
+ model: string;
2925
+ messages: Array<{
2926
+ role: 'user';
2927
+ content: string;
2928
+ }>;
2929
+ };
2930
+ /** Aborts on the analyzer's deadline AND the caller's signal. */
2931
+ signal: AbortSignal;
2932
+ }
2933
+ interface PrimeTransportResponse {
2934
+ status: number;
2935
+ text: string;
2936
+ }
2937
+ /** POSTs one JSON chat completion; injectable so tests run on a fake bridge. */
2938
+ type PrimeTransport = (req: PrimeTransportRequest) => Promise<PrimeTransportResponse>;
2939
+ interface PrimeAnalyzerOptions {
2940
+ /** Bridge ROOT url; the adapter calls `<root>/v1/chat/completions`.
2941
+ * Default: TRACES_PRIME_BRIDGE_URL, then http://localhost:4181. */
2942
+ bridgeUrl?: string;
2943
+ /** Model id the bridge routes on. Default: TRACES_PRIME_MODEL, then prime/zai/glm-5.2. */
2944
+ model?: string;
2945
+ /** Per-call deadline. Default: TRACES_PRIME_TIMEOUT_MS, then 1200000 (20 min —
2946
+ * prime runs legitimately exceed 5 minutes). */
2947
+ timeoutMs?: number;
2948
+ /** Question asked when the caller passes no prompt. */
2949
+ defaultPrompt?: string;
2950
+ /** Rendered-projection budget before the per-attribute cap kicks in. */
2951
+ maxInlineChars?: number;
2952
+ /** Character cap applied to each attribute on the oversized re-render. */
2953
+ perAttributeCharCap?: number;
2954
+ /** Disable the bounded repair turn (one extra call on a malformed reply). */
2955
+ repair?: boolean;
2956
+ transport?: PrimeTransport;
2957
+ }
2958
+ /** Default transport: plain node:http/https, NOT fetch — undici's fixed 300s
2959
+ * headers timeout kills prime calls that legitimately run longer; the
2960
+ * analyzer's AbortSignal is the only deadline. */
2961
+ declare const httpJsonTransport: PrimeTransport;
2962
+ /** One-shot prime-RLM analysis over the emitted OTLP artifact, as a peer of
2963
+ * `haloAnalyzer` / `hodoscopeAnalyzer` on the `--analyzer` registry. Requires
2964
+ * a running OpenAI-compatible bridge with the prime backend; deterministic
2965
+ * analysis and every other engine are unaffected when it is down (`ok:false`
2966
+ * result, never a thrown run). */
2967
+ declare function primeAnalyzer(opts?: PrimeAnalyzerOptions): ExternalAnalyzer;
2968
+
2519
2969
  /**
2520
2970
  * Live trace observer — compatibility wrapper behind `traces watch`.
2521
2971
  *
@@ -4139,4 +4589,4 @@ interface ExecuteOptions {
4139
4589
  /** Send the final, new outbound items (or write their dry-run OTLP). */
4140
4590
  declare function executeUpload(plan: UploadPlan, opts?: ExecuteOptions): Promise<UploadResult>;
4141
4591
 
4142
- export { ACTOR_ATTR, ATTR, type Actor, type AdoptionOptions, type AdoptionReport, AmpAdapter, type AnalystReplayFinding, type AnalyzeOptions, type AnalyzeResult, type ArmExecutionResult, BLOBS_DIR, type BuildPolicyEvidenceOptions, type BuildSessionIndexOptions, type BuildTraceFindingPacketOptions, CODING_REDACTION_RULES, CONTENT_CAP, COORDINATION_LOG_FILE, CORRECTIVE_REACTIONS, type CaseResources, type ChatCompletionCaller, type ChatOutcome, type ChatTrajectory, type ChatTrajectoryMessage, type ChatTrajectoryOptions, type ChatUsage, 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 ConformanceRenderOptions, type CoordinationLog, type CoordinationQuestion, type CoordinationSteer, CopilotAdapter, type CorpusSpec, type CorruptionMode, type CwdSource, DEFAULT_HARNESS, DEFAULT_SANDBOX_BASE_URL, type DockerImagePreparerOptions, EMPTY_SPAN_RUN_SNAPSHOT, EXPORT_RULE, EmptySessionError, type EnumerationResult, type ExcludedCase, type ExecuteOptions, type ExportRule, type ExternalAnalysisKind, type ExternalAnalysisPayload, type ExternalAnalysisResult, type ExternalAnalyzer, type ExternalAnalyzerOptions, type ExternalDiscoveryCandidate, FactoryAdapter, type FailedFixAttempt, type FileRunContextReaderOptions, type FindingReplaySource, type FindingReplayability, type FindingVerification, type FindingVerificationStatus, type FixArmExecution, type FixArmExecutor, type FixGenerationOutcome, type FixLoopAttemptRecord, type FixLoopOptions, type FixLoopResult, type FixPromptInput, ForgeAdapter, GeminiAdapter, type HaloAnalyzerOptions, type HaloReasoningEffort, type HarnessTraceAdapter, type HodoscopeAnalyzerOptions, type HodoscopeInput, type HodoscopeMessage, type HodoscopeSourceMapEntry, type HodoscopeTrajectory, INGEST_SOURCE_CLI, type ImagePreparation, type ImagePreparer, type IncorrectStepsSubject, type IngestedTrajectory, type InspectSessionIndexOptions, JsonSourceError, type JsonlCorruptionReceipt, JsonlParseError, type JsonlReadOptions, type LiveBatchOptions, type LocateOptions, type LoopConvergence, type LoopConvergenceReport, type LoopIteration, type LoopTrend, type LoopTrendBasis, type ObservedLoop, type ObserverOptions, OpencodeAdapter, type OtlpIngestIssue, type OtlpIngestIssueKind, type OtlpInput, type OtlpInputFile, type OtlpRowConversion, type OtlpSpan, type OtlpSpanKind, type OtlpSpanLink, type OtlpStatusCode, type ParentTaskResolution, type ParseOptions, PartialUploadError, PiAdapter, type PiAdapterOptions, type PipelineOptions, type PipelineReport, type PlanOptions, type PolicyEvidenceLoopSummary, type PolicyEvidenceRecord, type PolicyEvidenceToolSummary, type PrefixDivergence, type PrefixReplayResult, QwenAdapter, REACTIONS, RESULT_FILE, RULE, type Reaction, type ReactionReport, type ReactionSessionReport, type Redactor, type ReplayArmVerdict, type ReplayBatchCaseRow, type ReplayBatchCliArgs, type ReplayBatchFixResult, type ReplayBatchOptions, type ReplayBatchReport, type ReplayExclusionReason, type ReplayExecBackend, type ReplayExecResult, type ReplayExecSession, type ReplayFindingOptions, type ReplayFindingResult, type ReplayVerdict, type ReplayVerifyCliArgs, type ReplayVerifyOptions, type ReplayableCase, type RepoAttrs, type RepoResolution, type RepoResolutionSource, type ResolvedFindingReplay, type ResolvedOtlpInput, type ResolvedReplayInvocation, type ResourceResolution, type RunContextJournal, type RunContextNode, type RunContextResult, type RunContextSnapshot, type RunResult, type RunWatchSnapshot, type RunWatchTarget, type RuntimeTrace, SPAWN_JOURNAL_FILE, STATUS_MARK, SUBMIT_ACTION_SIGNATURE, SandboxCounterfactualRunner, type SandboxCounterfactualRunnerOptions, type SandboxReplayBackendOptions, type ScanOptions, type ScannedSession, type SessionBatch, type SessionCorruptionReceipt, type SessionIdentityConflict, type SessionIdentityIndex, type SessionIntegrity, type SessionRef, type SessionRelationship, type SessionRole, type SessionSeedGroup, type SessionSelection, type SessionSelectionRow, type SessionSourceFile, type SessionWorkflow, SessionWorkflowError, type SessionWorkflowErrorCode, type SessionWorkflowIssue, type SessionWorkflowSession, type SessionWorkflowSummary, type SkippedAnalysis, type SkippedInputFile, type SpanInput, type SpanNodeStatus, type SpanRedaction, type SpanRunNode, type SpanRunSnapshot, type SpanStructure, type SpendRoll, type SteeringChainReport, type SteeringEdge, TRACES_REDACTION_RULES, 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 TraceSessionIndex, type TraceSessionIndexRow, type TraceStoreInvestigationOptions, type TraceStoreInvestigationResult, type TraceStreamEvent, type TraceStreamOptions, type TraceStreamReplayOptions, type TraceStreamSession, type TracesConfig, type TriggerPair, type UnavailableCapabilities, type UploadBackend, type UploadIdentity, type UploadItem, type UploadPlan, type UploadRecord, type UploadResult, type UploadState, type UserPromptInput, type VerifiableFinding, type VerifyFindingsCliArgs, type VerifyFindingsOptions, type VerifyFindingsRun, type WatchRunTargetOptions, ZERO_ROLL, type ZaiChatCallerOptions, addSpend, alreadyUploaded, analyzeAdoption, analyzeLiveBatch, analyzeLoopConvergence, analyzeReactions, analyzeSpans, analyzeSteeringChain, applyRedactor, assertSandboxReachable, buildFixPrompt, buildPolicyEvidenceRecord, buildRetryFixPrompt, buildSessionIndex, buildSessionIndexFromRows, buildSpanRunTree, buildTraceFindingPacket, capText, chatTrajectoryToSpans, classifyLiveActions, classifyReaction, classifyVerdict, claudeActor, clipText, cmdReplayVerify, cmdReplayVerifyBatch, cmdVerifyFindings, codexActor, collectPolicyEvidence, collectSessionIndex, collectSessionSelection, collectSessionWorkflow, collectSessions, commandAnalyzer, commandRedactor, conformanceOfSpans, connectors, countScriptCommands, countSkillRunsJsonl, cwdMatchesSelection, defaultTraceLiveAnalysts, deriveFailureSignature, derivedImageTag, describeSessionRelationship, dockerImagePreparer, enumerateReplayableCases, equivalentGitCwds, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, extractFixCommand, fileRunContextSupervisorRunReader, findSpanSourceFiles, findingReplayStep, findingTrajectoryId, forEachTreeNode, generateFixCommand, goldIncorrectSteps, haloAnalyzer, hodoscopeAnalyzer, importCodeTraceBench, incompleteInputsNote, indexSessionIdsByTrace, inferRole, inferSpanKind, ingestCodeTraceBenchSteps, inspectSessionIndex, int, isChatTrajectory, isChatTrajectoryMessage, isFileRunContextDir, isSubmitAction, knownHarnesses, listAdapters, loadState, loadTracesConfig, locateSessions, looksLikeAgentPrompt, mergeRolls, mergeTracesConfig, ms, normalizeRemote, otlpRowToSpan, outboundHash, parseCorpusFlag, parseIncorrectStepsSubject, parseIsoToEpochMs, parseObservationOutput, parseRecordedReturncode, parseReplayBatchArgs, parseReplayVerifyArgs, parseSession, parseSince, parseVerifyFindingsArgs, planTraceAgenticRoute, planUpload, readCoordinationLog, readFileRunContext, readFindingsFile, readJsonFile, readJsonl, readLabelEntries, readOtlpInput, readRunContextJournal, readRunContextSnapshot, readRunWatchSnapshot, readSessionIndexFile, readSpanRunSnapshot, recordSessionCorruption, redactSpans, renderBatchReport, renderConformance, renderInspectionReport, renderRunContextSnapshot, renderRunWatchSnapshot, renderSpanRunSnapshot, renderValidation, renderVerifiedFindingsSection, replayBatchUsage, replayVerify, replayVerifyFinding, replayVerifyUsage, resolveAdapter, resolveCaseResources, resolveFindingInvocation, resolveFindingReplayability, resolveOtlpInputFiles, resolveRepoAttrs, resolveRunContextDir, resolveRunWatchTarget, resolveSessionRepoAttrs, runCommand, runExternalAnalyzers, runFixLoop, runPipelines, runReplayBatch, runTotals, runTraceImprovement, runTraceInvestigation, runTraceStoreInvestigation, sandboxReplayBackend, saveReport, saveState, scanSessions, seededSample, selectAdapters, serializeInspectionReport, serializePolicyEvidence, serializeSessionIndex, serializeSpans, serializeTraceStreamEvent, sessionHash, sessionIdFromAttributes, sessionIntegrityAttributes, skippedAnalyses, span, spanRunTotals, stampRepoAttrs, stampSessionIdentity, stampSessionIntegrity, stampSpanWorkdirRepoAttrs, streamSessions, summarizeOtlpExecution, summarizeSpanExecution, summarizeSpanStructure, takeJsonl, textIsSynthetic, toOpenInferenceSpan, toRuntimeStore, toTraceSpanEvents, tokens, totalAgenticFailureMessage, traceAgenticKinds, traceStreamEventsFromSpans, unavailableCapabilities, uploadKey, usd, userPromptSpan, validateOtlpSpans, validationExitCode, verifyFindings, verifyFindingsUsage, watchRunTarget, watchSessions, wrap, wrapActionForExec, writeHodoscopeInput, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts, zaiChatCaller, zeroPricedCost };
4592
+ export { ACTOR_ATTR, ATTR, type Actor, type AdoptionOptions, type AdoptionReport, AmpAdapter, type AnalystReplayFinding, type AnalyzeOptions, type AnalyzeResult, type ArmExecutionResult, type AssembleSessionBundleOptions, BLOBS_DIR, type BuildPolicyEvidenceOptions, type BuildSessionIndexOptions, type BuildTraceFindingPacketOptions, CODING_REDACTION_RULES, CONTENT_CAP, COORDINATION_LOG_FILE, CORRECTIVE_REACTIONS, type CaseResources, type ChatCompletionCaller, type ChatOutcome, type ChatTrajectory, type ChatTrajectoryMessage, type ChatTrajectoryOptions, type ChatUsage, 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 ConformanceRenderOptions, type CoordinationLog, type CoordinationQuestion, type CoordinationSteer, CopilotAdapter, type CorpusSpec, type CorruptionMode, type CwdSource, DEFAULT_HARNESS, DEFAULT_SANDBOX_BASE_URL, type DockerImagePreparerOptions, EMPTY_SPAN_RUN_SNAPSHOT, EXPORT_RULE, EmptySessionError, type EnumerationResult, type EvidenceOnlyVerdict, type ExcludedCase, type ExecuteOptions, type ExportRule, type ExternalAnalysisKind, type ExternalAnalysisPayload, type ExternalAnalysisResult, type ExternalAnalyzer, type ExternalAnalyzerOptions, type ExternalDiscoveryCandidate, FactoryAdapter, type FailedFixAttempt, type FileRunContextReaderOptions, type FindSessionTextLeaksOptions, type FindingReplaySource, type FindingReplayability, type FindingVerification, type FindingVerificationStatus, type FixArmExecution, type FixArmExecutor, type FixGenerationOutcome, type FixLoopAttemptRecord, type FixLoopOptions, type FixLoopResult, type FixPromptInput, ForgeAdapter, GeminiAdapter, type HaloAnalyzerOptions, type HaloReasoningEffort, type HarnessTraceAdapter, type HodoscopeAnalyzerOptions, type HodoscopeInput, type HodoscopeMessage, type HodoscopeSourceMapEntry, type HodoscopeTrajectory, INGEST_SOURCE_CLI, type ImagePreparation, type ImagePreparer, type IncorrectStepsSubject, type IngestedTrajectory, type InspectSessionIndexOptions, JsonSourceError, type JsonlCorruptionReceipt, JsonlParseError, type JsonlReadOptions, type LiveBatchOptions, type LocateOptions, type LoopConvergence, type LoopConvergenceReport, type LoopIteration, type LoopTrend, type LoopTrendBasis, 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, type ParentTaskResolution, type ParseOptions, PartialUploadError, PiAdapter, type PiAdapterOptions, type PipelineOptions, type PipelineReport, type PlanOptions, type PolicyEvidenceLoopSummary, type PolicyEvidenceRecord, type PolicyEvidenceToolSummary, type PrefixDivergence, type PrefixReplayResult, type PrimeAnalyzerOptions, type PrimeTransport, type PrimeTransportRequest, type PrimeTransportResponse, type ProjectSessionBundleOptions, type ProjectSessionBundleResult, QwenAdapter, REACTIONS, RESULT_FILE, RULE, type Reaction, type ReactionReport, type ReactionSessionReport, type Redactor, type ReplayArmVerdict, type ReplayBatchCaseRow, type ReplayBatchCliArgs, type ReplayBatchFixResult, type ReplayBatchOptions, type ReplayBatchReport, type ReplayExclusionReason, type ReplayExecBackend, type ReplayExecResult, type ReplayExecSession, type ReplayFindingOptions, type ReplayFindingResult, type ReplayVerdict, type ReplayVerifyCliArgs, type ReplayVerifyOptions, type ReplayableCase, type RepoAttrs, type RepoResolution, type RepoResolutionSource, type ResolvedFindingReplay, type ResolvedOtlpInput, type ResolvedReplayInvocation, type ResourceResolution, type RunContextJournal, type RunContextNode, type RunContextResult, type RunContextSnapshot, type RunResult, type RunWatchSnapshot, type RunWatchTarget, type RuntimeTrace, SPAWN_JOURNAL_FILE, STATUS_MARK, SUBMIT_ACTION_SIGNATURE, SandboxCounterfactualRunner, type SandboxCounterfactualRunnerOptions, type SandboxReplayBackendOptions, type ScanOptions, type ScannedSession, type SessionBatch, type SessionBundleAbsence, type SessionBundleCarriedSignatures, type SessionBundleExclusion, type SessionBundleExclusionRule, type SessionBundleFile, type SessionBundleLeakCheck, type SessionBundleLedgerSlice, type SessionBundleManifest, type SessionBundleProjection, type SessionBundleResult, type SessionBundleSliceRule, type SessionBundleView, type SessionCorruptionReceipt, type SessionEnvironment, type SessionIdentityConflict, type SessionIdentityIndex, type SessionIntegrity, type SessionRef, type SessionRelationship, type SessionRole, type SessionSeedGroup, type SessionSelection, type SessionSelectionRow, type SessionSourceFile, type SessionTextLeak, type SessionTextLeakReport, type SessionWorkflow, SessionWorkflowError, type SessionWorkflowErrorCode, type SessionWorkflowIssue, type SessionWorkflowSession, type SessionWorkflowSummary, type SkippedAnalysis, type SkippedInputFile, type SpanInput, type SpanNodeStatus, type SpanRedaction, type SpanRunNode, type SpanRunSnapshot, type SpanStructure, type SpendRoll, type SteeringChainReport, type SteeringEdge, TRACES_REDACTION_RULES, 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 TraceSessionIndex, type TraceSessionIndexRow, type TraceStoreInvestigationOptions, type TraceStoreInvestigationResult, type TraceStreamEvent, type TraceStreamOptions, type TraceStreamReplayOptions, type TraceStreamSession, type TracesConfig, type TriggerPair, type UnavailableCapabilities, type UploadBackend, type UploadIdentity, type UploadItem, type UploadPlan, type UploadRecord, type UploadResult, type UploadState, type UserPromptInput, type VerifiableFinding, type VerifyFindingsCliArgs, type VerifyFindingsOptions, type VerifyFindingsRun, type WatchRunTargetOptions, ZERO_ROLL, type ZaiChatCallerOptions, addSpend, alreadyUploaded, analyzeAdoption, analyzeLiveBatch, analyzeLoopConvergence, analyzeReactions, analyzeSpans, analyzeSteeringChain, applyRedactor, assembleSessionBundle, assertSandboxReachable, buildFixPrompt, buildPolicyEvidenceRecord, buildRetryFixPrompt, buildSessionIndex, buildSessionIndexFromRows, buildSpanRunTree, buildTraceFindingPacket, capText, chatTrajectoryToSpans, classifyEvidenceOnlyPath, classifyLiveActions, classifyReaction, classifyVerdict, claudeActor, clipText, cmdReplayVerify, cmdReplayVerifyBatch, cmdVerifyFindings, codexActor, collectPolicyEvidence, collectSessionIndex, collectSessionSelection, collectSessionWorkflow, collectSessions, commandAnalyzer, commandRedactor, conformanceOfSpans, connectors, countScriptCommands, countSkillRunsJsonl, cwdMatchesSelection, defaultTraceLiveAnalysts, deriveFailureSignature, derivedImageTag, describeSessionRelationship, dockerImagePreparer, enumerateReplayableCases, environmentAttributes, environmentFromSpanAttributes, equivalentGitCwds, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, extractFixCommand, fileRunContextSupervisorRunReader, findContextRoot, findSessionTextLeaks, findSpanSourceFiles, findingReplayStep, findingTrajectoryId, forEachTreeNode, generateFixCommand, goldIncorrectSteps, haloAnalyzer, hashSessionBundleFiles, hodoscopeAnalyzer, httpJsonTransport, importCodeTraceBench, incompleteInputsNote, indexSessionIdsByTrace, inferRole, inferSpanKind, ingestCodeTraceBenchSteps, inspectSessionIndex, int, isChatTrajectory, isChatTrajectoryMessage, isFileRunContextDir, isSubmitAction, knownHarnesses, listAdapters, listSessionBundleFiles, loadState, loadTracesConfig, locateSessions, looksLikeAgentPrompt, mergeRolls, mergeTracesConfig, ms, normalizeRemote, otlpRowToSpan, outboundHash, parseCorpusFlag, parseIncorrectStepsSubject, parseIsoToEpochMs, parseObservationOutput, parseRecordedReturncode, parseReplayBatchArgs, parseReplayVerifyArgs, parseSession, parseSince, parseVerifyFindingsArgs, planTraceAgenticRoute, planUpload, primeAnalyzer, projectSessionBundle, readCoordinationLog, readFileRunContext, readFindingsFile, readJsonFile, readJsonl, readLabelEntries, readOtlpInput, readRunContextJournal, readRunContextSnapshot, readRunWatchSnapshot, readSessionBundleManifest, readSessionIndexFile, readSpanRunSnapshot, recordSessionCorruption, redactSpans, renderBatchReport, renderConformance, renderInspectionReport, renderRunContextSnapshot, renderRunWatchSnapshot, renderSpanRunSnapshot, renderValidation, renderVerifiedFindingsSection, replayBatchUsage, replayVerify, replayVerifyFinding, replayVerifyUsage, resolveAdapter, resolveCaseResources, resolveFindingInvocation, resolveFindingReplayability, resolveOtlpInputFiles, resolveRepoAttrs, resolveRunContextDir, resolveRunWatchTarget, resolveSessionRepoAttrs, runCommand, runExternalAnalyzers, runFixLoop, runPipelines, runReplayBatch, runTotals, runTraceImprovement, runTraceInvestigation, runTraceStoreInvestigation, sandboxReplayBackend, saveReport, saveState, scanSessions, seededSample, selectAdapters, serializeInspectionReport, serializePolicyEvidence, serializeSessionIndex, serializeSpans, serializeTraceStreamEvent, sessionHash, sessionIdFromAttributes, sessionIntegrityAttributes, sessionTextSignatures, skippedAnalyses, span, spanRunTotals, stampEnvironmentAttrs, stampRepoAttrs, stampSessionIdentity, stampSessionIntegrity, stampSpanWorkdirRepoAttrs, streamSessions, summarizeOtlpExecution, summarizeSpanExecution, summarizeSpanStructure, takeJsonl, textIsSynthetic, toOpenInferenceSpan, toRuntimeStore, toTraceSpanEvents, tokens, totalAgenticFailureMessage, traceAgenticKinds, traceStreamEventsFromSpans, unavailableCapabilities, uploadKey, usd, userPromptSpan, validateOtlpSpans, validationExitCode, verifyFindings, verifyFindingsUsage, watchRunTarget, watchSessions, wrap, wrapActionForExec, writeHodoscopeInput, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionBundleManifest, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts, zaiChatCaller, zeroPricedCost };