@tangle-network/agent-eval 0.92.0 → 0.93.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/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  knowledgeReadinessTracePayload,
25
25
  scoreKnowledgeReadiness,
26
26
  userQuestionsForKnowledgeGaps
27
- } from "./chunk-3CKU6VGU.js";
27
+ } from "./chunk-Q2JRAWRI.js";
28
28
  import {
29
29
  assertRecordIntegrity,
30
30
  checkRecordIntegrity,
@@ -154,15 +154,19 @@ import {
154
154
  runProposeReview,
155
155
  runProposeReviewAsControlLoop,
156
156
  scoreFromEvals
157
- } from "./chunk-RTWFUK6A.js";
157
+ } from "./chunk-E4GH6USR.js";
158
158
  import {
159
159
  allCriticalPassed,
160
+ errorStreakDetector,
161
+ noProgressDetector,
160
162
  objectiveEval,
163
+ observeAll,
164
+ repeatedActionDetector,
161
165
  runAgentControlLoop,
162
166
  stopOnNoProgress,
163
167
  stopOnRepeatedAction,
164
168
  subjectiveEval
165
- } from "./chunk-NCRFYPS3.js";
169
+ } from "./chunk-YEHAEDUD.js";
166
170
  import {
167
171
  assertReleaseConfidence,
168
172
  bootstrapCi,
@@ -1564,6 +1568,42 @@ Sign-off: respond with exactly "DONE" only when a ${persona.role} would act on t
1564
1568
 
1565
1569
  Output ONLY your next message to the agent \u2014 in character, first person, no meta-commentary, no stage directions.`;
1566
1570
  }
1571
+ function buildWorkerDriverSystemPrompt(ctx) {
1572
+ const harness = ctx.harness ?? "a coding agent";
1573
+ const brief = ctx.harnessBrief ? `
1574
+ This worker's harness (${harness}) can:
1575
+ ${ctx.harnessBrief}
1576
+ Drive it to USE these \u2014 and never ask for a capability it lacks.
1577
+ ` : `
1578
+ The worker runs in ${harness}. Drive it to exploit whatever its harness offers \u2014 parallel tool calls, sub-agents, run-to-completion \u2014 and never ask for a capability it lacks.
1579
+ `;
1580
+ const progress = ctx.progress ? `
1581
+ What the worker has done so far:
1582
+ ${ctx.progress}
1583
+ ` : "\nThe worker has not started yet \u2014 your first instruction sets the whole plan.\n";
1584
+ const context = ctx.context ? `
1585
+ Context:
1586
+ ${ctx.context}
1587
+ ` : "";
1588
+ return `You are a DRIVER: a meta-agent whose entire job is to drive a capable coding worker to ACHIEVE A GOAL by writing it precise, high-signal instructions. You do not do the work yourself \u2014 you direct the worker to do it, brilliantly, and you hold it to a standard it would not hold itself to.
1589
+
1590
+ The goal: ${ctx.goal}
1591
+ ${context}${brief}${progress}
1592
+ THE BAR \u2014 non-negotiable. Every instruction you write is dense, specific, and complete. You write the message a world-class engineering lead writes to a strong report: the exact next objective, the concrete sub-steps, what to do in parallel vs in sequence, what to verify and how, what "done" looks like, and the failure modes to avoid. A thin steer \u2014 "try again", "fix the issues", a single vague sentence \u2014 is a failure on YOUR part, not the worker's. Out-drive a human power-user.
1593
+
1594
+ HOW to drive (each turn):
1595
+ 1. Read what the worker actually did (its trace/state above), not what it claims. Find the real gap between here and the goal.
1596
+ 2. Decide the next objective \u2014 the largest correct step the worker can take now.
1597
+ 3. Decompose it: name the sub-tasks that can run IN PARALLEL (independent files/checks/searches) and tell the worker to fan them out (sub-agents / parallel tool calls where its harness allows); name what must run in SEQUENCE and why.
1598
+ 4. Make it exploit the harness: drive it to run to completion under its own autonomy, spawn sub-agents for separable work, use its tools/MCP, and not stop at the first plausible stopping point.
1599
+ 5. Specify verification: the exact command / test / check that proves the step landed, and tell it to run that and report the result \u2014 never accept "done" without the check.
1600
+ 6. Name the traps: the specific failure modes for THIS step (editing the wrong file, a check that passes vacuously, scope creep) and forbid them.
1601
+ 7. As the task gets harder, decompose MORE, not less \u2014 more parallel branches, deeper sub-agent trees, tighter verification.
1602
+
1603
+ COMPLETION: drive toward the goal's real acceptance check. Do not declare done \u2014 the deliverable's checker does. If the worker claims it is done, drive it to PROVE it with the check; if the check fails, drive the fix.
1604
+
1605
+ Output ONLY your next instruction to the worker \u2014 direct, detailed, actionable, in the first person as the driver. No meta-commentary, no preamble.`;
1606
+ }
1567
1607
  async function decideNextUserTurn(tc, opts) {
1568
1608
  const { persona, state, history, productContext = "", model = "claude-sonnet-4-6" } = opts;
1569
1609
  const lastResponse = history.length > 0 ? history[history.length - 1].content.slice(0, 2e3) : "(no conversation yet \u2014 this is the first message)";
@@ -10033,6 +10073,7 @@ export {
10033
10073
  buildTraceInsightContext,
10034
10074
  buildTraceInsightPrompt,
10035
10075
  buildTrajectory,
10076
+ buildWorkerDriverSystemPrompt,
10036
10077
  byteLengthRange,
10037
10078
  cachedJudge,
10038
10079
  calibrateJudge,
@@ -10122,6 +10163,7 @@ export {
10122
10163
  dominates,
10123
10164
  eProcess,
10124
10165
  ensembleJudge,
10166
+ errorStreakDetector,
10125
10167
  estimateCost,
10126
10168
  estimateTokens,
10127
10169
  euAiActReport,
@@ -10233,9 +10275,11 @@ export {
10233
10275
  mulberry32,
10234
10276
  multiToolchainLayer,
10235
10277
  nistAiRmfReport,
10278
+ noProgressDetector,
10236
10279
  normalizeScores,
10237
10280
  notBlocked,
10238
10281
  objectiveEval,
10282
+ observeAll,
10239
10283
  otelRunCompleteHook,
10240
10284
  otlpToRunRecords,
10241
10285
  otlpToTraceRunRecords,
@@ -10290,6 +10334,7 @@ export {
10290
10334
  renderPriorFindings,
10291
10335
  renderReleaseReport,
10292
10336
  renderSteeringText,
10337
+ repeatedActionDetector,
10293
10338
  replayFeedbackTrajectories,
10294
10339
  replayFeedbackTrajectory,
10295
10340
  replayScorerOverCorpus,