@tangle-network/agent-eval 0.190.1 → 0.192.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-DNV_U6QR.d.ts → agent-profile-DDfIjdyS.d.ts} +3 -3
- package/dist/{agent-profile-DNV_U6QR.d.ts.map → agent-profile-DDfIjdyS.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +11 -11
- package/dist/analyst/index.js +5 -5
- package/dist/{insight-report-CvPkEIcC.d.ts → analyze-runs-CPiKLJFs.d.ts} +73 -3
- package/dist/analyze-runs-CPiKLJFs.d.ts.map +1 -0
- package/dist/{attribute-vocabulary-DLJ6303h.d.ts → attribute-vocabulary-CcXqHODT.d.ts} +23 -12
- package/dist/attribute-vocabulary-CcXqHODT.d.ts.map +1 -0
- package/dist/{benchmark-command-BXIr_k8D.js → benchmark-command-C458yEFK.js} +9 -9
- package/dist/{benchmark-command-BXIr_k8D.js.map → benchmark-command-C458yEFK.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +3 -3
- package/dist/benchmarks/index.js +3 -3
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +8 -7
- package/dist/{campaign-B7q74uIh.js → campaign-BVQVBEfH.js} +13 -325
- package/dist/campaign-BVQVBEfH.js.map +1 -0
- package/dist/{campaign-evidence-D40-LHIL.js → campaign-evidence-DcQiYhJI.js} +18 -154
- package/dist/campaign-evidence-DcQiYhJI.js.map +1 -0
- package/dist/claim-V9Zqbq0J.js +54 -0
- package/dist/claim-V9Zqbq0J.js.map +1 -0
- package/dist/cli.js +99 -2
- package/dist/cli.js.map +1 -1
- package/dist/client-wFyDisxi.d.ts +236 -0
- package/dist/client-wFyDisxi.d.ts.map +1 -0
- package/dist/contract/index.d.ts +10 -11
- package/dist/contract/index.js +10 -140
- package/dist/contract/index.js.map +1 -1
- package/dist/{default-registry-B5HrwrPM.d.ts → default-registry-DdqA_-_o.d.ts} +6 -6
- package/dist/{default-registry-B5HrwrPM.d.ts.map → default-registry-DdqA_-_o.d.ts.map} +1 -1
- package/dist/{default-registry-16I-Bxlf.js → default-registry-xMLX160E.js} +3 -3
- package/dist/{default-registry-16I-Bxlf.js.map → default-registry-xMLX160E.js.map} +1 -1
- package/dist/{define-agent-eval-DPizhHfy.js → define-agent-eval-DQuos3Aw.js} +30 -113
- package/dist/define-agent-eval-DQuos3Aw.js.map +1 -0
- package/dist/{define-agent-eval-DblGedQk.d.ts → define-agent-eval-DcludNJS.d.ts} +25 -38
- package/dist/define-agent-eval-DcludNJS.d.ts.map +1 -0
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/diagnosis/index.js +1 -1
- package/dist/{dspy-rlm-engine-Cs5LzJ-f.js → dspy-rlm-engine-BX34vPVY.js} +3 -3
- package/dist/{dspy-rlm-engine-Cs5LzJ-f.js.map → dspy-rlm-engine-BX34vPVY.js.map} +1 -1
- package/dist/{engine-BkLCnZQX.d.ts → engine-C1DIAEpn.d.ts} +4 -4
- package/dist/{engine-BkLCnZQX.d.ts.map → engine-C1DIAEpn.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +2 -2
- package/dist/{exact-types-CfpP2A4Z.d.ts → exact-types-KGxBWH4b.d.ts} +2 -2
- package/dist/{exact-types-CfpP2A4Z.d.ts.map → exact-types-KGxBWH4b.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +1 -1
- package/dist/experiment/index.js +2 -1
- package/dist/experiment/index.js.map +1 -1
- package/dist/{external-optimizer-process-BnSmrkgL.js → external-optimizer-process-D-Sab4v3.js} +3 -62
- package/dist/external-optimizer-process-D-Sab4v3.js.map +1 -0
- package/dist/{external-optimizer-subprocess-kbcPu5po.js → external-optimizer-subprocess-kbqC-iWf.js} +65 -27
- package/dist/external-optimizer-subprocess-kbqC-iWf.js.map +1 -0
- package/dist/{extract-usage-BrQ8mCLX.js → extract-usage-DFATEuWW.js} +2 -2
- package/dist/{extract-usage-BrQ8mCLX.js.map → extract-usage-DFATEuWW.js.map} +1 -1
- package/dist/{feedback-trajectory-BYjh7NEM.d.ts → feedback-trajectory-BXCGTRkz.d.ts} +3 -3
- package/dist/{feedback-trajectory-BYjh7NEM.d.ts.map → feedback-trajectory-BXCGTRkz.d.ts.map} +1 -1
- package/dist/hosted/index.d.ts +66 -6
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/hosted/index.js +2 -2
- package/dist/{index-I4UJGRno.d.ts → index-Bj96W0jZ.d.ts} +28 -2
- package/dist/{index-I4UJGRno.d.ts.map → index-Bj96W0jZ.d.ts.map} +1 -1
- package/dist/{index-2e_MTznj.d.ts → index-DBoXFaz0.d.ts} +6 -6
- package/dist/{index-2e_MTznj.d.ts.map → index-DBoXFaz0.d.ts.map} +1 -1
- package/dist/{index-CWoIJHmy.d.ts → index-DNVzu9Vv.d.ts} +10 -104
- package/dist/index-DNVzu9Vv.d.ts.map +1 -0
- package/dist/{index-CJv56rhX.d.ts → index-DwQxdWve.d.ts} +351 -135
- package/dist/index-DwQxdWve.d.ts.map +1 -0
- package/dist/index.d.ts +16 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -11
- package/dist/jev.d.ts +2 -2
- package/dist/{journal-c3qY0SDP.js → journal-DvKCvjty.js} +94 -2
- package/dist/{journal-c3qY0SDP.js.map → journal-DvKCvjty.js.map} +1 -1
- package/dist/{kind-factory-ByZeXDqF.js → kind-factory-CdPPHtGZ.js} +10 -26
- package/dist/kind-factory-CdPPHtGZ.js.map +1 -0
- package/dist/ledger-core/index.d.ts +2 -2
- package/dist/ledger-core/index.js +2 -2
- package/dist/{llm-judge-BnxAv7ed.js → llm-judge-Z6MkTkd0.js} +1805 -2012
- package/dist/llm-judge-Z6MkTkd0.js.map +1 -0
- package/dist/{matrix-CNypzP-v.d.ts → matrix-CQMMrEQ5.d.ts} +2 -2
- package/dist/{matrix-CNypzP-v.d.ts.map → matrix-CQMMrEQ5.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/{otel-spans-CQY1pNiN.js → otel-spans-DS7t1t1J.js} +8 -19
- package/dist/otel-spans-DS7t1t1J.js.map +1 -0
- package/dist/otlp-attributes-D9ptWaIJ.js +53 -0
- package/dist/otlp-attributes-D9ptWaIJ.js.map +1 -0
- package/dist/{prime-protocol-Fwvctmhm.d.ts → prime-protocol-T0i6xcAs.d.ts} +2 -2
- package/dist/{prime-protocol-Fwvctmhm.d.ts.map → prime-protocol-T0i6xcAs.d.ts.map} +1 -1
- package/dist/{produced-state-BXjXJHJT.js → produced-state-CVmCPQDJ.js} +3 -3
- package/dist/{produced-state-BXjXJHJT.js.map → produced-state-CVmCPQDJ.js.map} +1 -1
- package/dist/{registry-mAQVtuLx.d.ts → registry-Bu3lNole.d.ts} +3 -3
- package/dist/{registry-mAQVtuLx.d.ts.map → registry-Bu3lNole.d.ts.map} +1 -1
- package/dist/rl.d.ts +1 -1
- package/dist/rl.js +1 -1
- package/dist/{run-record-DnMFyg_g.js → run-record-tNnlQIrD.js} +2 -10
- package/dist/{run-record-DnMFyg_g.js.map → run-record-tNnlQIrD.js.map} +1 -1
- package/dist/search-ledger-Ck7tok0h.js +1517 -0
- package/dist/search-ledger-Ck7tok0h.js.map +1 -0
- package/dist/search-ledger-file-DY0AXX3W.js +27 -0
- package/dist/search-ledger-file-DY0AXX3W.js.map +1 -0
- package/dist/search-shipper-BG182p-U.js +781 -0
- package/dist/search-shipper-BG182p-U.js.map +1 -0
- package/dist/{semantic-concept-judge-ClB73cei.js → semantic-concept-judge-Bg-560H0.js} +4 -4
- package/dist/{semantic-concept-judge-ClB73cei.js.map → semantic-concept-judge-Bg-560H0.js.map} +1 -1
- package/dist/{skillopt-optimization-method-l2vDBtKp.js → skillopt-optimization-method-DoayuM6D.js} +6 -5
- package/dist/{skillopt-optimization-method-l2vDBtKp.js.map → skillopt-optimization-method-DoayuM6D.js.map} +1 -1
- package/dist/{statistical-heldout-CLpjYffJ.d.ts → statistical-heldout-C1Ej5Ce8.d.ts} +2 -2
- package/dist/{statistical-heldout-CLpjYffJ.d.ts.map → statistical-heldout-C1Ej5Ce8.d.ts.map} +1 -1
- package/dist/{store-otlp-84DH0OEH.js → store-otlp-BPowgPm6.js} +2 -2
- package/dist/{store-otlp-84DH0OEH.js.map → store-otlp-BPowgPm6.js.map} +1 -1
- package/dist/{store-tool-spans-DUiqyHvR.js → store-tool-spans-BcC_5ef-.js} +5 -5
- package/dist/{store-tool-spans-DUiqyHvR.js.map → store-tool-spans-BcC_5ef-.js.map} +1 -1
- package/dist/{store-tool-spans-BBXs8hDP.d.ts → store-tool-spans-ByLdU26j.d.ts} +5 -9
- package/dist/store-tool-spans-ByLdU26j.d.ts.map +1 -0
- package/dist/{task-failure-attributes-B34TiMBe.js → task-failure-attributes-CEqEfuIY.js} +17 -9
- package/dist/task-failure-attributes-CEqEfuIY.js.map +1 -0
- package/dist/{tool-groups-W7MJobX_.d.ts → tool-groups-DiBi16ns.d.ts} +3 -3
- package/dist/tool-groups-DiBi16ns.d.ts.map +1 -0
- package/dist/trace-attributes.d.ts +1 -1
- package/dist/trace-attributes.js +23 -75
- package/dist/trace-attributes.js.map +1 -1
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/traces.d.ts +11 -18
- package/dist/traces.d.ts.map +1 -1
- package/dist/traces.js +16 -16
- package/dist/traces.js.map +1 -1
- package/dist/{types-Cvqy7asY.d.ts → types-ByZslIlr.d.ts} +2 -2
- package/dist/{types-Cvqy7asY.d.ts.map → types-ByZslIlr.d.ts.map} +1 -1
- package/dist/{types-BvmWNjjs.d.ts → types-C1CAD70_.d.ts} +15 -16
- package/dist/types-C1CAD70_.d.ts.map +1 -0
- package/dist/{types-Bay1dh2o.d.ts → types-CeDfCRXp.d.ts} +11 -16
- package/dist/types-CeDfCRXp.d.ts.map +1 -0
- package/dist/wire/index.d.ts +1 -1
- package/docs/campaign-proposers.md +14 -16
- package/docs/hosted-ingest-spec.md +92 -133
- package/docs/public-api.md +46 -35
- package/docs/search-ledger.md +79 -1
- package/package.json +2 -2
- package/dist/analyze-runs-BvK4-wSs.d.ts +0 -75
- package/dist/analyze-runs-BvK4-wSs.d.ts.map +0 -1
- package/dist/attribute-vocabulary-DLJ6303h.d.ts.map +0 -1
- package/dist/campaign-B7q74uIh.js.map +0 -1
- package/dist/campaign-evidence-D40-LHIL.js.map +0 -1
- package/dist/client-BhEyAdfe.d.ts +0 -202
- package/dist/client-BhEyAdfe.d.ts.map +0 -1
- package/dist/client-QwJpsNYU.js +0 -655
- package/dist/client-QwJpsNYU.js.map +0 -1
- package/dist/define-agent-eval-DPizhHfy.js.map +0 -1
- package/dist/define-agent-eval-DblGedQk.d.ts.map +0 -1
- package/dist/external-optimizer-process-BnSmrkgL.js.map +0 -1
- package/dist/external-optimizer-subprocess-kbcPu5po.js.map +0 -1
- package/dist/index-CJv56rhX.d.ts.map +0 -1
- package/dist/index-CWoIJHmy.d.ts.map +0 -1
- package/dist/insight-report-CvPkEIcC.d.ts.map +0 -1
- package/dist/kind-factory-ByZeXDqF.js.map +0 -1
- package/dist/llm-judge-BnxAv7ed.js.map +0 -1
- package/dist/otel-spans-CQY1pNiN.js.map +0 -1
- package/dist/otlp-attributes-BpC_blLF.js +0 -83
- package/dist/otlp-attributes-BpC_blLF.js.map +0 -1
- package/dist/store-tool-spans-BBXs8hDP.d.ts.map +0 -1
- package/dist/task-failure-attributes-B34TiMBe.js.map +0 -1
- package/dist/tool-groups-W7MJobX_.d.ts.map +0 -1
- package/dist/types-Bay1dh2o.d.ts.map +0 -1
- package/dist/types-BvmWNjjs.d.ts.map +0 -1
package/dist/trace-attributes.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ATTR, CACHE_READ_TOKEN_ATTR_KEYS, CACHE_WRITE_TOKEN_ATTR_KEYS, COST_ATTR_KEYS, INPUT_TOKEN_ATTR_KEYS, MODEL_ATTR_KEYS, OUTPUT_TOKEN_ATTR_KEYS, REASONING_TOKEN_ATTR_KEYS, SPAN_KIND_ATTR_KEYS as SPAN_KIND_ATTR_KEYS$1, TOOL_NAME_ATTR_KEYS as TOOL_NAME_ATTR_KEYS$1 } from "@tangle-network/agent-trace-contract";
|
|
2
2
|
//#region src/trace/attribute-vocabulary.ts
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Canonical OpenInference-over-OTLP attribute names used at trace boundaries.
|
|
5
|
+
*
|
|
6
|
+
* `@tangle-network/agent-trace-contract` owns the reader candidate lists; the
|
|
7
|
+
* `*_ATTR_KEYS` below are its lists under the names this package exports. The
|
|
8
|
+
* single-key constants are the keys this package's own producers write.
|
|
9
|
+
*/
|
|
10
|
+
const OPENINFERENCE_SPAN_KIND = ATTR.spanKind;
|
|
5
11
|
const LLM_MODEL_NAME = "llm.model_name";
|
|
6
12
|
const LLM_INPUT_TOKENS = "llm.token_count.prompt";
|
|
7
13
|
const LLM_OUTPUT_TOKENS = "llm.token_count.completion";
|
|
@@ -16,81 +22,23 @@ const TOOL_ARGS_CAPTURED = "tool.args_captured";
|
|
|
16
22
|
const TOOL_LATENCY_MS = "tool.latency_ms";
|
|
17
23
|
const INPUT_VALUE = "input.value";
|
|
18
24
|
const OUTPUT_VALUE = "output.value";
|
|
19
|
-
const SPAN_KIND_ATTR_KEYS =
|
|
20
|
-
const LLM_MODEL_ATTR_KEYS =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"llm.model",
|
|
24
|
-
...GEN_AI_MODEL_KEYS,
|
|
25
|
-
"tangle.model"
|
|
26
|
-
];
|
|
27
|
-
const LLM_INPUT_TOKEN_ATTR_KEYS = [
|
|
28
|
-
LLM_INPUT_TOKENS,
|
|
29
|
-
"inference.llm.input_tokens",
|
|
30
|
-
"llm.input_tokens",
|
|
31
|
-
...GEN_AI_INPUT_TOKEN_KEYS,
|
|
32
|
-
"tangle.tokens.in",
|
|
33
|
-
"tokens.in"
|
|
34
|
-
];
|
|
35
|
-
const LLM_OUTPUT_TOKEN_ATTR_KEYS = [
|
|
36
|
-
LLM_OUTPUT_TOKENS,
|
|
37
|
-
"inference.llm.output_tokens",
|
|
38
|
-
"llm.output_tokens",
|
|
39
|
-
...GEN_AI_OUTPUT_TOKEN_KEYS,
|
|
40
|
-
"tangle.tokens.out",
|
|
41
|
-
"tokens.out"
|
|
42
|
-
];
|
|
25
|
+
const SPAN_KIND_ATTR_KEYS = SPAN_KIND_ATTR_KEYS$1;
|
|
26
|
+
const LLM_MODEL_ATTR_KEYS = MODEL_ATTR_KEYS;
|
|
27
|
+
const LLM_INPUT_TOKEN_ATTR_KEYS = INPUT_TOKEN_ATTR_KEYS;
|
|
28
|
+
const LLM_OUTPUT_TOKEN_ATTR_KEYS = OUTPUT_TOKEN_ATTR_KEYS;
|
|
43
29
|
/** Reasoning-token subset of output, when a producer exposes it separately. */
|
|
44
|
-
const LLM_REASONING_TOKEN_ATTR_KEYS =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"gen_ai.usage.output_tokens_details.reasoning_tokens",
|
|
54
|
-
"gen_ai.usage.completion_tokens_details.reasoning_tokens"
|
|
55
|
-
];
|
|
56
|
-
const LLM_CACHED_TOKEN_ATTR_KEYS = [
|
|
57
|
-
LLM_CACHED_TOKENS,
|
|
58
|
-
"inference.llm.cached_tokens",
|
|
59
|
-
"llm.cached_tokens",
|
|
60
|
-
"gen_ai.usage.cached_tokens",
|
|
61
|
-
"gen_ai.usage.prompt_tokens_details.cached_tokens",
|
|
62
|
-
"gen_ai.usage.input_tokens_details.cached_tokens",
|
|
63
|
-
"gen_ai.usage.cache_read_tokens",
|
|
64
|
-
"gen_ai.usage.cache_read_input_tokens",
|
|
65
|
-
"cache_read_tokens",
|
|
66
|
-
"cache_read_input_tokens",
|
|
67
|
-
"input_cache_read",
|
|
68
|
-
"tangle.tokens.cached"
|
|
69
|
-
];
|
|
70
|
-
const LLM_CACHE_WRITE_TOKEN_ATTR_KEYS = [
|
|
71
|
-
LLM_CACHE_WRITE_TOKENS,
|
|
72
|
-
"inference.llm.cache_write_tokens",
|
|
73
|
-
"llm.cache_write_tokens",
|
|
74
|
-
"gen_ai.usage.cache_creation_tokens",
|
|
75
|
-
"gen_ai.usage.cache_creation_input_tokens",
|
|
76
|
-
"cache_creation_tokens",
|
|
77
|
-
"cache_creation_input_tokens",
|
|
78
|
-
"input_cache_creation",
|
|
79
|
-
"tangle.tokens.cache_write"
|
|
80
|
-
];
|
|
81
|
-
const LLM_COST_ATTR_KEYS = [
|
|
82
|
-
LLM_COST_USD,
|
|
83
|
-
"inference.llm.cost.total",
|
|
84
|
-
"llm.cost.total",
|
|
85
|
-
"gen_ai.usage.cost",
|
|
86
|
-
"gen_ai.usage.cost_usd",
|
|
87
|
-
"tangle.cost.usd",
|
|
88
|
-
"cost.usd",
|
|
89
|
-
"cost"
|
|
90
|
-
];
|
|
30
|
+
const LLM_REASONING_TOKEN_ATTR_KEYS = REASONING_TOKEN_ATTR_KEYS;
|
|
31
|
+
const LLM_CACHED_TOKEN_ATTR_KEYS = CACHE_READ_TOKEN_ATTR_KEYS;
|
|
32
|
+
const LLM_CACHE_WRITE_TOKEN_ATTR_KEYS = CACHE_WRITE_TOKEN_ATTR_KEYS;
|
|
33
|
+
/**
|
|
34
|
+
* The contract's cost keys plus a bare `cost`. The contract refuses `cost` because
|
|
35
|
+
* it answers "can this trace be costed" from key presence; this package reads it
|
|
36
|
+
* only as a last-resort value on a span already known to be a model call.
|
|
37
|
+
*/
|
|
38
|
+
const LLM_COST_ATTR_KEYS = Object.freeze([...COST_ATTR_KEYS, "cost"]);
|
|
91
39
|
/** Explicit run-total cost keys safe to preserve on an untyped span. */
|
|
92
40
|
const RUN_COST_ATTR_KEYS = ["tangle.cost.usd", "cost.usd"];
|
|
93
|
-
const TOOL_NAME_ATTR_KEYS =
|
|
41
|
+
const TOOL_NAME_ATTR_KEYS = TOOL_NAME_ATTR_KEYS$1;
|
|
94
42
|
/** Read a numeric attribute, tolerating numeric strings; `null` if absent or invalid. */
|
|
95
43
|
function asNumber(value) {
|
|
96
44
|
if (typeof value === "number") return Number.isFinite(value) ? value : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace-attributes.js","names":[],"sources":["../src/trace/attribute-vocabulary.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"trace-attributes.js","names":["CONTRACT_SPAN_KIND_ATTR_KEYS","CONTRACT_TOOL_NAME_ATTR_KEYS"],"sources":["../src/trace/attribute-vocabulary.ts"],"sourcesContent":["/**\n * Canonical OpenInference-over-OTLP attribute names used at trace boundaries.\n *\n * `@tangle-network/agent-trace-contract` owns the reader candidate lists; the\n * `*_ATTR_KEYS` below are its lists under the names this package exports. The\n * single-key constants are the keys this package's own producers write.\n */\n\nimport {\n ATTR,\n CACHE_READ_TOKEN_ATTR_KEYS,\n CACHE_WRITE_TOKEN_ATTR_KEYS,\n SPAN_KIND_ATTR_KEYS as CONTRACT_SPAN_KIND_ATTR_KEYS,\n TOOL_NAME_ATTR_KEYS as CONTRACT_TOOL_NAME_ATTR_KEYS,\n COST_ATTR_KEYS,\n INPUT_TOKEN_ATTR_KEYS,\n MODEL_ATTR_KEYS,\n OUTPUT_TOKEN_ATTR_KEYS,\n REASONING_TOKEN_ATTR_KEYS,\n} from '@tangle-network/agent-trace-contract'\n\nexport const OPENINFERENCE_SPAN_KIND = ATTR.spanKind\nexport const LLM_MODEL_NAME = 'llm.model_name'\nexport const LLM_INPUT_TOKENS = 'llm.token_count.prompt'\nexport const LLM_OUTPUT_TOKENS = 'llm.token_count.completion'\nexport const LLM_REASONING_TOKENS = 'llm.token_count.reasoning'\nexport const LLM_CACHED_TOKENS = 'llm.token_count.prompt_cache_hit'\nexport const LLM_CACHE_WRITE_TOKENS = 'llm.token_count.prompt_cache_write'\n/** Exact prompt context after summing mutually exclusive input/cache categories. */\nexport const LLM_CONTEXT_TOKENS = 'tangle.llm.context_tokens'\nexport const LLM_COST_USD = 'llm.cost_usd'\nexport const TOOL_NAME = 'tool.name'\nexport const TOOL_ARGS_CAPTURED = 'tool.args_captured'\nexport const TOOL_LATENCY_MS = 'tool.latency_ms'\nexport const INPUT_VALUE = 'input.value'\nexport const OUTPUT_VALUE = 'output.value'\n\nexport const SPAN_KIND_ATTR_KEYS: readonly string[] = CONTRACT_SPAN_KIND_ATTR_KEYS\nexport const LLM_MODEL_ATTR_KEYS: readonly string[] = MODEL_ATTR_KEYS\nexport const LLM_INPUT_TOKEN_ATTR_KEYS: readonly string[] = INPUT_TOKEN_ATTR_KEYS\nexport const LLM_OUTPUT_TOKEN_ATTR_KEYS: readonly string[] = OUTPUT_TOKEN_ATTR_KEYS\n/** Reasoning-token subset of output, when a producer exposes it separately. */\nexport const LLM_REASONING_TOKEN_ATTR_KEYS: readonly string[] = REASONING_TOKEN_ATTR_KEYS\nexport const LLM_CACHED_TOKEN_ATTR_KEYS: readonly string[] = CACHE_READ_TOKEN_ATTR_KEYS\nexport const LLM_CACHE_WRITE_TOKEN_ATTR_KEYS: readonly string[] = CACHE_WRITE_TOKEN_ATTR_KEYS\n\n/**\n * The contract's cost keys plus a bare `cost`. The contract refuses `cost` because\n * it answers \"can this trace be costed\" from key presence; this package reads it\n * only as a last-resort value on a span already known to be a model call.\n */\nexport const LLM_COST_ATTR_KEYS: readonly string[] = Object.freeze([...COST_ATTR_KEYS, 'cost'])\n\n/** Explicit run-total cost keys safe to preserve on an untyped span. */\nexport const RUN_COST_ATTR_KEYS = ['tangle.cost.usd', 'cost.usd'] as const\n\nexport const TOOL_NAME_ATTR_KEYS: readonly string[] = CONTRACT_TOOL_NAME_ATTR_KEYS\n\n/** Read a numeric attribute, tolerating numeric strings; `null` if absent or invalid. */\nexport function asNumber(value: unknown): number | null {\n if (typeof value === 'number') return Number.isFinite(value) ? value : null\n if (typeof value === 'string' && value.length > 0) {\n const parsed = Number(value)\n return Number.isFinite(parsed) ? parsed : null\n }\n return null\n}\n\n/** First finite numeric value across a list of candidate attribute keys. */\nexport function firstNumberAttr(\n attributes: Record<string, unknown>,\n keys: readonly string[],\n): number | null {\n for (const key of keys) {\n const value = asNumber(attributes[key])\n if (value !== null) return value\n }\n return null\n}\n\n/** Sum producer-supplied, mutually exclusive prompt-token categories. */\nexport function contextInputTokens(usage: {\n inputTokens?: number | null\n cachedTokens?: number | null\n cacheWriteTokens?: number | null\n}): number | undefined {\n if (usage.inputTokens === undefined || usage.inputTokens === null) return undefined\n return usage.inputTokens + (usage.cachedTokens ?? 0) + (usage.cacheWriteTokens ?? 0)\n}\n\nexport interface LlmSpanOtlpInput {\n model?: string\n inputTokens?: number\n outputTokens?: number\n reasoningTokens?: number\n cachedTokens?: number\n cacheWriteTokens?: number\n costUsd?: number\n finishReason?: string\n}\n\n/** Write the canonical LLM attributes shared by trace producers. */\nexport function applyLlmSpanOtlpAttributes(\n attributes: Record<string, unknown>,\n span: LlmSpanOtlpInput,\n): void {\n if (span.model !== undefined) attributes[LLM_MODEL_NAME] = span.model\n if (span.inputTokens !== undefined) attributes[LLM_INPUT_TOKENS] = span.inputTokens\n if (span.outputTokens !== undefined) attributes[LLM_OUTPUT_TOKENS] = span.outputTokens\n if (span.reasoningTokens !== undefined) attributes[LLM_REASONING_TOKENS] = span.reasoningTokens\n if (span.cachedTokens !== undefined) attributes[LLM_CACHED_TOKENS] = span.cachedTokens\n if (span.cacheWriteTokens !== undefined) {\n attributes[LLM_CACHE_WRITE_TOKENS] = span.cacheWriteTokens\n }\n const contextTokens = contextInputTokens(span)\n if (contextTokens !== undefined) attributes[LLM_CONTEXT_TOKENS] = contextTokens\n if (span.costUsd !== undefined) attributes[LLM_COST_USD] = span.costUsd\n if (span.finishReason) attributes['llm.finish_reason'] = span.finishReason\n}\n"],"mappings":";;;;;;;;;AAqBA,MAAa,0BAA0B,KAAK;AAC5C,MAAa,iBAAiB;AAC9B,MAAa,mBAAmB;AAChC,MAAa,oBAAoB;AACjC,MAAa,uBAAuB;AACpC,MAAa,oBAAoB;AACjC,MAAa,yBAAyB;;AAEtC,MAAa,qBAAqB;AAClC,MAAa,eAAe;AAC5B,MAAa,YAAY;AACzB,MAAa,qBAAqB;AAClC,MAAa,kBAAkB;AAC/B,MAAa,cAAc;AAC3B,MAAa,eAAe;AAE5B,MAAa,sBAAyCA;AACtD,MAAa,sBAAyC;AACtD,MAAa,4BAA+C;AAC5D,MAAa,6BAAgD;;AAE7D,MAAa,gCAAmD;AAChE,MAAa,6BAAgD;AAC7D,MAAa,kCAAqD;;;;;;AAOlE,MAAa,qBAAwC,OAAO,OAAO,CAAC,GAAG,gBAAgB,MAAM,CAAC;;AAG9F,MAAa,qBAAqB,CAAC,mBAAmB,UAAU;AAEhE,MAAa,sBAAyCC;;AAGtD,SAAgB,SAAS,OAA+B;CACtD,IAAI,OAAO,UAAU,UAAU,OAAO,OAAO,SAAS,KAAK,IAAI,QAAQ;CACvE,IAAI,OAAO,UAAU,YAAY,MAAM,SAAS,GAAG;EACjD,MAAM,SAAS,OAAO,KAAK;EAC3B,OAAO,OAAO,SAAS,MAAM,IAAI,SAAS;CAC5C;CACA,OAAO;AACT;;AAGA,SAAgB,gBACd,YACA,MACe;CACf,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,QAAQ,SAAS,WAAW,IAAI;EACtC,IAAI,UAAU,MAAM,OAAO;CAC7B;CACA,OAAO;AACT;;AAGA,SAAgB,mBAAmB,OAIZ;CACrB,IAAI,MAAM,gBAAgB,KAAA,KAAa,MAAM,gBAAgB,MAAM,OAAO,KAAA;CAC1E,OAAO,MAAM,eAAe,MAAM,gBAAgB,MAAM,MAAM,oBAAoB;AACpF;;AAcA,SAAgB,2BACd,YACA,MACM;CACN,IAAI,KAAK,UAAU,KAAA,GAAW,WAAW,kBAAkB,KAAK;CAChE,IAAI,KAAK,gBAAgB,KAAA,GAAW,WAAW,oBAAoB,KAAK;CACxE,IAAI,KAAK,iBAAiB,KAAA,GAAW,WAAW,qBAAqB,KAAK;CAC1E,IAAI,KAAK,oBAAoB,KAAA,GAAW,WAAW,wBAAwB,KAAK;CAChF,IAAI,KAAK,iBAAiB,KAAA,GAAW,WAAW,qBAAqB,KAAK;CAC1E,IAAI,KAAK,qBAAqB,KAAA,GAC5B,WAAW,0BAA0B,KAAK;CAE5C,MAAM,gBAAgB,mBAAmB,IAAI;CAC7C,IAAI,kBAAkB,KAAA,GAAW,WAAW,sBAAsB;CAClE,IAAI,KAAK,YAAY,KAAA,GAAW,WAAW,gBAAgB,KAAK;CAChE,IAAI,KAAK,cAAc,WAAW,uBAAuB,KAAK;AAChE"}
|
|
@@ -2,7 +2,7 @@ import { r as CaptureIntegrityError } from "../errors-DEE6u6ot.js";
|
|
|
2
2
|
import { b as CustomTokenPricing, c as CostLedgerHandle, p as CostProvenance } from "../cost-ledger-DbQdN3nO.js";
|
|
3
3
|
import { d as RunTokenUsage } from "../run-record-DF-fuu31.js";
|
|
4
4
|
import { t as DefaultVerdict } from "../verdict-E4eRNf7-.js";
|
|
5
|
-
import { a as TraceAnalystLimits, n as TraceAnalysisEngine } from "../engine-
|
|
5
|
+
import { a as TraceAnalystLimits, n as TraceAnalysisEngine } from "../engine-C1DIAEpn.js";
|
|
6
6
|
import { t as PrimeBridgeTransport } from "../prime-bridge-transport-6feEglLf.js";
|
|
7
7
|
import { a as RecordedTrajectoryStep, h as isRecordedTimeout } from "../steps-Bg5-KVx1.js";
|
|
8
8
|
//#region src/trace-repair/mini-swe-scaffold.d.ts
|
package/dist/traces.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { c as ValidationError, o as LimitExceededError, r as CaptureIntegrityError, s as NotFoundError, t as AgentEvalError } from "./errors-DEE6u6ot.js";
|
|
2
2
|
import { C as ToolSpan, D as isToolSpan, E as isLlmSpan, S as TRACE_SCHEMA_VERSION, T as isJudgeSpan, _ as SandboxSpan, a as FAILURE_CLASSES, b as SpanKind, c as JudgeSpan, d as RetrievalSpan, f as Run, g as RunStatus, h as RunOutcome, i as EventKind, l as LlmSpan, m as RunLayer, n as BudgetLedgerEntry, o as FailureClass, p as RunCaptureReport, r as BudgetSpec, s as GenericSpan, t as Artifact, u as Message, v as Span, w as TraceEvent, x as SpanStatus, y as SpanBase } from "./schema-2g7trUwH.js";
|
|
3
3
|
import { a as RunRecord, c as RunSplitTag, d as RunTokenUsage, u as RunTerminalOutcome } from "./run-record-DF-fuu31.js";
|
|
4
|
-
import { A as
|
|
5
|
-
import { A as AnalyzeTracesInput, B as CaptureFetchContext, C as inferDomainKeywords, D as planTraceInsightQuestions, E as isTraceInsightEvidence, F as OTEL_AGENT_EVAL_SCOPE, G as SseUsageMode, H as captureFetchToRawSink, I as OtlpExport, J as extractUsageFromSse, K as extractUsage, L as OtlpResourceSpans, M as AnalyzeTracesResult, N as analyzeTraces, O as scoreTraceInsightReadiness, P as OtlpFlatLine, R as OtlpSpan, S as domainEvidencePattern, T as isTraceInsightAttribution, U as ExtractUsageFromSseOptions, V as CaptureFetchOptions, W as ExtractedUsage, Y as createBoundedTraceAnalysisStore, _ as TraceInsightTask, a as ToolSpansToTraceAnalysisStoreOptions, b as defaultTraceInsightPanel, c as TraceInsightContext, d as TraceInsightPanelRole, f as TraceInsightPromptInput, g as TraceInsightSuite, h as TraceInsightReadiness, i as OtlpFileTraceStoreOptions, j as AnalyzeTracesOptions, k as tokenizeDomainWords, l as TraceInsightEvidence, m as TraceInsightQuestion, n as toolSpansToTraceAnalysisStore, o as otlpTextToTraceAnalysisStore, p as TraceInsightQualityGate, q as extractUsageFromResponse, r as OtlpFileTraceStore, s as TraceInsightAttribution, t as ToolTraceMissingError, u as TraceInsightFinding, v as buildTraceInsightContext, w as isTraceInsightArtifact, x as describeTraceInsightScope, y as buildTraceInsightPrompt, z as exportRunAsOtlp } from "./store-tool-spans-BBXs8hDP.js";
|
|
4
|
+
import { A as DEFAULT_TRACE_ANALYST_BUDGETS, B as TraceAnalystSpan, C as BoundedTraceAnalysisStoreOptions, D as TRACE_ANALYSIS_LIMITS, E as SpanSourceReader, F as SearchTraceResult, G as ViewTraceOversized, H as TraceAnalystSpanStatus, I as SpanMatchRecord, K as ViewTraceResult, L as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, M as ErrorCluster, N as QueryTracesPage, O as TraceAnalysisStore, P as SearchSpanResult, R as TraceAnalystByteBudgets, S as createBoundedTraceAnalysisStore, T as ReadSpanSourceResult, U as TraceAnalystTraceSummary, V as TraceAnalystSpanKind, W as ViewSpansResult, j as DatasetOverview, k as TraceAnalysisStoreContext, w as ReadSpanSourceInput, z as TraceAnalystFilters } from "./types-CeDfCRXp.js";
|
|
6
5
|
import { $ as NoopRawProviderSink, Q as InMemoryRawProviderSinkOptions, X as FileSystemRawProviderSinkOptions, Y as FileSystemRawProviderSink, Z as InMemoryRawProviderSink, at as defaultProviderRedactor, et as ProviderRedactor, it as RawProviderSinkFilter, nt as RawProviderEvent, ot as providerFromBaseUrl, rt as RawProviderSink, tt as RawProviderDirection } from "./types-C0bWoSKC.js";
|
|
7
6
|
import { a as RunFilter, i as InMemoryTraceStore, n as FileSystemTraceStore, o as SpanFilter, r as FileSystemTraceStoreOptions, s as TraceStore, t as EventFilter } from "./store-C4avFjIi.js";
|
|
8
|
-
import { _ as buildTraceAnalysisToolDescriptors, g as UNTRUSTED_TRACE_TEXT, h as TraceAnalysisToolDescriptor, m as TRACE_ANALYST_TOOL_NAMESPACE, p as BuildTraceAnalysisToolsOptions, v as traceAnalystFunctionGroup } from "./engine-
|
|
7
|
+
import { _ as buildTraceAnalysisToolDescriptors, g as UNTRUSTED_TRACE_TEXT, h as TraceAnalysisToolDescriptor, m as TRACE_ANALYST_TOOL_NAMESPACE, p as BuildTraceAnalysisToolsOptions, v as traceAnalystFunctionGroup } from "./engine-C1DIAEpn.js";
|
|
9
8
|
import { a as SpanHandle, i as RunCompleteHookContext, n as CaptureWrite, o as TraceEmitter, r as RunCompleteHook, s as TraceEmitterOptions, t as CaptureErrorHandler } from "./emitter-HcCmFQl_.js";
|
|
10
9
|
import { S as shareAllowed, _ as emptyRedactionReport, a as RedactionFinding, b as redactForShare, c as SafetyCategory, d as ShareSafetyVerdict, f as assessShareSafety, g as detectPersonalData, h as detectCredential, i as RedactOptions, l as ShareSafetyFinding, m as combineVerdicts, n as REDACTION_PROFILES, o as RedactionProfile, p as classifyKey, r as REDACTION_VERSION, s as RedactionReport, t as AssessOptions, u as ShareSafetyStatus, v as normalizeKey, x as redactText, y as redact } from "./redact-CopuMxll.js";
|
|
11
|
-
import { C as TOOL_LATENCY_MS, D as asNumber, E as applyLlmSpanOtlpAttributes, O as contextInputTokens, S as TOOL_ARGS_CAPTURED, T as TOOL_NAME_ATTR_KEYS, _ as LlmSpanOtlpInput, a as LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, b as RUN_COST_ATTR_KEYS, c as LLM_COST_USD, d as LLM_MODEL_ATTR_KEYS, f as LLM_MODEL_NAME, g as LLM_REASONING_TOKEN_ATTR_KEYS, h as LLM_REASONING_TOKENS, i as LLM_CACHE_WRITE_TOKENS, k as firstNumberAttr, l as LLM_INPUT_TOKENS, m as LLM_OUTPUT_TOKEN_ATTR_KEYS, n as LLM_CACHED_TOKENS, o as LLM_CONTEXT_TOKENS, p as LLM_OUTPUT_TOKENS, r as LLM_CACHED_TOKEN_ATTR_KEYS, s as LLM_COST_ATTR_KEYS, t as INPUT_VALUE, u as LLM_INPUT_TOKEN_ATTR_KEYS, v as OPENINFERENCE_SPAN_KIND, w as TOOL_NAME, x as SPAN_KIND_ATTR_KEYS, y as OUTPUT_VALUE } from "./attribute-vocabulary-
|
|
10
|
+
import { C as TOOL_LATENCY_MS, D as asNumber, E as applyLlmSpanOtlpAttributes, O as contextInputTokens, S as TOOL_ARGS_CAPTURED, T as TOOL_NAME_ATTR_KEYS, _ as LlmSpanOtlpInput, a as LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, b as RUN_COST_ATTR_KEYS, c as LLM_COST_USD, d as LLM_MODEL_ATTR_KEYS, f as LLM_MODEL_NAME, g as LLM_REASONING_TOKEN_ATTR_KEYS, h as LLM_REASONING_TOKENS, i as LLM_CACHE_WRITE_TOKENS, k as firstNumberAttr, l as LLM_INPUT_TOKENS, m as LLM_OUTPUT_TOKEN_ATTR_KEYS, n as LLM_CACHED_TOKENS, o as LLM_CONTEXT_TOKENS, p as LLM_OUTPUT_TOKENS, r as LLM_CACHED_TOKEN_ATTR_KEYS, s as LLM_COST_ATTR_KEYS, t as INPUT_VALUE, u as LLM_INPUT_TOKEN_ATTR_KEYS, v as OPENINFERENCE_SPAN_KIND, w as TOOL_NAME, x as SPAN_KIND_ATTR_KEYS, y as OUTPUT_VALUE } from "./attribute-vocabulary-CcXqHODT.js";
|
|
11
|
+
import { A as AnalyzeTracesInput, B as CaptureFetchContext, C as inferDomainKeywords, D as planTraceInsightQuestions, E as isTraceInsightEvidence, F as OTEL_AGENT_EVAL_SCOPE, G as SseUsageMode, H as captureFetchToRawSink, I as OtlpExport, J as extractUsageFromSse, K as extractUsage, L as OtlpResourceSpans, M as AnalyzeTracesResult, N as analyzeTraces, O as scoreTraceInsightReadiness, P as OtlpFlatLine, R as OtlpSpan, S as domainEvidencePattern, T as isTraceInsightAttribution, U as ExtractUsageFromSseOptions, V as CaptureFetchOptions, W as ExtractedUsage, _ as TraceInsightTask, a as ToolSpansToTraceAnalysisStoreOptions, b as defaultTraceInsightPanel, c as TraceInsightContext, d as TraceInsightPanelRole, f as TraceInsightPromptInput, g as TraceInsightSuite, h as TraceInsightReadiness, i as OtlpFileTraceStoreOptions, j as AnalyzeTracesOptions, k as tokenizeDomainWords, l as TraceInsightEvidence, m as TraceInsightQuestion, n as toolSpansToTraceAnalysisStore, o as otlpTextToTraceAnalysisStore, p as TraceInsightQualityGate, q as extractUsageFromResponse, r as OtlpFileTraceStore, s as TraceInsightAttribution, t as ToolTraceMissingError, u as TraceInsightFinding, v as buildTraceInsightContext, w as isTraceInsightArtifact, x as describeTraceInsightScope, y as buildTraceInsightPrompt, z as exportRunAsOtlp } from "./store-tool-spans-ByLdU26j.js";
|
|
12
12
|
import { a as RunIntegrityReport, i as RunIntegrityIssueCode, n as RunIntegrityExpectations, o as assertRunCaptured, r as RunIntegrityIssue, s as throwIfRunIncomplete, t as RunIntegrityError } from "./integrity-CaeNeusS.js";
|
|
13
13
|
import { a as groupBy, c as judgeSpans, d as runMetricExtractor, f as runsForScenario, i as argHash, l as llmSpans, n as RunMetric, o as hasCapturedToolArgs, p as toolSpans, r as aggregateLlm, s as isRunMetric, t as RUN_METRICS, u as runFailureClass } from "./query-DBUQhehH.js";
|
|
14
|
+
import { SpanKind as SpanKind$1 } from "@tangle-network/agent-trace-contract";
|
|
14
15
|
//#region src/trace-analyst/errors.d.ts
|
|
15
16
|
/** Invalid trace-tool arguments, including malformed filters and regexes. */
|
|
16
17
|
declare class TraceAnalysisValidationError extends ValidationError {
|
|
@@ -63,21 +64,13 @@ declare class SpanNotFoundError extends NotFoundError {
|
|
|
63
64
|
//#endregion
|
|
64
65
|
//#region src/trace/otlp-attributes.d.ts
|
|
65
66
|
type ToolSpanOtlpInput = Pick<ToolSpan, 'toolName' | 'args' | 'argsCaptured' | 'result' | 'latencyMs'>;
|
|
66
|
-
|
|
67
|
-
interface OtlpSpanRoleInput {
|
|
68
|
-
name: string;
|
|
69
|
-
attributes: Record<string, unknown>;
|
|
70
|
-
kind?: string | null;
|
|
71
|
-
}
|
|
67
|
+
declare function applyToolSpanOtlpAttributes(attributes: Record<string, unknown>, span: ToolSpanOtlpInput): void;
|
|
72
68
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
69
|
+
* The contract kind this package writes for one of its own span kinds. A kind
|
|
70
|
+
* with no contract equivalent is written as `UNKNOWN`, which the contract
|
|
71
|
+
* accepts, rather than a word no reader knows.
|
|
76
72
|
*/
|
|
77
|
-
declare function
|
|
78
|
-
declare function isOtlpModelCall(input: OtlpSpanRoleInput): boolean;
|
|
79
|
-
declare function applyToolSpanOtlpAttributes(attributes: Record<string, unknown>, span: ToolSpanOtlpInput): void;
|
|
80
|
-
declare function traceSpanKindToOpenInferenceKind(kind: string): string;
|
|
73
|
+
declare function traceSpanKindToOpenInferenceKind(kind: string): SpanKind$1;
|
|
81
74
|
//#endregion
|
|
82
75
|
//#region src/trace/store-to-otlp.d.ts
|
|
83
76
|
interface TracesToOtlpResult {
|
|
@@ -336,5 +329,5 @@ declare function otlpRowsToTraceRunRecords(rows: Iterable<object>, opts: OtlpToR
|
|
|
336
329
|
declare const TRACE_ANALYST_ACTOR_DESCRIPTION = "Answer the question by inspecting the OTLP trace dataset with the available tools.\n\n1. Call getDatasetOverview first. Use its real trace ids and dataset size to plan the investigation.\n2. Narrow with queryTraces and countTraces before scanning large payloads.\n3. For a small trace, use viewTrace. For a large trace, use searchTrace and then viewSpans or searchSpan.\n4. Never invent a trace id, span id, tool result, error, frequency, or final outcome.\n5. When a search reports has_more, refine the query before drawing a conclusion.\n6. Use llm_query only over evidence already loaded. A recursive query cannot inspect traces itself.\n7. Cite exact evidence URIs returned by the tools. Include a short exact excerpt when it supports the claim.\n8. Return no finding when the available evidence cannot support one.\n\nThe prose answer must directly answer the question and state important uncertainty.\nThe findings array contains only actionable or decision-relevant claims supported by inspected evidence.";
|
|
337
330
|
declare const TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION = "trace-analyst-research-v1-2026-07-30";
|
|
338
331
|
//#endregion
|
|
339
|
-
export { type AnalyzeTracesInput, type AnalyzeTracesOptions, type AnalyzeTracesResult, Artifact, AssessOptions, type BoundedTraceAnalysisStoreOptions, BudgetLedgerEntry, BudgetSpec, type BuildTraceAnalysisToolsOptions, CaptureErrorHandler, CaptureFetchContext, CaptureFetchOptions, CaptureWrite, DEFAULT_TRACE_ANALYST_BUDGETS, type DatasetOverview, type ErrorCluster, EventFilter, EventKind, ExtractUsageFromSseOptions, ExtractedUsage, FAILURE_CLASSES, FailureClass, FileSystemRawProviderSink, FileSystemRawProviderSinkOptions, FileSystemTraceStore, FileSystemTraceStoreOptions, type FlattenOtlpOptions, GenericSpan, INPUT_VALUE, InMemoryRawProviderSink, InMemoryRawProviderSinkOptions, InMemoryTraceStore, JudgeSpan, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, LlmSpan, LlmSpanOtlpInput, Message, NoopRawProviderSink, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OUTPUT_VALUE, OtlpExport, OtlpFileTraceStore, type OtlpFileTraceStoreOptions, type OtlpFlatLine, OtlpResourceSpans, OtlpSpan,
|
|
332
|
+
export { type AnalyzeTracesInput, type AnalyzeTracesOptions, type AnalyzeTracesResult, Artifact, AssessOptions, type BoundedTraceAnalysisStoreOptions, BudgetLedgerEntry, BudgetSpec, type BuildTraceAnalysisToolsOptions, CaptureErrorHandler, CaptureFetchContext, CaptureFetchOptions, CaptureWrite, DEFAULT_TRACE_ANALYST_BUDGETS, type DatasetOverview, type ErrorCluster, EventFilter, EventKind, ExtractUsageFromSseOptions, ExtractedUsage, FAILURE_CLASSES, FailureClass, FileSystemRawProviderSink, FileSystemRawProviderSinkOptions, FileSystemTraceStore, FileSystemTraceStoreOptions, type FlattenOtlpOptions, GenericSpan, INPUT_VALUE, InMemoryRawProviderSink, InMemoryRawProviderSinkOptions, InMemoryTraceStore, JudgeSpan, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, LlmSpan, LlmSpanOtlpInput, Message, NoopRawProviderSink, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OUTPUT_VALUE, OtlpExport, OtlpFileTraceStore, type OtlpFileTraceStoreOptions, type OtlpFlatLine, OtlpResourceSpans, OtlpSpan, type OtlpToRunRecordsOptions, type OtlpTraceRunRecord, type ProjectedOtlpSpan, ProviderRedactor, type QueryTracesPage, REDACTION_PROFILES, REDACTION_VERSION, RUN_COST_ATTR_KEYS, RUN_METRICS, RawProviderDirection, RawProviderEvent, RawProviderSink, RawProviderSinkFilter, type ReadSpanSourceInput, type ReadSpanSourceResult, RedactOptions, RedactionFinding, RedactionProfile, RedactionReport, RetrievalSpan, Run, RunCaptureReport, RunCompleteHook, RunCompleteHookContext, RunFilter, RunIntegrityError, RunIntegrityExpectations, RunIntegrityIssue, RunIntegrityIssueCode, RunIntegrityReport, RunLayer, RunMetric, RunOutcome, RunStatus, SPAN_KIND_ATTR_KEYS, SafetyCategory, SandboxSpan, type SearchSpanResult, type SearchTraceResult, ShareSafetyFinding, ShareSafetyStatus, ShareSafetyVerdict, Span, SpanBase, SpanFilter, SpanHandle, SpanKind, type SpanMatchRecord, SpanNotFoundError, type SpanSourceReader, SpanStatus, SseUsageMode, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYSIS_LIMITS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_TOOL_NAMESPACE, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, TRACE_SCHEMA_VERSION, ToolSpan, ToolSpanOtlpInput, type ToolSpansToTraceAnalysisStoreOptions, ToolTraceMissingError, type TraceAggregate, TraceAnalysisLimitError, type TraceAnalysisStore, type TraceAnalysisStoreContext, TraceAnalysisStoreContractError, type TraceAnalysisToolDescriptor, TraceAnalysisValidationError, type TraceAnalystByteBudgets, type TraceAnalystFilters, type TraceAnalystHookOptions, type TraceAnalystSpan, type TraceAnalystSpanKind, type TraceAnalystSpanStatus, type TraceAnalystTraceSummary, TraceEmitter, TraceEmitterOptions, TraceEvent, TraceFileMalformedError, TraceFileMissingError, TraceFileTooLargeError, type TraceInsightAttribution, type TraceInsightContext, type TraceInsightEvidence, type TraceInsightFinding, type TraceInsightPanelRole, type TraceInsightPromptInput, type TraceInsightQualityGate, type TraceInsightQuestion, type TraceInsightReadiness, type TraceInsightSuite, type TraceInsightTask, TraceNotFoundError, TraceStore, TraceStoreSource, TraceStoreToOtlpOptions, TracesToOtlpResult, UNTRUSTED_TRACE_TEXT, type ViewSpansResult, type ViewTraceOversized, type ViewTraceResult, aggregateLlm, analyzeTraces, applyLlmSpanOtlpAttributes, applyToolSpanOtlpAttributes, argHash, asNumber, asString, assertRunCaptured, assessShareSafety, buildTraceAnalysisToolDescriptors, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, classifyKey, combineVerdicts, contextInputTokens, convertTraceStoresToOtlp, createBoundedTraceAnalysisStore, defaultProviderRedactor, defaultTraceInsightPanel, describeTraceInsightScope, detectCredential, detectPersonalData, domainEvidencePattern, emptyRedactionReport, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, groupBy, hasCapturedToolArgs, inferDomainKeywords, isJudgeSpan, isLlmSpan, isRunMetric, isToolSpan, isTraceInsightArtifact, isTraceInsightAttribution, isTraceInsightEvidence, judgeSpans, llmSpans, normalizeKey, otlpRowsToRunRecords, otlpRowsToTraceRunRecords, otlpTextToTraceAnalysisStore, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, providerFromBaseUrl, redact, redactForShare, redactText, runFailureClass, runMetricExtractor, runsForScenario, scoreTraceInsightReadiness, shareAllowed, stringField, throwIfRunIncomplete, tokenizeDomainWords, toolSpans, toolSpansToTraceAnalysisStore, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind };
|
|
340
333
|
//# sourceMappingURL=traces.d.ts.map
|
package/dist/traces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traces.d.ts","names":[],"sources":["../src/trace-analyst/errors.ts","../src/trace/otlp-attributes.ts","../src/trace/store-to-otlp.ts","../src/trace-analyst/hook.ts","../src/trace-analyst/otlp-flatten.ts","../src/trace-analyst/otlp-span.ts","../src/trace-analyst/otlp-to-run-records.ts","../src/trace-analyst/prompts.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"traces.d.ts","names":[],"sources":["../src/trace-analyst/errors.ts","../src/trace/otlp-attributes.ts","../src/trace/store-to-otlp.ts","../src/trace-analyst/hook.ts","../src/trace-analyst/otlp-flatten.ts","../src/trace-analyst/otlp-span.ts","../src/trace-analyst/otlp-to-run-records.ts","../src/trace-analyst/prompts.ts"],"mappings":";;;;;;;;;;;;;;;;cASa,qCAAqC;WAC/B;;;cAIN,gCAAgC;WAC1B;WACR;WACA;WACA;EAET,YAAY,mBAAmB,gBAAgB,eAAe;;;cASnD,wCAAwC;WAClC;WACR;EAET,YAAY,mBAAmB,iBAAiB;IAAY;;;cAMjD,8BAA8B;WACxB;WACR;EAET,YAAY;;cAMD,+BAA+B;WACjC;WACA;WACA;EAET,YAAY,cAAc,oBAAoB;;cAcnC,gCAAgC;WAClC;WACA;WACA;EAET,YAAY,cAAc,qBAAqB,qBAAqB;;cAQzD,2BAA2B;WACrB;WACR;EAET,YAAY;;cAMD,0BAA0B;WACpB;WACR;WACA;EAET,YAAY,kBAAkB;;;;KC1EpB,oBAAoB,KAC9B;iBAkBc,4BACd,YAAY,yBACZ,MAAM;;;;;;iBAWQ,iCAAiC,eAAe;;;UCjB/C;;EAEf;;EAEA;;EAEA;;;EAGA;;;;;;;;;;;;UAae;;EAEf;;EAEA;;EAEA;;;;UAKe;;;EAGf;;;EAGA,sBAAsB,KAAK,QAAQ;;EAEnC,iBAAiB,KAAK,QAAQ;;;;;;;;;;;iBAYhB,yBACd,iBAAiB,4BAA4B,oBAC7C,iBACA,OAAM,0BACL;;;UCxEc;;;;;;EAMf,SAAS,KAAK;IAAoC,SAAS;;;;;;;EAM3D;;;;;;EAMA,QAAQ,QAAQ,qBAAqB,KAAK,2BAA2B;;;;;EAKrE,aAAa,KAAK;;;;;;EAMlB,UAAU,QAAQ,qBAAqB,KAAK;;iBAM9B,0BAA0B,MAAM,0BAA0B;;;UCnCzD;;;;EAIf;;EAEA,UAAU,QAAQ;;iBA+DJ,0BACd,YAAY,YACZ,OAAM,qBACL;;;;;;;;;UC7Dc;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;;EAEA,YAAY;;;;;;iBAOE,oBAAoB,KAAK,0BAA0B;;;;;;iBA2FnD,sBAAsB,KAAK,0BAA0B;iBAoBrD,YAAY,KAAK,yBAAyB;iBAK1C,SAAS;;iBAKT,gBACd,OAAO,yBACP;;;UChHe;;EAEf;;;EAGA;;;EAGA,WAAW;;EAEX;;EAEA;;EAEA;;EAEA;;;;;;;EAOA;;;;;;EAMA;;;;;;;;;EASA,wBAAwB;;;;;;;;;EASxB,iBAAiB,eAAe,MAAM;;;;;EAKtC,yBAAyB,kBAAkB;;;;;;UAO5B;EACf,QAAQ;;EAER;;EAEA;;;UAIe;EACf;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;;EAEZ;EACA;EACA;EACA;EACA;;EAEA,iBAAiB;;;;;;;iBAeH,iBAAiB,mBAAmB,MAAM,0BAA0B;;;;;;iBASpE,qBACd,MAAM,kBACN,MAAM,0BACL;;iBAKa,sBACd,mBACA,MAAM,0BACL;;iBAQa,0BACd,MAAM,kBACN,MAAM,0BACL;;;;cC5MU;cAcA"}
|
package/dist/traces.js
CHANGED
|
@@ -3,18 +3,19 @@ import { a as hasCapturedToolArgs, c as llmSpans, d as runsForScenario, f as too
|
|
|
3
3
|
import { i as modelHasSnapshot, u as validateRunRecord } from "./run-record-BRlM99rX.js";
|
|
4
4
|
import { a as combineVerdicts, c as emptyRedactionReport, d as redactForShare, f as redactText, i as classifyKey, l as normalizeKey, n as REDACTION_VERSION, o as detectCredential, p as shareAllowed, r as assessShareSafety, s as detectPersonalData, t as REDACTION_PROFILES, u as redact } from "./redact-B7rt9Zot.js";
|
|
5
5
|
import { t as TraceEmitter } from "./emitter-DbMXUIVP.js";
|
|
6
|
-
import { A as spanEpochMillis, C as TraceFileTooLargeError, D as extractOtlpAttributes, E as compareSpanTime, O as firstStringAttr, S as TraceFileMissingError, T as asString, _ as SpanNotFoundError, a as TRACE_ANALYST_TOOL_NAMESPACE, b as TraceAnalysisValidationError, c as traceAnalystFunctionGroup, g as TRACE_ANALYSIS_LIMITS, h as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, j as stringField, k as projectOtlpFlatLine, m as DEFAULT_TRACE_ANALYST_BUDGETS, o as UNTRUSTED_TRACE_TEXT, s as buildTraceAnalysisToolDescriptors, u as createBoundedTraceAnalysisStore, v as TraceAnalysisLimitError, w as TraceNotFoundError, x as TraceFileMalformedError, y as TraceAnalysisStoreContractError } from "./kind-factory-
|
|
6
|
+
import { A as spanEpochMillis, C as TraceFileTooLargeError, D as extractOtlpAttributes, E as compareSpanTime, O as firstStringAttr, S as TraceFileMissingError, T as asString, _ as SpanNotFoundError, a as TRACE_ANALYST_TOOL_NAMESPACE, b as TraceAnalysisValidationError, c as traceAnalystFunctionGroup, g as TRACE_ANALYSIS_LIMITS, h as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, j as stringField, k as projectOtlpFlatLine, m as DEFAULT_TRACE_ANALYST_BUDGETS, o as UNTRUSTED_TRACE_TEXT, s as buildTraceAnalysisToolDescriptors, u as createBoundedTraceAnalysisStore, v as TraceAnalysisLimitError, w as TraceNotFoundError, x as TraceFileMalformedError, y as TraceAnalysisStoreContractError } from "./kind-factory-CdPPHtGZ.js";
|
|
7
7
|
import { INPUT_VALUE, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, OPENINFERENCE_SPAN_KIND, OUTPUT_VALUE, RUN_COST_ATTR_KEYS, SPAN_KIND_ATTR_KEYS, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS, applyLlmSpanOtlpAttributes, asNumber, contextInputTokens, firstNumberAttr } from "./trace-attributes.js";
|
|
8
|
-
import { n as extractUsageFromResponse, r as extractUsageFromSse, t as extractUsage } from "./extract-usage-
|
|
8
|
+
import { n as extractUsageFromResponse, r as extractUsageFromSse, t as extractUsage } from "./extract-usage-DFATEuWW.js";
|
|
9
9
|
import { a as providerFromBaseUrl, i as defaultProviderRedactor, n as InMemoryRawProviderSink, r as NoopRawProviderSink, t as FileSystemRawProviderSink } from "./raw-provider-sink-DYh4Bszw.js";
|
|
10
|
-
import { C as spanIdForWire, S as exportRunAsOtlp, T as captureFetchToRawSink, _ as tokenizeDomainWords, a as spanStatusToOtlp, b as TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, c as defaultTraceInsightPanel, d as inferDomainKeywords, f as isTraceInsightArtifact, g as scoreTraceInsightReadiness, h as planTraceInsightQuestions, i as epochMillisToIso, l as describeTraceInsightScope, m as isTraceInsightEvidence, n as toolSpansToTraceAnalysisStore, o as buildTraceInsightContext, p as isTraceInsightAttribution, r as createOtlpFlatLine, s as buildTraceInsightPrompt, t as ToolTraceMissingError, u as domainEvidencePattern, v as analyzeTraces, w as traceIdForWire, x as OTEL_AGENT_EVAL_SCOPE, y as TRACE_ANALYST_ACTOR_DESCRIPTION } from "./store-tool-spans-
|
|
10
|
+
import { C as spanIdForWire, S as exportRunAsOtlp, T as captureFetchToRawSink, _ as tokenizeDomainWords, a as spanStatusToOtlp, b as TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, c as defaultTraceInsightPanel, d as inferDomainKeywords, f as isTraceInsightArtifact, g as scoreTraceInsightReadiness, h as planTraceInsightQuestions, i as epochMillisToIso, l as describeTraceInsightScope, m as isTraceInsightEvidence, n as toolSpansToTraceAnalysisStore, o as buildTraceInsightContext, p as isTraceInsightAttribution, r as createOtlpFlatLine, s as buildTraceInsightPrompt, t as ToolTraceMissingError, u as domainEvidencePattern, v as analyzeTraces, w as traceIdForWire, x as OTEL_AGENT_EVAL_SCOPE, y as TRACE_ANALYST_ACTOR_DESCRIPTION } from "./store-tool-spans-BcC_5ef-.js";
|
|
11
11
|
import { n as assertRunCaptured, r as throwIfRunIncomplete, t as RunIntegrityError } from "./integrity-BFP4kjGj.js";
|
|
12
|
-
import {
|
|
12
|
+
import { n as traceSpanKindToOpenInferenceKind, t as applyToolSpanOtlpAttributes } from "./otlp-attributes-D9ptWaIJ.js";
|
|
13
13
|
import { n as InMemoryTraceStore, t as FileSystemTraceStore } from "./store-DNe_Uv1Q.js";
|
|
14
|
-
import { i as otlpTextToTraceAnalysisStore, n as OtlpFileTraceStore } from "./store-otlp-
|
|
15
|
-
import { i as summarizeTraceErrors, n as recordAggregateMeasurements, r as summarizeExecutionMeasurements, t as readTaskFailureLabels } from "./task-failure-attributes-
|
|
14
|
+
import { i as otlpTextToTraceAnalysisStore, n as OtlpFileTraceStore } from "./store-otlp-BPowgPm6.js";
|
|
15
|
+
import { i as summarizeTraceErrors, n as recordAggregateMeasurements, r as summarizeExecutionMeasurements, t as readTaskFailureLabels } from "./task-failure-attributes-CEqEfuIY.js";
|
|
16
16
|
import { readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
17
17
|
import { join } from "node:path";
|
|
18
|
+
import { resolveSpanKind } from "@tangle-network/agent-trace-contract";
|
|
18
19
|
//#region src/trace/store-to-otlp.ts
|
|
19
20
|
/**
|
|
20
21
|
* Convert agent-eval's internal trace shape (`FileSystemTraceStore` → `Run`,
|
|
@@ -389,7 +390,7 @@ function applyOpenInference(attrs) {
|
|
|
389
390
|
if ("llm.output_tokens" in attrs && !("llm.token_count.completion" in attrs)) attrs[LLM_OUTPUT_TOKENS] = attrs["llm.output_tokens"];
|
|
390
391
|
if ("inference.llm.output_tokens" in attrs && !("llm.token_count.completion" in attrs)) attrs[LLM_OUTPUT_TOKENS] = attrs["inference.llm.output_tokens"];
|
|
391
392
|
if ("tool.name" in attrs && !("inference.tool.name" in attrs)) attrs["inference.tool.name"] = attrs[TOOL_NAME];
|
|
392
|
-
if ("span.kind" in attrs && !(
|
|
393
|
+
if ("span.kind" in attrs && !(OPENINFERENCE_SPAN_KIND in attrs)) attrs[OPENINFERENCE_SPAN_KIND] = String(attrs["span.kind"]).toUpperCase();
|
|
393
394
|
}
|
|
394
395
|
function flattenOtlpExportToNdjson(otlpExport, opts = {}) {
|
|
395
396
|
const vocab = opts.attributeVocabulary ?? "openinference";
|
|
@@ -619,12 +620,7 @@ function aggregateTrace(traceId, spans, fallbackModel) {
|
|
|
619
620
|
id: span.span_id,
|
|
620
621
|
...span.parent_span_id ? { parentId: span.parent_span_id } : {},
|
|
621
622
|
attributes: span.attributes,
|
|
622
|
-
|
|
623
|
-
kind: span.kind,
|
|
624
|
-
name: span.name,
|
|
625
|
-
attributes: span.attributes
|
|
626
|
-
}),
|
|
627
|
-
aggregate: span.kind !== "LLM" && span.kind !== "UNKNOWN"
|
|
623
|
+
kind: errorRoleForProjectedSpan(span)
|
|
628
624
|
})));
|
|
629
625
|
let toolSpanCount = 0;
|
|
630
626
|
let agentSpanCount = 0;
|
|
@@ -704,9 +700,13 @@ function isTerminalRootCandidate(span) {
|
|
|
704
700
|
const role = errorRoleForProjectedSpan(span);
|
|
705
701
|
return role !== "LLM" && role !== "TOOL" && role !== "EVALUATOR" && role !== "GUARDRAIL";
|
|
706
702
|
}
|
|
703
|
+
/**
|
|
704
|
+
* The contract classifier over the span's own attributes. `span.kind` is not
|
|
705
|
+
* passed: the projection spells an undeclared span `UNKNOWN`, which the contract
|
|
706
|
+
* would read as a declaration and never infer past.
|
|
707
|
+
*/
|
|
707
708
|
function errorRoleForProjectedSpan(span) {
|
|
708
|
-
return
|
|
709
|
-
kind: span.kind,
|
|
709
|
+
return resolveSpanKind({
|
|
710
710
|
name: span.name,
|
|
711
711
|
attributes: span.attributes
|
|
712
712
|
});
|
|
@@ -801,6 +801,6 @@ function ensureSnapshot(model, fallbackModel) {
|
|
|
801
801
|
return `${model}${fallbackModel.includes("@") ? fallbackModel.slice(fallbackModel.indexOf("@")) : "@otlp"}`;
|
|
802
802
|
}
|
|
803
803
|
//#endregion
|
|
804
|
-
export { DEFAULT_TRACE_ANALYST_BUDGETS, FAILURE_CLASSES, FileSystemRawProviderSink, FileSystemTraceStore, INPUT_VALUE, InMemoryRawProviderSink, InMemoryTraceStore, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, NoopRawProviderSink, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OUTPUT_VALUE, OtlpFileTraceStore, REDACTION_PROFILES, REDACTION_VERSION, RUN_COST_ATTR_KEYS, RUN_METRICS, RunIntegrityError, SPAN_KIND_ATTR_KEYS, SpanNotFoundError, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYSIS_LIMITS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_TOOL_NAMESPACE, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, TRACE_SCHEMA_VERSION, ToolTraceMissingError, TraceAnalysisLimitError, TraceAnalysisStoreContractError, TraceAnalysisValidationError, TraceEmitter, TraceFileMalformedError, TraceFileMissingError, TraceFileTooLargeError, TraceNotFoundError, UNTRUSTED_TRACE_TEXT, aggregateLlm, analyzeTraces, applyLlmSpanOtlpAttributes, applyToolSpanOtlpAttributes, argHash, asNumber, asString, assertRunCaptured, assessShareSafety, buildTraceAnalysisToolDescriptors, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, classifyKey,
|
|
804
|
+
export { DEFAULT_TRACE_ANALYST_BUDGETS, FAILURE_CLASSES, FileSystemRawProviderSink, FileSystemTraceStore, INPUT_VALUE, InMemoryRawProviderSink, InMemoryTraceStore, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, NoopRawProviderSink, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OUTPUT_VALUE, OtlpFileTraceStore, REDACTION_PROFILES, REDACTION_VERSION, RUN_COST_ATTR_KEYS, RUN_METRICS, RunIntegrityError, SPAN_KIND_ATTR_KEYS, SpanNotFoundError, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYSIS_LIMITS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_TOOL_NAMESPACE, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, TRACE_SCHEMA_VERSION, ToolTraceMissingError, TraceAnalysisLimitError, TraceAnalysisStoreContractError, TraceAnalysisValidationError, TraceEmitter, TraceFileMalformedError, TraceFileMissingError, TraceFileTooLargeError, TraceNotFoundError, UNTRUSTED_TRACE_TEXT, aggregateLlm, analyzeTraces, applyLlmSpanOtlpAttributes, applyToolSpanOtlpAttributes, argHash, asNumber, asString, assertRunCaptured, assessShareSafety, buildTraceAnalysisToolDescriptors, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, classifyKey, combineVerdicts, contextInputTokens, convertTraceStoresToOtlp, createBoundedTraceAnalysisStore, defaultProviderRedactor, defaultTraceInsightPanel, describeTraceInsightScope, detectCredential, detectPersonalData, domainEvidencePattern, emptyRedactionReport, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, groupBy, hasCapturedToolArgs, inferDomainKeywords, isJudgeSpan, isLlmSpan, isRunMetric, isToolSpan, isTraceInsightArtifact, isTraceInsightAttribution, isTraceInsightEvidence, judgeSpans, llmSpans, normalizeKey, otlpRowsToRunRecords, otlpRowsToTraceRunRecords, otlpTextToTraceAnalysisStore, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, providerFromBaseUrl, redact, redactForShare, redactText, runFailureClass, runMetricExtractor, runsForScenario, scoreTraceInsightReadiness, shareAllowed, stringField, throwIfRunIncomplete, tokenizeDomainWords, toolSpans, toolSpansToTraceAnalysisStore, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind };
|
|
805
805
|
|
|
806
806
|
//# sourceMappingURL=traces.js.map
|