@tangle-network/agent-eval 0.97.0 → 0.99.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/dist/adapters/http.d.ts +1 -1
- package/dist/adapters/langchain.d.ts +1 -1
- package/dist/adapters/otel.d.ts +1 -1
- package/dist/adversarial-B7loGVVX.d.ts +19 -0
- package/dist/analyst/index.js +2 -1
- package/dist/analyst/index.js.map +1 -1
- package/dist/campaign/index.d.ts +9 -8
- package/dist/campaign/index.js +4 -1
- package/dist/campaign/index.js.map +1 -1
- package/dist/chunk-BUTW4RGG.js +32 -0
- package/dist/chunk-BUTW4RGG.js.map +1 -0
- package/dist/{chunk-QWV226SL.js → chunk-JHCHEVET.js} +1 -3
- package/dist/chunk-OYU4D7FY.js +718 -0
- package/dist/chunk-OYU4D7FY.js.map +1 -0
- package/dist/{chunk-PSWWQXHF.js → chunk-SJISCGWD.js} +5 -30
- package/dist/chunk-SJISCGWD.js.map +1 -0
- package/dist/contract/index.d.ts +6 -6
- package/dist/fuzz.d.ts +2 -5
- package/dist/{gepa-3TG16SYf.d.ts → gepa-H6mlM0KN.d.ts} +1 -1
- package/dist/hosted/index.d.ts +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.js +34 -241
- package/dist/index.js.map +1 -1
- package/dist/matrix/index.d.ts +3 -17
- package/dist/matrix/index.js +3 -7
- package/dist/multishot/index.d.ts +1 -1
- package/dist/multishot/index.js +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{pre-registration-nfUdc9EQ.d.ts → pre-registration-CMm8cvrh.d.ts} +73 -1
- package/dist/{provenance-C5KAhiom.d.ts → provenance-Bg_RttR8.d.ts} +2 -2
- package/dist/rl.d.ts +2 -2
- package/dist/rl.js +0 -79
- package/dist/rl.js.map +1 -1
- package/dist/{types-D9tuReDv.d.ts → types-BTI16iFl.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/adversarial-DIVcDoI_.d.ts +0 -88
- package/dist/chunk-HMA63UEO.js +0 -370
- package/dist/chunk-HMA63UEO.js.map +0 -1
- package/dist/chunk-PSWWQXHF.js.map +0 -1
- /package/dist/{chunk-QWV226SL.js.map → chunk-JHCHEVET.js.map} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/run-score.ts
|
|
2
|
+
var DEFAULT_RUN_SCORE_WEIGHTS = {
|
|
3
|
+
success: 4,
|
|
4
|
+
goalProgress: 2,
|
|
5
|
+
repoGroundedness: 1.5,
|
|
6
|
+
driftPenalty: -1.5,
|
|
7
|
+
toolUseQuality: 1,
|
|
8
|
+
patchQuality: 1.25,
|
|
9
|
+
testReality: 1.5,
|
|
10
|
+
finalGate: 3,
|
|
11
|
+
reviewerBlockers: -2,
|
|
12
|
+
costUsd: -0.2,
|
|
13
|
+
wallSeconds: -0.1
|
|
14
|
+
};
|
|
15
|
+
function aggregateRunScore(score, weights = {}) {
|
|
16
|
+
const w = { ...DEFAULT_RUN_SCORE_WEIGHTS, ...weights };
|
|
17
|
+
return w.success * clamp01(score.success) + w.goalProgress * clamp01(score.goalProgress) + w.repoGroundedness * clamp01(score.repoGroundedness) + w.driftPenalty * clamp01(score.driftPenalty) + w.toolUseQuality * clamp01(score.toolUseQuality) + w.patchQuality * clamp01(score.patchQuality) + w.testReality * clamp01(score.testReality) + w.finalGate * clamp01(score.finalGate) + w.reviewerBlockers * clamp01(score.reviewerBlockers) + w.costUsd * Math.max(0, finiteOrZero(score.costUsd)) + w.wallSeconds * Math.max(0, finiteOrZero(score.wallSeconds) / 60);
|
|
18
|
+
}
|
|
19
|
+
function clamp01(value) {
|
|
20
|
+
if (!Number.isFinite(value)) return 0;
|
|
21
|
+
return Math.max(0, Math.min(1, value));
|
|
22
|
+
}
|
|
23
|
+
function finiteOrZero(value) {
|
|
24
|
+
return Number.isFinite(value) ? value : 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
DEFAULT_RUN_SCORE_WEIGHTS,
|
|
29
|
+
aggregateRunScore,
|
|
30
|
+
clamp01
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=chunk-BUTW4RGG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/run-score.ts"],"sourcesContent":["export interface RunScore {\n success: number\n goalProgress: number\n repoGroundedness: number\n driftPenalty: number\n toolUseQuality: number\n patchQuality: number\n testReality: number\n finalGate: number\n reviewerBlockers: number\n costUsd: number\n wallSeconds: number\n notes?: string[]\n}\n\nexport interface RunScoreWeights {\n success: number\n goalProgress: number\n repoGroundedness: number\n driftPenalty: number\n toolUseQuality: number\n patchQuality: number\n testReality: number\n finalGate: number\n reviewerBlockers: number\n costUsd: number\n wallSeconds: number\n}\n\nexport const DEFAULT_RUN_SCORE_WEIGHTS: RunScoreWeights = {\n success: 4,\n goalProgress: 2,\n repoGroundedness: 1.5,\n driftPenalty: -1.5,\n toolUseQuality: 1,\n patchQuality: 1.25,\n testReality: 1.5,\n finalGate: 3,\n reviewerBlockers: -2,\n costUsd: -0.2,\n wallSeconds: -0.1,\n}\n\nexport function aggregateRunScore(score: RunScore, weights: Partial<RunScoreWeights> = {}): number {\n const w = { ...DEFAULT_RUN_SCORE_WEIGHTS, ...weights }\n return (\n w.success * clamp01(score.success) +\n w.goalProgress * clamp01(score.goalProgress) +\n w.repoGroundedness * clamp01(score.repoGroundedness) +\n w.driftPenalty * clamp01(score.driftPenalty) +\n w.toolUseQuality * clamp01(score.toolUseQuality) +\n w.patchQuality * clamp01(score.patchQuality) +\n w.testReality * clamp01(score.testReality) +\n w.finalGate * clamp01(score.finalGate) +\n w.reviewerBlockers * clamp01(score.reviewerBlockers) +\n w.costUsd * Math.max(0, finiteOrZero(score.costUsd)) +\n w.wallSeconds * Math.max(0, finiteOrZero(score.wallSeconds) / 60)\n )\n}\n\nexport function clamp01(value: number): number {\n if (!Number.isFinite(value)) return 0\n return Math.max(0, Math.min(1, value))\n}\n\nfunction finiteOrZero(value: number): number {\n return Number.isFinite(value) ? value : 0\n}\n"],"mappings":";AA6BO,IAAM,4BAA6C;AAAA,EACxD,SAAS;AAAA,EACT,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,SAAS;AAAA,EACT,aAAa;AACf;AAEO,SAAS,kBAAkB,OAAiB,UAAoC,CAAC,GAAW;AACjG,QAAM,IAAI,EAAE,GAAG,2BAA2B,GAAG,QAAQ;AACrD,SACE,EAAE,UAAU,QAAQ,MAAM,OAAO,IACjC,EAAE,eAAe,QAAQ,MAAM,YAAY,IAC3C,EAAE,mBAAmB,QAAQ,MAAM,gBAAgB,IACnD,EAAE,eAAe,QAAQ,MAAM,YAAY,IAC3C,EAAE,iBAAiB,QAAQ,MAAM,cAAc,IAC/C,EAAE,eAAe,QAAQ,MAAM,YAAY,IAC3C,EAAE,cAAc,QAAQ,MAAM,WAAW,IACzC,EAAE,YAAY,QAAQ,MAAM,SAAS,IACrC,EAAE,mBAAmB,QAAQ,MAAM,gBAAgB,IACnD,EAAE,UAAU,KAAK,IAAI,GAAG,aAAa,MAAM,OAAO,CAAC,IACnD,EAAE,cAAc,KAAK,IAAI,GAAG,aAAa,MAAM,WAAW,IAAI,EAAE;AAEpE;AAEO,SAAS,QAAQ,OAAuB;AAC7C,MAAI,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACpC,SAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC;AACvC;AAEA,SAAS,aAAa,OAAuB;AAC3C,SAAO,OAAO,SAAS,KAAK,IAAI,QAAQ;AAC1C;","names":[]}
|