@tangle-network/agent-eval 0.122.5 → 0.122.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2395,6 +2395,7 @@ function gepaProposer(opts) {
2395
2395
  kind: "gepa",
2396
2396
  async propose(ctx) {
2397
2397
  const costLedger = ctx.costLedger ?? directCostLedger;
2398
+ const target = targetForTrack(opts.target, ctx);
2398
2399
  const parent = typeof ctx.currentSurface === "string" ? ctx.currentSurface : JSON.stringify(ctx.currentSurface);
2399
2400
  const constraints = opts.constraints;
2400
2401
  const preserveSections = constraints?.preserveSections !== void 0 ? constraints.preserveSections.length === 0 ? extractH2Sections(parent) : constraints.preserveSections : null;
@@ -2412,7 +2413,7 @@ function gepaProposer(opts) {
2412
2413
  const stringParents = (combineParents ? ctx.paretoParents ?? [] : []).filter((p) => typeof p.surface === "string").sort((a, b) => b.composite - a.composite).slice(0, combineMaxParents);
2413
2414
  if (stringParents.length > 1) {
2414
2415
  const combinePrompt = buildCombinePrompt({
2415
- target: opts.target,
2416
+ target,
2416
2417
  parents: stringParents,
2417
2418
  evidenceK
2418
2419
  });
@@ -2451,9 +2452,9 @@ function gepaProposer(opts) {
2451
2452
  }
2452
2453
  const reflectCount = Math.max(0, ctx.populationSize - out.length);
2453
2454
  if (reflectCount > 0) {
2454
- const { top, bottom, target } = buildEvidence(ctx, evidenceK, opts.target);
2455
+ const { top, bottom, target: evidenceTarget } = buildEvidence(ctx, evidenceK, target);
2455
2456
  const userPrompt = buildReflectionPrompt({
2456
- target,
2457
+ target: evidenceTarget,
2457
2458
  parentPayload: parent,
2458
2459
  topTrials: top,
2459
2460
  bottomTrials: bottom,
@@ -2496,6 +2497,12 @@ ${analyst}` : userPrompt;
2496
2497
  }
2497
2498
  };
2498
2499
  }
2500
+ function targetForTrack(base, ctx) {
2501
+ const vision = ctx.track?.vision?.trim();
2502
+ return vision ? `${base}
2503
+
2504
+ Track objective (${ctx.track.id}): ${vision}` : base;
2505
+ }
2499
2506
  function buildCombinePrompt(args) {
2500
2507
  const lines = [
2501
2508
  `You are merging ${args.parents.length} versions of: ${args.target}.`,
@@ -3790,4 +3797,4 @@ export {
3790
3797
  provenanceSpansPath,
3791
3798
  emitLoopProvenance
3792
3799
  };
3793
- //# sourceMappingURL=chunk-FLCXOTWF.js.map
3800
+ //# sourceMappingURL=chunk-YA6MJYZN.js.map