@tangle-network/agent-eval 0.118.1 → 0.118.2
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 +7 -0
- package/dist/analyst/index.d.ts +10 -3
- package/dist/analyst/index.js +6 -6
- package/dist/benchmarks/index.js +9 -9
- package/dist/campaign/index.d.ts +22 -15
- package/dist/campaign/index.js +8 -8
- package/dist/{chunk-3EHHMC6E.js → chunk-63KG3ASG.js} +2 -2
- package/dist/{chunk-FTUMG2U7.js → chunk-6JQE3YVE.js} +10 -39
- package/dist/chunk-6JQE3YVE.js.map +1 -0
- package/dist/{chunk-SVH2ANFD.js → chunk-7V3QDWNL.js} +2 -2
- package/dist/{chunk-QKEGNI5B.js → chunk-BUBU3YHT.js} +2 -2
- package/dist/{chunk-BFW56GTT.js → chunk-DRSFTBKU.js} +3 -3
- package/dist/{chunk-BFW56GTT.js.map → chunk-DRSFTBKU.js.map} +1 -1
- package/dist/{chunk-OIIMMLRB.js → chunk-DZBCDDIE.js} +3 -3
- package/dist/chunk-DZBCDDIE.js.map +1 -0
- package/dist/{chunk-IDZTTFRR.js → chunk-EGNRE7VA.js} +2 -2
- package/dist/chunk-EGNRE7VA.js.map +1 -0
- package/dist/{chunk-Q442S5AS.js → chunk-GCT3DQWU.js} +7 -7
- package/dist/chunk-GCT3DQWU.js.map +1 -0
- package/dist/{chunk-YLMUS4MM.js → chunk-I42AAGHL.js} +5 -5
- package/dist/chunk-I42AAGHL.js.map +1 -0
- package/dist/{chunk-33JA4TFA.js → chunk-J23QK2U5.js} +8 -3
- package/dist/chunk-J23QK2U5.js.map +1 -0
- package/dist/{chunk-LTVG32KX.js → chunk-JTMFT5QZ.js} +2 -2
- package/dist/chunk-JTMFT5QZ.js.map +1 -0
- package/dist/{chunk-JSDVRFAP.js → chunk-KK2O4VWA.js} +2 -2
- package/dist/{chunk-VCTY3W6J.js → chunk-MLHRFWQK.js} +1 -1
- package/dist/chunk-MLHRFWQK.js.map +1 -0
- package/dist/chunk-NW4AQBXD.js +53 -0
- package/dist/chunk-NW4AQBXD.js.map +1 -0
- package/dist/{chunk-KSDQVPLR.js → chunk-TVXPJJ7H.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/contract/index.d.ts +17 -10
- package/dist/contract/index.js +9 -9
- package/dist/contract/index.js.map +1 -1
- package/dist/fuzz.d.ts +8 -1
- package/dist/fuzz.js +1 -1
- package/dist/fuzz.js.map +1 -1
- package/dist/index.d.ts +44 -17
- package/dist/index.js +21 -15
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{run-campaign-IM26A6PD.js → run-campaign-DWC67KJP.js} +3 -3
- package/dist/trace-attributes.d.ts +21 -1
- package/dist/trace-attributes.js +9 -3
- package/dist/traces.d.ts +21 -1
- package/dist/traces.js +12 -6
- package/dist/wire/index.d.ts +8 -1
- package/dist/wire/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-33JA4TFA.js.map +0 -1
- package/dist/chunk-FTUMG2U7.js.map +0 -1
- package/dist/chunk-IDZTTFRR.js.map +0 -1
- package/dist/chunk-LTVG32KX.js.map +0 -1
- package/dist/chunk-OIIMMLRB.js.map +0 -1
- package/dist/chunk-Q442S5AS.js.map +0 -1
- package/dist/chunk-VCTY3W6J.js.map +0 -1
- package/dist/chunk-WDHBCA3M.js +0 -31
- package/dist/chunk-WDHBCA3M.js.map +0 -1
- package/dist/chunk-YLMUS4MM.js.map +0 -1
- /package/dist/{chunk-3EHHMC6E.js.map → chunk-63KG3ASG.js.map} +0 -0
- /package/dist/{chunk-SVH2ANFD.js.map → chunk-7V3QDWNL.js.map} +0 -0
- /package/dist/{chunk-QKEGNI5B.js.map → chunk-BUBU3YHT.js.map} +0 -0
- /package/dist/{chunk-JSDVRFAP.js.map → chunk-KK2O4VWA.js.map} +0 -0
- /package/dist/{chunk-KSDQVPLR.js.map → chunk-TVXPJJ7H.js.map} +0 -0
- /package/dist/{run-campaign-IM26A6PD.js.map → run-campaign-DWC67KJP.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to `@tangle-network/agent-eval` and its sibling `agent-eval-
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [0.118.2] — 2026-07-13 — interoperable contracts and trace accounting
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Every caller-supplied cost-ledger API now uses the public structural `CostLedgerHandle`, so types remain assignable when TypeScript resolves them through separate package entrypoints.
|
|
12
|
+
- Trace writers emit an exact context-input total from known non-overlapping input and cache categories; behavioral analysis uses that value and leaves ambiguous third-party prompt totals unchanged.
|
|
13
|
+
|
|
7
14
|
## [0.118.1] — 2026-07-13 — parsed OTLP intake
|
|
8
15
|
|
|
9
16
|
### Added
|
package/dist/analyst/index.d.ts
CHANGED
|
@@ -939,6 +939,13 @@ declare class CostLedger {
|
|
|
939
939
|
private ensureCostLimitPersisted;
|
|
940
940
|
private appendEvent;
|
|
941
941
|
}
|
|
942
|
+
/** Public callback surface for a shared cost ledger.
|
|
943
|
+
*
|
|
944
|
+
* Declaration bundles may expose this type through multiple package subpaths.
|
|
945
|
+
* Keeping callback contracts structural lets those subpaths compose while the
|
|
946
|
+
* concrete {@link CostLedger} retains its private durable state.
|
|
947
|
+
*/
|
|
948
|
+
type CostLedgerHandle = Pick<CostLedger, keyof CostLedger>;
|
|
942
949
|
|
|
943
950
|
/**
|
|
944
951
|
* LLM client with graceful degrade.
|
|
@@ -1181,7 +1188,7 @@ interface SemanticConceptJudgeOptions {
|
|
|
1181
1188
|
maxHtmlChars?: number;
|
|
1182
1189
|
/** LlmClient config (baseUrl, apiKey, authHeader, …). */
|
|
1183
1190
|
llm?: LlmClientOptions;
|
|
1184
|
-
costLedger?:
|
|
1191
|
+
costLedger?: CostLedgerHandle;
|
|
1185
1192
|
costPhase?: string;
|
|
1186
1193
|
signal?: AbortSignal;
|
|
1187
1194
|
/**
|
|
@@ -1256,7 +1263,7 @@ interface JudgeInput {
|
|
|
1256
1263
|
turns: TurnResult[];
|
|
1257
1264
|
artifacts: CollectedArtifacts;
|
|
1258
1265
|
/** Shared ledger for paid built-in judges. Direct calls default to an uncapped ledger. */
|
|
1259
|
-
costLedger?:
|
|
1266
|
+
costLedger?: CostLedgerHandle;
|
|
1260
1267
|
costPhase?: string;
|
|
1261
1268
|
costTags?: Record<string, string>;
|
|
1262
1269
|
signal?: AbortSignal;
|
|
@@ -2941,7 +2948,7 @@ interface StructureFindingsOptions {
|
|
|
2941
2948
|
baseUrl: string;
|
|
2942
2949
|
apiKey?: string;
|
|
2943
2950
|
/** Optional ledger for direct use. */
|
|
2944
|
-
costLedger?:
|
|
2951
|
+
costLedger?: CostLedgerHandle;
|
|
2945
2952
|
costPhase?: string;
|
|
2946
2953
|
maxTokens?: number;
|
|
2947
2954
|
/** Max reask attempts after a zero/invalid extraction. Default 1. */
|
package/dist/analyst/index.js
CHANGED
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
diffFindings,
|
|
11
11
|
emitSkillUsageFindings,
|
|
12
12
|
runSemanticConceptJudge
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-DRSFTBKU.js";
|
|
14
14
|
import {
|
|
15
15
|
behavioralAnalyst,
|
|
16
16
|
buildDefaultAnalystRegistry,
|
|
17
17
|
createChatClient,
|
|
18
18
|
deriveEfficiencyFindings
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-J23QK2U5.js";
|
|
20
20
|
import "../chunk-HHWE3POT.js";
|
|
21
21
|
import "../chunk-3YYRZDON.js";
|
|
22
22
|
import {
|
|
@@ -65,16 +65,16 @@ import {
|
|
|
65
65
|
structureFindings,
|
|
66
66
|
validatePolicyEdit,
|
|
67
67
|
validatePolicyEditCandidateRecord
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-DZBCDDIE.js";
|
|
69
69
|
import "../chunk-NJC7U437.js";
|
|
70
|
-
import "../chunk-
|
|
70
|
+
import "../chunk-MLHRFWQK.js";
|
|
71
71
|
import "../chunk-VI2UW6B6.js";
|
|
72
|
-
import "../chunk-
|
|
72
|
+
import "../chunk-BUBU3YHT.js";
|
|
73
73
|
import "../chunk-PC4UYEBM.js";
|
|
74
74
|
import "../chunk-XJYR7XFV.js";
|
|
75
75
|
import "../chunk-VSMTAMNK.js";
|
|
76
76
|
import "../chunk-ONWEPEDO.js";
|
|
77
|
-
import "../chunk-
|
|
77
|
+
import "../chunk-NW4AQBXD.js";
|
|
78
78
|
import "../chunk-PZ5AY32C.js";
|
|
79
79
|
|
|
80
80
|
// src/analyst/adapters.ts
|
package/dist/benchmarks/index.js
CHANGED
|
@@ -16,27 +16,27 @@ import {
|
|
|
16
16
|
routing_exports,
|
|
17
17
|
runBenchmarkAdapter,
|
|
18
18
|
summarizeBenchmarkCampaign
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-KK2O4VWA.js";
|
|
20
|
+
import "../chunk-GCT3DQWU.js";
|
|
21
|
+
import "../chunk-I42AAGHL.js";
|
|
22
|
+
import "../chunk-EGNRE7VA.js";
|
|
23
23
|
import "../chunk-3YYRZDON.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-DZBCDDIE.js";
|
|
25
25
|
import "../chunk-ARU2PZFM.js";
|
|
26
26
|
import "../chunk-NJC7U437.js";
|
|
27
27
|
import "../chunk-PJQFMIOX.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-MLHRFWQK.js";
|
|
29
29
|
import "../chunk-VI2UW6B6.js";
|
|
30
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-63KG3ASG.js";
|
|
31
31
|
import "../chunk-GGE4NNQT.js";
|
|
32
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-BUBU3YHT.js";
|
|
33
33
|
import "../chunk-PC4UYEBM.js";
|
|
34
34
|
import "../chunk-S3UZOQ5Y.js";
|
|
35
35
|
import "../chunk-MA6HLL3S.js";
|
|
36
36
|
import "../chunk-XJYR7XFV.js";
|
|
37
37
|
import "../chunk-VSMTAMNK.js";
|
|
38
38
|
import "../chunk-ONWEPEDO.js";
|
|
39
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-NW4AQBXD.js";
|
|
40
40
|
import "../chunk-PZ5AY32C.js";
|
|
41
41
|
export {
|
|
42
42
|
BENCHMARK_SPLIT_SEED,
|
package/dist/campaign/index.d.ts
CHANGED
|
@@ -888,6 +888,13 @@ declare class CostLedger {
|
|
|
888
888
|
private ensureCostLimitPersisted;
|
|
889
889
|
private appendEvent;
|
|
890
890
|
}
|
|
891
|
+
/** Public callback surface for a shared cost ledger.
|
|
892
|
+
*
|
|
893
|
+
* Declaration bundles may expose this type through multiple package subpaths.
|
|
894
|
+
* Keeping callback contracts structural lets those subpaths compose while the
|
|
895
|
+
* concrete {@link CostLedger} retains its private durable state.
|
|
896
|
+
*/
|
|
897
|
+
type CostLedgerHandle = Pick<CostLedger, keyof CostLedger>;
|
|
891
898
|
|
|
892
899
|
/**
|
|
893
900
|
* RawProviderSink — first-class persistence for the actual HTTP-level
|
|
@@ -1469,7 +1476,7 @@ interface JudgeConfig<TArtifact, TScenario extends Scenario = Scenario> {
|
|
|
1469
1476
|
scenario: TScenario;
|
|
1470
1477
|
signal: AbortSignal;
|
|
1471
1478
|
/** Shared run spend account and receipt attribution phase. */
|
|
1472
|
-
costLedger?:
|
|
1479
|
+
costLedger?: CostLedgerHandle;
|
|
1473
1480
|
costPhase?: string;
|
|
1474
1481
|
costTags?: Record<string, string>;
|
|
1475
1482
|
}): JudgeScore | Promise<JudgeScore>;
|
|
@@ -1656,7 +1663,7 @@ interface ProposeContext<TFindings = unknown> {
|
|
|
1656
1663
|
* reflection may ignore it. See {@link ParetoParent}. */
|
|
1657
1664
|
paretoParents?: ParetoParent[];
|
|
1658
1665
|
/** Shared run spend account and receipt attribution phase. */
|
|
1659
|
-
costLedger?:
|
|
1666
|
+
costLedger?: CostLedgerHandle;
|
|
1660
1667
|
costPhase?: string;
|
|
1661
1668
|
/** FIREWALL (non-negotiable): the held-out judge is write-only — its verdicts
|
|
1662
1669
|
* score the chosen output and gate promotion, and are NEVER an input to
|
|
@@ -1740,7 +1747,7 @@ interface GateContext<TArtifact, TScenario extends Scenario> {
|
|
|
1740
1747
|
baseline: number;
|
|
1741
1748
|
};
|
|
1742
1749
|
/** Shared run spend account and receipt attribution phase. */
|
|
1743
|
-
costLedger?:
|
|
1750
|
+
costLedger?: CostLedgerHandle;
|
|
1744
1751
|
costPhase?: string;
|
|
1745
1752
|
signal: AbortSignal;
|
|
1746
1753
|
}
|
|
@@ -2064,7 +2071,7 @@ interface LlmJudgeOptions<TArtifact, TScenario extends Scenario = Scenario> {
|
|
|
2064
2071
|
scenario: TScenario;
|
|
2065
2072
|
}) => string;
|
|
2066
2073
|
/** Strict runtime contract; its JSON Schema is sent to the provider. */
|
|
2067
|
-
costLedger?:
|
|
2074
|
+
costLedger?: CostLedgerHandle;
|
|
2068
2075
|
responseSchema?: {
|
|
2069
2076
|
name: string;
|
|
2070
2077
|
schema: z.ZodObject;
|
|
@@ -2094,7 +2101,7 @@ interface ReferenceEquivalenceJudgeOptions {
|
|
|
2094
2101
|
/** Used only by the direct-call adapter. */
|
|
2095
2102
|
signal?: AbortSignal;
|
|
2096
2103
|
/** Optional receipt destination for direct calls; campaigns supply their own. */
|
|
2097
|
-
costLedger?:
|
|
2104
|
+
costLedger?: CostLedgerHandle;
|
|
2098
2105
|
}
|
|
2099
2106
|
/** Build the campaign-native expected-answer judge. */
|
|
2100
2107
|
declare function createReferenceEquivalenceJudge(options: ReferenceEquivalenceJudgeOptions): JudgeConfig<string, ReferenceEquivalenceScenario>;
|
|
@@ -2844,7 +2851,7 @@ interface RunCampaignOptions<TScenario extends Scenario, TArtifact> {
|
|
|
2844
2851
|
costCeiling?: number;
|
|
2845
2852
|
/** Shared spend account. Improvement loops pass one ledger through every
|
|
2846
2853
|
* campaign so the ceiling and returned total are run-wide. */
|
|
2847
|
-
costLedger?:
|
|
2854
|
+
costLedger?: CostLedgerHandle;
|
|
2848
2855
|
/** Attribution label for receipts recorded by this campaign. */
|
|
2849
2856
|
costPhase?: string;
|
|
2850
2857
|
/** Max concurrent cells. Default 2. */
|
|
@@ -4106,7 +4113,7 @@ interface RunOptimizationBaseOptions<TScenario extends Scenario, TArtifact> exte
|
|
|
4106
4113
|
}>;
|
|
4107
4114
|
history: GenerationRecord[];
|
|
4108
4115
|
/** Shared run spend account and receipt attribution phase. */
|
|
4109
|
-
costLedger?:
|
|
4116
|
+
costLedger?: CostLedgerHandle;
|
|
4110
4117
|
costPhase?: string;
|
|
4111
4118
|
}) => Promise<unknown[]>;
|
|
4112
4119
|
}
|
|
@@ -5148,14 +5155,14 @@ interface ProposePatchesArgs {
|
|
|
5148
5155
|
/** How many candidate patches to propose. */
|
|
5149
5156
|
count: number;
|
|
5150
5157
|
signal: AbortSignal;
|
|
5151
|
-
costLedger?:
|
|
5158
|
+
costLedger?: CostLedgerHandle;
|
|
5152
5159
|
costPhase?: string;
|
|
5153
5160
|
}
|
|
5154
5161
|
interface SkillOptProposerOptions {
|
|
5155
5162
|
llm: LlmClientOptions;
|
|
5156
5163
|
model: string;
|
|
5157
5164
|
/** Optional ledger for direct proposer use. Campaign context takes precedence. */
|
|
5158
|
-
costLedger?:
|
|
5165
|
+
costLedger?: CostLedgerHandle;
|
|
5159
5166
|
/** What the skill document governs — orients the prompt. */
|
|
5160
5167
|
target: string;
|
|
5161
5168
|
/** Default ops-per-patch cap when used as a bare `SurfaceProposer`. The
|
|
@@ -5444,7 +5451,7 @@ interface GepaProposerOptions {
|
|
|
5444
5451
|
/** Model that performs the reflection. */
|
|
5445
5452
|
model: string;
|
|
5446
5453
|
/** Optional ledger for direct proposer use. Campaign context takes precedence. */
|
|
5447
|
-
costLedger?:
|
|
5454
|
+
costLedger?: CostLedgerHandle;
|
|
5448
5455
|
/** What is being optimized — appears in the reflection prompt for orientation. */
|
|
5449
5456
|
target: string;
|
|
5450
5457
|
/** Surface-specific mutation levers offered to the model. */
|
|
@@ -5509,7 +5516,7 @@ interface HaloProposerOptions {
|
|
|
5509
5516
|
/** Model used to APPLY halo's findings to the prompt surface. Default = `model`. */
|
|
5510
5517
|
applyModel?: string;
|
|
5511
5518
|
/** Optional ledger for direct proposer use. Campaign context takes precedence. */
|
|
5512
|
-
costLedger?:
|
|
5519
|
+
costLedger?: CostLedgerHandle;
|
|
5513
5520
|
analysisMaximumCharge?: MaximumCharge;
|
|
5514
5521
|
analysisReceipt?: (report: string) => CostReceiptInput;
|
|
5515
5522
|
applyMaxTokens?: number;
|
|
@@ -5646,7 +5653,7 @@ interface LlmPolicyEditProposerOptions {
|
|
|
5646
5653
|
llm: LlmClientOptions;
|
|
5647
5654
|
model: string;
|
|
5648
5655
|
/** Optional ledger for direct proposer use. Campaign context takes precedence. */
|
|
5649
|
-
costLedger?:
|
|
5656
|
+
costLedger?: CostLedgerHandle;
|
|
5650
5657
|
/** Plain-language description of the JSON surface being improved. */
|
|
5651
5658
|
target: string;
|
|
5652
5659
|
/** PolicyEdit target surface every authored edit must retain. */
|
|
@@ -5721,7 +5728,7 @@ declare function projectPolicyEditHistory(history: readonly GenerationRecord[],
|
|
|
5721
5728
|
|
|
5722
5729
|
interface MemoryCurationProposerOptions {
|
|
5723
5730
|
/** Optional ledger for direct proposer use. Campaign context takes precedence. */
|
|
5724
|
-
costLedger?:
|
|
5731
|
+
costLedger?: CostLedgerHandle;
|
|
5725
5732
|
/** Top-K lessons retained in the surface memory block. Default 12. */
|
|
5726
5733
|
maxEntries?: number;
|
|
5727
5734
|
/** Heading rendered above the lessons inside the block. Default below. */
|
|
@@ -5931,7 +5938,7 @@ interface TraceAnalystProposerOptions {
|
|
|
5931
5938
|
* Keep this EQUAL to haloProposer's `applyModel` for an apples-to-apples run. */
|
|
5932
5939
|
applyModel?: string;
|
|
5933
5940
|
/** Optional ledger for direct proposer use. Campaign context takes precedence. */
|
|
5934
|
-
costLedger?:
|
|
5941
|
+
costLedger?: CostLedgerHandle;
|
|
5935
5942
|
analysisMaximumCharge?: MaximumCharge;
|
|
5936
5943
|
analysisReceipt?: (report: string) => CostReceiptInput;
|
|
5937
5944
|
applyMaxTokens?: number;
|
|
@@ -7314,4 +7321,4 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
|
|
|
7314
7321
|
* identity against the checkout at `worktreeRef`. */
|
|
7315
7322
|
declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
|
|
7316
7323
|
|
|
7317
|
-
export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignMeanComposite, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, defaultRenderDiff, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface };
|
|
7324
|
+
export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignMeanComposite, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, defaultRenderDiff, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface };
|
package/dist/campaign/index.js
CHANGED
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
userStoryScoreboard,
|
|
67
67
|
validateSearchLedgerEvent,
|
|
68
68
|
verifyCodeSurface
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-GCT3DQWU.js";
|
|
70
70
|
import {
|
|
71
71
|
assertCodeSurfaceIdentity,
|
|
72
72
|
buildEvidenceVector,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
runOptimization,
|
|
104
104
|
surfaceContentHash,
|
|
105
105
|
surfaceHash
|
|
106
|
-
} from "../chunk-
|
|
106
|
+
} from "../chunk-I42AAGHL.js";
|
|
107
107
|
import {
|
|
108
108
|
SearchLedgerConflictError,
|
|
109
109
|
SearchLedgerError,
|
|
@@ -115,27 +115,27 @@ import {
|
|
|
115
115
|
resolveRunDir,
|
|
116
116
|
runCampaign,
|
|
117
117
|
tangleTracesRoot
|
|
118
|
-
} from "../chunk-
|
|
118
|
+
} from "../chunk-EGNRE7VA.js";
|
|
119
119
|
import "../chunk-3YYRZDON.js";
|
|
120
120
|
import {
|
|
121
121
|
POLICY_EDIT_CANDIDATE_RECORD_SCHEMA,
|
|
122
122
|
validatePolicyEditCandidateRecord
|
|
123
|
-
} from "../chunk-
|
|
123
|
+
} from "../chunk-DZBCDDIE.js";
|
|
124
124
|
import "../chunk-ARU2PZFM.js";
|
|
125
125
|
import "../chunk-NJC7U437.js";
|
|
126
126
|
import "../chunk-PJQFMIOX.js";
|
|
127
|
-
import "../chunk-
|
|
127
|
+
import "../chunk-MLHRFWQK.js";
|
|
128
128
|
import "../chunk-VI2UW6B6.js";
|
|
129
|
-
import "../chunk-
|
|
129
|
+
import "../chunk-63KG3ASG.js";
|
|
130
130
|
import "../chunk-GGE4NNQT.js";
|
|
131
|
-
import "../chunk-
|
|
131
|
+
import "../chunk-BUBU3YHT.js";
|
|
132
132
|
import "../chunk-PC4UYEBM.js";
|
|
133
133
|
import "../chunk-S3UZOQ5Y.js";
|
|
134
134
|
import "../chunk-MA6HLL3S.js";
|
|
135
135
|
import "../chunk-XJYR7XFV.js";
|
|
136
136
|
import "../chunk-VSMTAMNK.js";
|
|
137
137
|
import "../chunk-ONWEPEDO.js";
|
|
138
|
-
import "../chunk-
|
|
138
|
+
import "../chunk-NW4AQBXD.js";
|
|
139
139
|
import "../chunk-PZ5AY32C.js";
|
|
140
140
|
export {
|
|
141
141
|
DEFAULT_POLICY_EDIT_HISTORY_LIMITS,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
OtlpFileTraceStore,
|
|
3
3
|
TraceFileMissingError,
|
|
4
4
|
buildTraceAnalystTools
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BUBU3YHT.js";
|
|
6
6
|
|
|
7
7
|
// src/trace-analyst/prompts.ts
|
|
8
8
|
var TRACE_ANALYST_ACTOR_DESCRIPTION = `You answer questions about an OTLP-shaped JSONL trace dataset using the trace tools provided in the \`traces\` namespace.
|
|
@@ -198,4 +198,4 @@ export {
|
|
|
198
198
|
TRACE_ANALYST_SUBAGENT_DESCRIPTION,
|
|
199
199
|
analyzeTraces
|
|
200
200
|
};
|
|
201
|
-
//# sourceMappingURL=chunk-
|
|
201
|
+
//# sourceMappingURL=chunk-63KG3ASG.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordAggregateMeasurements,
|
|
3
3
|
summarizeExecutionMeasurements
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TVXPJJ7H.js";
|
|
5
5
|
import {
|
|
6
6
|
extractUsage,
|
|
7
7
|
extractUsageFromSse
|
|
8
8
|
} from "./chunk-PXE2VKMX.js";
|
|
9
9
|
import {
|
|
10
10
|
analyzeTraces
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-63KG3ASG.js";
|
|
12
12
|
import {
|
|
13
13
|
LLM_MODEL_ATTR_KEYS,
|
|
14
14
|
applyToolSpanOtlpAttributes,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
projectOtlpFlatLine,
|
|
18
18
|
spanEpochMillis,
|
|
19
19
|
traceSpanKindToOpenInferenceKind
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BUBU3YHT.js";
|
|
21
21
|
import {
|
|
22
22
|
defaultProviderRedactor,
|
|
23
23
|
providerFromBaseUrl
|
|
@@ -33,16 +33,13 @@ import {
|
|
|
33
33
|
ReplayError
|
|
34
34
|
} from "./chunk-ONWEPEDO.js";
|
|
35
35
|
import {
|
|
36
|
-
LLM_CACHED_TOKENS,
|
|
37
|
-
LLM_CACHE_WRITE_TOKENS,
|
|
38
|
-
LLM_COST_USD,
|
|
39
36
|
LLM_INPUT_TOKENS,
|
|
40
37
|
LLM_MODEL_NAME,
|
|
41
38
|
LLM_OUTPUT_TOKENS,
|
|
42
|
-
LLM_REASONING_TOKENS,
|
|
43
39
|
OPENINFERENCE_SPAN_KIND,
|
|
44
|
-
TOOL_NAME
|
|
45
|
-
|
|
40
|
+
TOOL_NAME,
|
|
41
|
+
applyLlmSpanOtlpAttributes
|
|
42
|
+
} from "./chunk-NW4AQBXD.js";
|
|
46
43
|
|
|
47
44
|
// src/trace-analyst/hook.ts
|
|
48
45
|
var DEFAULT_QUESTION = "Summarise what happened in this run. Surface any failure modes, surprising findings, or evidence that the run's verdict is wrong.";
|
|
@@ -1179,16 +1176,7 @@ function flattenSpanAttributes(span) {
|
|
|
1179
1176
|
}
|
|
1180
1177
|
base[OPENINFERENCE_SPAN_KIND] = traceSpanKindToOpenInferenceKind(span.kind);
|
|
1181
1178
|
if (span.kind === "llm") {
|
|
1182
|
-
base
|
|
1183
|
-
if (span.inputTokens !== void 0) base[LLM_INPUT_TOKENS] = span.inputTokens;
|
|
1184
|
-
if (span.outputTokens !== void 0) base[LLM_OUTPUT_TOKENS] = span.outputTokens;
|
|
1185
|
-
if (span.reasoningTokens !== void 0) base[LLM_REASONING_TOKENS] = span.reasoningTokens;
|
|
1186
|
-
if (span.cachedTokens !== void 0) base[LLM_CACHED_TOKENS] = span.cachedTokens;
|
|
1187
|
-
if (span.cacheWriteTokens !== void 0) {
|
|
1188
|
-
base[LLM_CACHE_WRITE_TOKENS] = span.cacheWriteTokens;
|
|
1189
|
-
}
|
|
1190
|
-
if (span.costUsd !== void 0) base[LLM_COST_USD] = span.costUsd;
|
|
1191
|
-
if (span.finishReason) base["llm.finish_reason"] = span.finishReason;
|
|
1179
|
+
applyLlmSpanOtlpAttributes(base, span);
|
|
1192
1180
|
} else if (span.kind === "tool") {
|
|
1193
1181
|
applyToolSpanOtlpAttributes(base, span);
|
|
1194
1182
|
} else if (span.kind === "retrieval") {
|
|
@@ -1411,15 +1399,7 @@ function toOtlpSpan(span) {
|
|
|
1411
1399
|
}
|
|
1412
1400
|
}
|
|
1413
1401
|
attrs[OPENINFERENCE_SPAN_KIND] = traceSpanKindToOpenInferenceKind(span.kind);
|
|
1414
|
-
|
|
1415
|
-
if (span.inputTokens !== void 0) attrs[LLM_INPUT_TOKENS] = span.inputTokens;
|
|
1416
|
-
if (span.outputTokens !== void 0) attrs[LLM_OUTPUT_TOKENS] = span.outputTokens;
|
|
1417
|
-
if (span.reasoningTokens !== void 0) attrs[LLM_REASONING_TOKENS] = span.reasoningTokens;
|
|
1418
|
-
if (span.cachedTokens !== void 0) attrs[LLM_CACHED_TOKENS] = span.cachedTokens;
|
|
1419
|
-
if (span.cacheWriteTokens !== void 0) {
|
|
1420
|
-
attrs[LLM_CACHE_WRITE_TOKENS] = span.cacheWriteTokens;
|
|
1421
|
-
}
|
|
1422
|
-
if (span.costUsd !== void 0) attrs[LLM_COST_USD] = span.costUsd;
|
|
1402
|
+
applyLlmSpanOtlpAttributes(attrs, span);
|
|
1423
1403
|
if (span.tool) applyToolSpanOtlpAttributes(attrs, span.tool);
|
|
1424
1404
|
return {
|
|
1425
1405
|
traceId: padTraceId(span.traceId),
|
|
@@ -1667,16 +1647,7 @@ function spanToAttributes(span, events) {
|
|
|
1667
1647
|
[OPENINFERENCE_SPAN_KIND]: traceSpanKindToOpenInferenceKind(span.kind)
|
|
1668
1648
|
};
|
|
1669
1649
|
if (span.kind === "llm") {
|
|
1670
|
-
attrs
|
|
1671
|
-
if (span.inputTokens !== void 0) attrs[LLM_INPUT_TOKENS] = span.inputTokens;
|
|
1672
|
-
if (span.outputTokens !== void 0) attrs[LLM_OUTPUT_TOKENS] = span.outputTokens;
|
|
1673
|
-
if (span.reasoningTokens !== void 0) attrs[LLM_REASONING_TOKENS] = span.reasoningTokens;
|
|
1674
|
-
if (span.cachedTokens !== void 0) attrs[LLM_CACHED_TOKENS] = span.cachedTokens;
|
|
1675
|
-
if (span.cacheWriteTokens !== void 0) {
|
|
1676
|
-
attrs[LLM_CACHE_WRITE_TOKENS] = span.cacheWriteTokens;
|
|
1677
|
-
}
|
|
1678
|
-
if (span.costUsd !== void 0) attrs[LLM_COST_USD] = span.costUsd;
|
|
1679
|
-
if (span.finishReason) attrs["llm.finish_reason"] = span.finishReason;
|
|
1650
|
+
applyLlmSpanOtlpAttributes(attrs, span);
|
|
1680
1651
|
if (Array.isArray(span.messages)) {
|
|
1681
1652
|
attrs["llm.input_messages"] = JSON.stringify(span.messages.slice(-6));
|
|
1682
1653
|
}
|
|
@@ -1926,4 +1897,4 @@ export {
|
|
|
1926
1897
|
createReplayFetch,
|
|
1927
1898
|
iterateRawCalls
|
|
1928
1899
|
};
|
|
1929
|
-
//# sourceMappingURL=chunk-
|
|
1900
|
+
//# sourceMappingURL=chunk-6JQE3YVE.js.map
|