@tangle-network/agent-eval 0.186.0 → 0.186.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/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { i as runRolloutReleaseCli } from "./hf-dataset-CRqtSjnR.js";
3
3
  import { t as createChatClient } from "./chat-client-DqPqWzVV.js";
4
- import { t as runAnalystBenchmarkCommand } from "./benchmark-command-tBgs-_AM.js";
4
+ import { t as runAnalystBenchmarkCommand } from "./benchmark-command-NATyhXB4.js";
5
5
  import { a as runRpcBatch, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi } from "./server-DmpcFiVK.js";
6
6
  import { t as runSupervisorRunCommand } from "./report-command-BvqaxlVG.js";
7
7
  import { writeFileSync } from "node:fs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/diagnosis/findings.ts","../../src/diagnosis/secret-filter.ts","../../src/diagnosis/spans.ts","../../src/diagnosis/deterministic.ts","../../src/diagnosis/model-pass.ts","../../src/diagnosis/engine.ts"],"mappings":";;;;;;;;;;;;;cASa;KAGD;;KAGA;UAEK;EACf;EACA;EACA;;EAEA;;UAGe;EACf;EACA,UAAU;EACV;EACA;EACA,UAAU;;EAEV;EACA;EACA,YAAY;EACZ;;UAGe;EACf;EACA;;UAGe;EACf;EACA;;UAGe;EACf;EACA,QAAQ;EACR;;UAGe;EACf;EACA;IACE;IACA;IACA;IACA;;EAEF;IACE,cAAc,eAAe;IAC7B,SAAS;IACT,YAAY;;EAEd,UAAU;;;;;;;;iBAiBI,0BACd,mBACA;EAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;UClEN;EACf;EACA,SAAS;;EAET,UAAU,kBAAkB;;UAGb;EACf;EACA,QAAQ;;;;;;;cAWG,2BAAyB;cAGzB,iCAAiC;;iBA8D9B,cACd,eACA,SAAQ,oBACR,iBAAgB;;iBAwBF,YACd,eACA,iBAAgB;;iBAWF,kBAAkB,gBAAgB,QAAQ;;;KC1H9C;UAEK;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA,QAAQ;EACR;EACA;EACA;;;;;;;EAOA;EACA,YAAY;;UAGG;EACf;EACA;;EAEA;;EAEA;;EAEA;EACA,SAAS;;EAET;;iBAqBc,mBAAmB;;;;;;;iBAUnB,YACd,yBACA;EAAW;;EACR,OAAO;EAAiB,QAAQ;;;;;;;iBA+GrB,YAAY;;;UCtJX;EACf;EACA;EACA,aAAa;EACb;EACA;EACA;;EAEA,WAAW;EACX;;UAGe;EACf,YAAY;EACZ,cAAc,eAAe;EAC7B,SAAS;EACT,OAAO;EACP,UAAU;EACV;;;;UC/Ce;;EAEf,WAAW;;EAEX;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;IAAY;IAA4B;;;UAGzB;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA;IAAa;IAAiB;IAAkB;;EAChD,OAAO;EACP;;;;UC/Be;;EAEf;;EAEA;;EAEA;;;;;EAKA;;EAEA;;EAEA;IAAa,MAAM;MAAQ;QAAe;MAA6B;;KAG7D;EACN;EAAuB;EAAiB,SAAS;;EACjD;EAAe,OAAO;EAAuB,SAAS;;UAE3C;EACf;EACA;EACA;EACA;;UAGe;;EAEf,UAAU;;EAEV,WAAW;;EAEX,OAAO;;EAEP,WAAW;IAAQ;IAAiB;;EACpC,OAAO;EACP,aAAa;EACb,QAAQ;;EAER,UAAU;EACV;IACE;IACA;IACA,MAAM;IACN;IACA,OAAO;;EAET;IAAU;IAA8B;;;cAG7B;iBAIS,cACpB,2BACA,SAAS,kBACT,SAAS,mBACR,QAAQ"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/diagnosis/findings.ts","../../src/diagnosis/secret-filter.ts","../../src/diagnosis/spans.ts","../../src/diagnosis/deterministic.ts","../../src/diagnosis/model-pass.ts","../../src/diagnosis/engine.ts"],"mappings":";;;;;;;;;;;;;cASa;KAGD;;KAGA;UAEK;EACf;EACA;EACA;;EAEA;;UAGe;EACf;EACA,UAAU;EACV;EACA;EACA,UAAU;;EAEV;EACA;EACA,YAAY;EACZ;;UAGe;EACf;EACA;;UAGe;EACf;EACA;;UAGe;EACf;EACA,QAAQ;EACR;;UAGe;EACf;EACA;IACE;IACA;IACA;IACA;;EAEF;IACE,cAAc,eAAe;IAC7B,SAAS;IACT,YAAY;;EAEd,UAAU;;;;;;;;iBAiBI,0BACd,mBACA;EAAW,UAAU;;;;;;;;;;;;;;;;;;;;;;;UClEN;EACf;EACA,SAAS;;EAET,UAAU,kBAAkB;;UAGb;EACf;EACA,QAAQ;;;;;;;cAWG,2BAAyB;cAGzB,iCAAiC;;iBA8D9B,cACd,eACA,SAAQ,oBACR,iBAAgB;;iBAwBF,YACd,eACA,iBAAgB;;iBAWF,kBAAkB,gBAAgB,QAAQ;;;KC1H9C;UAEK;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA,QAAQ;EACR;EACA;EACA;;;;;;;EAOA;EACA,YAAY;;UAGG;EACf;EACA;;EAEA;;EAEA;;EAEA;EACA,SAAS;;EAET;;iBA0Bc,mBAAmB;;;;;;;iBAUnB,YACd,yBACA;EAAW;;EACR,OAAO;EAAiB,QAAQ;;;;;;;iBA+GrB,YAAY;;;UC3JX;EACf;EACA;EACA,aAAa;EACb;EACA;EACA;;EAEA,WAAW;EACX;;UAGe;EACf,YAAY;EACZ,cAAc,eAAe;EAC7B,SAAS;EACT,OAAO;EACP,UAAU;EACV;;;;UC/Ce;;EAEf,WAAW;;EAEX;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;IAAY;IAA4B;;;UAGzB;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA;IAAa;IAAiB;IAAkB;;EAChD,OAAO;EACP;;;;UC/Be;;EAEf;;EAEA;;EAEA;;;;;EAKA;;EAEA;;EAEA;IAAa,MAAM;MAAQ;QAAe;MAA6B;;KAG7D;EACN;EAAuB;EAAiB,SAAS;;EACjD;EAAe,OAAO;EAAuB,SAAS;;UAE3C;EACf;EACA;EACA;EACA;;UAGe;;EAEf,UAAU;;EAEV,WAAW;;EAEX,OAAO;;EAEP,WAAW;IAAQ;IAAiB;;EACpC,OAAO;EACP,aAAa;EACb,QAAQ;;EAER,UAAU;EACV;IACE;IACA;IACA,MAAM;IACN;IACA,OAAO;;EAET;IAAU;IAA8B;;;cAG7B;iBAIS,cACpB,2BACA,SAAS,kBACT,SAAS,mBACR,QAAQ"}
