@tangle-network/agent-eval 0.122.2 → 0.122.3
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/analyst/index.js +3 -4
- package/dist/analyst/index.js.map +1 -1
- package/dist/benchmarks/index.js +3 -4
- package/dist/campaign/index.d.ts +6 -0
- package/dist/campaign/index.js +3 -4
- package/dist/{chunk-U4R2AGY5.js → chunk-DHJJACEX.js} +40 -30
- package/dist/{chunk-U4R2AGY5.js.map → chunk-DHJJACEX.js.map} +1 -1
- package/dist/{chunk-5CVUPHJ4.js → chunk-EAWKAVID.js} +74 -1
- package/dist/chunk-EAWKAVID.js.map +1 -0
- package/dist/{chunk-EXMKNOP5.js → chunk-IDC74VDL.js} +28 -21
- package/dist/chunk-IDC74VDL.js.map +1 -0
- package/dist/{chunk-5BYTIDZ7.js → chunk-SFXDMFGV.js} +2 -2
- package/dist/{chunk-XKSDSGSC.js → chunk-ULW7AATT.js} +3 -5
- package/dist/{chunk-XKSDSGSC.js.map → chunk-ULW7AATT.js.map} +1 -1
- package/dist/contract/index.d.ts +3 -0
- package/dist/contract/index.js +3 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/package.json +1 -1
- package/dist/chunk-3YYRZDON.js +0 -45
- package/dist/chunk-3YYRZDON.js.map +0 -1
- package/dist/chunk-5CVUPHJ4.js.map +0 -1
- package/dist/chunk-EXMKNOP5.js.map +0 -1
- /package/dist/{chunk-5BYTIDZ7.js.map → chunk-SFXDMFGV.js.map} +0 -0
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
runImprovementLoop,
|
|
16
16
|
surfaceContentHash,
|
|
17
17
|
surfaceHash
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DHJJACEX.js";
|
|
19
19
|
import {
|
|
20
20
|
SearchLedgerConflictError,
|
|
21
21
|
SearchLedgerError,
|
|
@@ -33,12 +33,10 @@ import {
|
|
|
33
33
|
tryAcquireAtomicFileLock,
|
|
34
34
|
withSearchLedgerFileLock
|
|
35
35
|
} from "./chunk-N3QPYIVG.js";
|
|
36
|
-
import {
|
|
37
|
-
Mutex
|
|
38
|
-
} from "./chunk-3YYRZDON.js";
|
|
39
36
|
import {
|
|
40
37
|
AnalystRegistry,
|
|
41
38
|
DEFAULT_TRACE_ANALYST_KINDS,
|
|
39
|
+
Mutex,
|
|
42
40
|
POLICY_EDIT_AXES,
|
|
43
41
|
POLICY_EDIT_TARGET_SURFACES,
|
|
44
42
|
admitPolicyEdit,
|
|
@@ -49,9 +47,10 @@ import {
|
|
|
49
47
|
isPolicyEdit,
|
|
50
48
|
makePolicyEdit,
|
|
51
49
|
makePolicyEditCandidateRecord,
|
|
50
|
+
mapConcurrent,
|
|
52
51
|
policyEditsFromFindings,
|
|
53
52
|
validatePolicyEditCandidateRecord
|
|
54
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-EAWKAVID.js";
|
|
55
54
|
import {
|
|
56
55
|
callLlm,
|
|
57
56
|
callLlmJson,
|
|
@@ -4214,9 +4213,13 @@ function toCandidate(p) {
|
|
|
4214
4213
|
async function runLineageLoop(opts) {
|
|
4215
4214
|
const governor = opts.governor ?? heuristicGovernor();
|
|
4216
4215
|
const populationSize = opts.populationSize ?? 4;
|
|
4216
|
+
const candidateConcurrency = opts.candidateConcurrency ?? 1;
|
|
4217
4217
|
if (populationSize < 1) {
|
|
4218
4218
|
throw new Error("runLineageLoop: populationSize must be >= 1");
|
|
4219
4219
|
}
|
|
4220
|
+
if (!Number.isInteger(candidateConcurrency) || candidateConcurrency < 1) {
|
|
4221
|
+
throw new Error("runLineageLoop: candidateConcurrency must be a positive integer");
|
|
4222
|
+
}
|
|
4220
4223
|
let proposer = opts.proposer;
|
|
4221
4224
|
if (!proposer) {
|
|
4222
4225
|
if (!opts.llm || !opts.model) {
|
|
@@ -4282,18 +4285,17 @@ async function runLineageLoop(opts) {
|
|
|
4282
4285
|
objectives.composite = node.score;
|
|
4283
4286
|
return objectives;
|
|
4284
4287
|
};
|
|
4285
|
-
const scoredSeeds =
|
|
4286
|
-
for (const seed of opts.seeds) {
|
|
4288
|
+
const scoredSeeds = await mapConcurrent(opts.seeds, candidateConcurrency, async (seed) => {
|
|
4287
4289
|
const measured = await scoreSurface(seed.surface);
|
|
4288
|
-
|
|
4290
|
+
return {
|
|
4289
4291
|
surface: seed.surface,
|
|
4290
4292
|
track: seed.track,
|
|
4291
4293
|
proposer: seed.proposer,
|
|
4292
4294
|
score: measured.score,
|
|
4293
4295
|
...seed.vision !== void 0 ? { vision: seed.vision } : {},
|
|
4294
4296
|
...measured.scoreVector !== void 0 ? { scoreVector: measured.scoreVector } : {}
|
|
4295
|
-
}
|
|
4296
|
-
}
|
|
4297
|
+
};
|
|
4298
|
+
});
|
|
4297
4299
|
const step = async (args) => {
|
|
4298
4300
|
const proposed = await proposer.propose({
|
|
4299
4301
|
currentSurface: args.tip.surface,
|
|
@@ -4312,16 +4314,21 @@ async function runLineageLoop(opts) {
|
|
|
4312
4314
|
...args.tip.rationale !== void 0 ? { rationale: args.tip.rationale } : {}
|
|
4313
4315
|
}
|
|
4314
4316
|
];
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
surface,
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4317
|
+
const measuredCandidates = await mapConcurrent(
|
|
4318
|
+
proposed,
|
|
4319
|
+
candidateConcurrency,
|
|
4320
|
+
async (p) => {
|
|
4321
|
+
const { surface, rationale } = toCandidate(p);
|
|
4322
|
+
const measured = await scoreSurface(surface);
|
|
4323
|
+
return {
|
|
4324
|
+
surface,
|
|
4325
|
+
score: measured.score,
|
|
4326
|
+
...measured.scoreVector !== void 0 ? { scoreVector: measured.scoreVector } : {},
|
|
4327
|
+
...rationale !== void 0 ? { rationale } : {}
|
|
4328
|
+
};
|
|
4329
|
+
}
|
|
4330
|
+
);
|
|
4331
|
+
pool.push(...measuredCandidates);
|
|
4325
4332
|
let best = pool[0];
|
|
4326
4333
|
for (const entry of pool) {
|
|
4327
4334
|
if (entry.score > best.score) best = entry;
|
|
@@ -8116,4 +8123,4 @@ export {
|
|
|
8116
8123
|
verifyCodeSurface,
|
|
8117
8124
|
resolveWorktreePath
|
|
8118
8125
|
};
|
|
8119
|
-
//# sourceMappingURL=chunk-
|
|
8126
|
+
//# sourceMappingURL=chunk-IDC74VDL.js.map
|