@@ -151,18 +151,22 @@ function countGroups(pattern) {
151
151
  * not included they are removed before anything reads the span, rather than
152
152
  * trusting pattern redaction over free-form prose.
153
153
  */
154
- const CONTENT_ATTRIBUTE = /^(?:input\.value|output\.value|input|output|result|prompt|completion|text|thinking|message|messages|tool\.(?:input|output|arguments|result)|tool_input|tool_output|arguments|gen_ai\.(?:prompt|completion|input\.messages|output\.messages|system_instructions|tool\.call\.(?:arguments|result))(?:\..*)?|llm\.(?:input|output)_messages(?:\..*)?|llm\.prompts?(?:\..*)?|content|body|request|response|command)$|\.content$/;
154
+ const CONTENT_ATTRIBUTE = /^(?:input\.value|output\.value|input|output|result|prompt|completion|text|thinking|message|messages|tool\.(?:input|output|arguments|result)|tool_input|tool_output|tool_arguments|arguments|args|full_command|gen_ai\.(?:prompt|completion|input\.messages|output\.messages|system_instructions|tool\.call\.(?:arguments|result))(?:\..*)?|llm\.(?:input|output)_messages(?:\..*)?|llm\.prompts?(?:\..*)?|content|body|request|response|command)$|\.content$/i;
155
+ const PROSE_ATTRIBUTE = /(?:^|[._])(?:error|exception|status)(?:[._][a-zA-Z0-9]+)*[._](?:message|stacktrace|stack|description|details|reason)$|^(?:error|exception|status)$|^(?:log|event)[._]message$|^otel\.status_description$|^(?:events?|logs?)$/i;
155
156
  const INPUT_ATTRIBUTE_KEYS = [
156
157
  "input.value",
157
158
  "input",
158
159
  "tool.input",
159
160
  "tool.arguments",
160
161
  "tool_input",
162
+ "tool_arguments",
161
163
  "arguments",
164
+ "args",
165
+ "full_command",
162
166
  "gen_ai.tool.call.arguments"
163
167
  ];
164
168
  function isContentAttribute(key) {
165
- return CONTENT_ATTRIBUTE.test(key);
169
+ return CONTENT_ATTRIBUTE.test(key) || PROSE_ATTRIBUTE.test(key);
166
170
  }
167
171
  /**
168
172
  * Filter secrets from every string, drop content attributes unless content is
@@ -208,7 +212,7 @@ function ingestSpans(raw, options) {
208
212
  const inputDigest = digestInput(merged, digestKey);
209
213
  const attributes = redactSecretsDeep(merged, secrets);
210
214
  if (!options.contentIncluded) {
211
- for (const key of Object.keys(attributes)) if (isContentAttribute(key)) {
215
+ for (const [key, value] of Object.entries(attributes)) if (isContentAttribute(key) || value !== null && typeof value === "object") {
212
216
  delete attributes[key];
213
217
  dropped.add(key);
214
218
  }
@@ -227,7 +231,7 @@ function ingestSpans(raw, options) {
227
231
  startMs: epochMillis(record.start_time ?? record.startTime ?? record.startTimeUnixNano),
228
232
  endMs: epochMillis(record.end_time ?? record.endTime ?? record.endTimeUnixNano),
229
233
  status: status.code,
230
- statusMessage: options.contentIncluded ? statusMessage : truncate(statusMessage, 160),
234
+ statusMessage: options.contentIncluded ? statusMessage : null,
231
235
  toolName,
232
236
  model,
233
237
  inputDigest,
@@ -355,10 +359,6 @@ function firstString(attributes, keys) {
355
359
  function stringOr(value, fallback) {
356
360
  return typeof value === "string" && value.length > 0 ? value : fallback;
357
361
  }
358
- function truncate(value, max) {
359
- if (value === null || value.length <= max) return value;
360
- return `${value.slice(0, max)}…`;
361
- }
362
362
  /** The analysis each capability gates, as the report names it. */
363
363
  const CAPABILITY_ANALYSES = {
364
364
  "token-accounting": "token accounting",
@@ -742,6 +742,7 @@ function modelContractLines(subject) {
742
742
  ...subject === "internal" ? ["An \"operator\" row: {\"kind\":\"operator\",\"claim\":\"one sentence critiquing how the human operator instructed or steered the agent\",\"evidence\":[\"<span_id>\", ...]}."] : [],
743
743
  "Add \"project\": \"<repo or project name>\" to any row when the run shows which project it belongs to.",
744
744
  "Every \"finding\" and \"operator\" row cites 1-8 span ids copied VERBATIM from the \"id\" fields of the trajectory. Rows citing ids that are not in the trajectory are discarded.",
745
+ "For elapsed wall time, compare the start and end timestamps and count overlapping spans only once. Do not add overlapping ms durations or call their sum a stall. If timestamps are missing, do not claim a total wall delay.",
745
746
  "Keep every string under 400 characters. Report only what the trajectory shows; an empty rows array is a valid answer."
746
747
  ];
747
748
  }
@@ -1103,6 +1104,10 @@ function renderSpan(span, attributeChars, contentIncluded) {
1103
1104
  if (span.statusMessage) out.status_message = clip(span.statusMessage, attributeChars);
1104
1105
  const duration = durationMs(span);
1105
1106
  if (duration !== null) out.ms = duration;
1107
+ if (span.startMs !== null && span.endMs !== null) {
1108
+ out.start = new Date(span.startMs).toISOString();
1109
+ out.end = new Date(span.endMs).toISOString();
1110
+ }
1106
1111
  const attrs = {};
1107
1112
  for (const [key, value] of Object.entries(span.attributes)) {
1108
1113
  if (SKIP_ATTRIBUTES.has(key)) continue;