@tangle-network/agent-eval 0.120.1 → 0.120.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.
Files changed (171) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +1 -1
  3. package/dist/analyst/index.d.ts +0 -3111
  4. package/dist/analyst/index.js +0 -403
  5. package/dist/analyst/index.js.map +0 -1
  6. package/dist/authenticity/index.d.ts +0 -161
  7. package/dist/authenticity/index.js +0 -215
  8. package/dist/authenticity/index.js.map +0 -1
  9. package/dist/belief-state/index.d.ts +0 -1301
  10. package/dist/belief-state/index.js +0 -2152
  11. package/dist/belief-state/index.js.map +0 -1
  12. package/dist/benchmarks/index.d.ts +0 -974
  13. package/dist/benchmarks/index.js +0 -60
  14. package/dist/benchmarks/index.js.map +0 -1
  15. package/dist/builder-eval/index.d.ts +0 -695
  16. package/dist/builder-eval/index.js +0 -366
  17. package/dist/builder-eval/index.js.map +0 -1
  18. package/dist/campaign/index.d.ts +0 -7454
  19. package/dist/campaign/index.js +0 -272
  20. package/dist/campaign/index.js.map +0 -1
  21. package/dist/chunk-32BZXMSO.js +0 -3878
  22. package/dist/chunk-32BZXMSO.js.map +0 -1
  23. package/dist/chunk-3A246TSA.js +0 -998
  24. package/dist/chunk-3A246TSA.js.map +0 -1
  25. package/dist/chunk-3RF76KTD.js +0 -84
  26. package/dist/chunk-3RF76KTD.js.map +0 -1
  27. package/dist/chunk-3YYRZDON.js +0 -45
  28. package/dist/chunk-3YYRZDON.js.map +0 -1
  29. package/dist/chunk-4I2E3LLO.js +0 -1030
  30. package/dist/chunk-4I2E3LLO.js.map +0 -1
  31. package/dist/chunk-ARU2PZFM.js +0 -312
  32. package/dist/chunk-ARU2PZFM.js.map +0 -1
  33. package/dist/chunk-BOD4O7OF.js +0 -40
  34. package/dist/chunk-BOD4O7OF.js.map +0 -1
  35. package/dist/chunk-DPZAEKA6.js +0 -880
  36. package/dist/chunk-DPZAEKA6.js.map +0 -1
  37. package/dist/chunk-DTJ6QUQB.js +0 -131
  38. package/dist/chunk-DTJ6QUQB.js.map +0 -1
  39. package/dist/chunk-GGE4NNQT.js +0 -65
  40. package/dist/chunk-GGE4NNQT.js.map +0 -1
  41. package/dist/chunk-H5UD2323.js +0 -286
  42. package/dist/chunk-H5UD2323.js.map +0 -1
  43. package/dist/chunk-HHWE3POT.js +0 -94
  44. package/dist/chunk-HHWE3POT.js.map +0 -1
  45. package/dist/chunk-HKUCJ437.js +0 -787
  46. package/dist/chunk-HKUCJ437.js.map +0 -1
  47. package/dist/chunk-JHCHEVET.js +0 -274
  48. package/dist/chunk-JHCHEVET.js.map +0 -1
  49. package/dist/chunk-JHOJHHU7.js +0 -867
  50. package/dist/chunk-JHOJHHU7.js.map +0 -1
  51. package/dist/chunk-JM2SKQMS.js +0 -750
  52. package/dist/chunk-JM2SKQMS.js.map +0 -1
  53. package/dist/chunk-JN2FCO5W.js +0 -7958
  54. package/dist/chunk-JN2FCO5W.js.map +0 -1
  55. package/dist/chunk-K4DBDHLK.js +0 -158
  56. package/dist/chunk-K4DBDHLK.js.map +0 -1
  57. package/dist/chunk-K6N6XJJX.js +0 -306
  58. package/dist/chunk-K6N6XJJX.js.map +0 -1
  59. package/dist/chunk-MA6HLL3S.js +0 -65
  60. package/dist/chunk-MA6HLL3S.js.map +0 -1
  61. package/dist/chunk-MAZ26DC7.js +0 -99
  62. package/dist/chunk-MAZ26DC7.js.map +0 -1
  63. package/dist/chunk-MOXWMGPC.js +0 -577
  64. package/dist/chunk-MOXWMGPC.js.map +0 -1
  65. package/dist/chunk-NJC7U437.js +0 -626
  66. package/dist/chunk-NJC7U437.js.map +0 -1
  67. package/dist/chunk-NPCTHQIO.js +0 -91
  68. package/dist/chunk-NPCTHQIO.js.map +0 -1
  69. package/dist/chunk-ONWEPEDO.js +0 -57
  70. package/dist/chunk-ONWEPEDO.js.map +0 -1
  71. package/dist/chunk-OYZAPX5G.js +0 -1526
  72. package/dist/chunk-OYZAPX5G.js.map +0 -1
  73. package/dist/chunk-PC4UYEBM.js +0 -166
  74. package/dist/chunk-PC4UYEBM.js.map +0 -1
  75. package/dist/chunk-PICTDURQ.js +0 -766
  76. package/dist/chunk-PICTDURQ.js.map +0 -1
  77. package/dist/chunk-PJQFMIOX.js +0 -1182
  78. package/dist/chunk-PJQFMIOX.js.map +0 -1
  79. package/dist/chunk-PXD6ZFNY.js +0 -1107
  80. package/dist/chunk-PXD6ZFNY.js.map +0 -1
  81. package/dist/chunk-PXE2VKMX.js +0 -140
  82. package/dist/chunk-PXE2VKMX.js.map +0 -1
  83. package/dist/chunk-PZ5AY32C.js +0 -10
  84. package/dist/chunk-PZ5AY32C.js.map +0 -1
  85. package/dist/chunk-QBRSJK47.js +0 -622
  86. package/dist/chunk-QBRSJK47.js.map +0 -1
  87. package/dist/chunk-QWMPPZ3X.js +0 -550
  88. package/dist/chunk-QWMPPZ3X.js.map +0 -1
  89. package/dist/chunk-S3UZOQ5Y.js +0 -328
  90. package/dist/chunk-S3UZOQ5Y.js.map +0 -1
  91. package/dist/chunk-S5TT5R3L.js +0 -2668
  92. package/dist/chunk-S5TT5R3L.js.map +0 -1
  93. package/dist/chunk-T4SQEITX.js +0 -95
  94. package/dist/chunk-T4SQEITX.js.map +0 -1
  95. package/dist/chunk-TT4KNT67.js +0 -124
  96. package/dist/chunk-TT4KNT67.js.map +0 -1
  97. package/dist/chunk-U5CHZ5M3.js +0 -357
  98. package/dist/chunk-U5CHZ5M3.js.map +0 -1
  99. package/dist/chunk-ULOKLHIQ.js +0 -1937
  100. package/dist/chunk-ULOKLHIQ.js.map +0 -1
  101. package/dist/chunk-VI2UW6B6.js +0 -162
  102. package/dist/chunk-VI2UW6B6.js.map +0 -1
  103. package/dist/chunk-VQMK5FMP.js +0 -247
  104. package/dist/chunk-VQMK5FMP.js.map +0 -1
  105. package/dist/chunk-VSMTAMNK.js +0 -53
  106. package/dist/chunk-VSMTAMNK.js.map +0 -1
  107. package/dist/chunk-VZSRQ272.js +0 -149
  108. package/dist/chunk-VZSRQ272.js.map +0 -1
  109. package/dist/chunk-WW2A73HW.js +0 -159
  110. package/dist/chunk-WW2A73HW.js.map +0 -1
  111. package/dist/chunk-X4UCIOTZ.js +0 -136
  112. package/dist/chunk-X4UCIOTZ.js.map +0 -1
  113. package/dist/chunk-XDIRG3TO.js +0 -1266
  114. package/dist/chunk-XDIRG3TO.js.map +0 -1
  115. package/dist/chunk-XJYR7XFV.js +0 -317
  116. package/dist/chunk-XJYR7XFV.js.map +0 -1
  117. package/dist/chunk-ZET2UAYW.js +0 -89
  118. package/dist/chunk-ZET2UAYW.js.map +0 -1
  119. package/dist/chunk-ZZUXHH3R.js +0 -99
  120. package/dist/chunk-ZZUXHH3R.js.map +0 -1
  121. package/dist/cli.d.ts +0 -1
  122. package/dist/cli.js +0 -112
  123. package/dist/cli.js.map +0 -1
  124. package/dist/contract/index.d.ts +0 -4972
  125. package/dist/contract/index.js +0 -1654
  126. package/dist/contract/index.js.map +0 -1
  127. package/dist/control.d.ts +0 -1013
  128. package/dist/control.js +0 -34
  129. package/dist/control.js.map +0 -1
  130. package/dist/fuzz.d.ts +0 -759
  131. package/dist/fuzz.js +0 -714
  132. package/dist/fuzz.js.map +0 -1
  133. package/dist/hosted/index.d.ts +0 -730
  134. package/dist/hosted/index.js +0 -14
  135. package/dist/hosted/index.js.map +0 -1
  136. package/dist/index.d.ts +0 -16780
  137. package/dist/index.js +0 -12168
  138. package/dist/index.js.map +0 -1
  139. package/dist/matrix/index.d.ts +0 -155
  140. package/dist/matrix/index.js +0 -8
  141. package/dist/matrix/index.js.map +0 -1
  142. package/dist/meta-eval/index.d.ts +0 -1030
  143. package/dist/meta-eval/index.js +0 -417
  144. package/dist/meta-eval/index.js.map +0 -1
  145. package/dist/multishot/index.d.ts +0 -579
  146. package/dist/multishot/index.js +0 -589
  147. package/dist/multishot/index.js.map +0 -1
  148. package/dist/openapi.json +0 -992
  149. package/dist/pipelines/index.d.ts +0 -567
  150. package/dist/pipelines/index.js +0 -515
  151. package/dist/pipelines/index.js.map +0 -1
  152. package/dist/reporting.d.ts +0 -1277
  153. package/dist/reporting.js +0 -48
  154. package/dist/reporting.js.map +0 -1
  155. package/dist/rl.d.ts +0 -4092
  156. package/dist/rl.js +0 -1724
  157. package/dist/rl.js.map +0 -1
  158. package/dist/run-campaign-HNFPJET4.js +0 -14
  159. package/dist/run-campaign-HNFPJET4.js.map +0 -1
  160. package/dist/storyboard/index.d.ts +0 -279
  161. package/dist/storyboard/index.js +0 -767
  162. package/dist/storyboard/index.js.map +0 -1
  163. package/dist/trace-attributes.d.ts +0 -52
  164. package/dist/trace-attributes.js +0 -62
  165. package/dist/trace-attributes.js.map +0 -1
  166. package/dist/traces.d.ts +0 -2343
  167. package/dist/traces.js +0 -249
  168. package/dist/traces.js.map +0 -1
  169. package/dist/wire/index.d.ts +0 -1252
  170. package/dist/wire/index.js +0 -81
  171. package/dist/wire/index.js.map +0 -1
@@ -1,279 +0,0 @@
1
- type SpanKind = 'agent' | 'llm' | 'tool' | 'retrieval' | 'judge' | 'sandbox' | 'custom';
2
- type SpanStatus = 'ok' | 'error';
3
- interface SpanBase {
4
- spanId: string;
5
- parentSpanId?: string;
6
- runId: string;
7
- kind: SpanKind;
8
- name: string;
9
- startedAt: number;
10
- endedAt?: number;
11
- status?: SpanStatus;
12
- error?: string;
13
- /** Anything not covered by typed fields. Kept deliberately free-form. */
14
- attributes?: Record<string, unknown>;
15
- }
16
- interface Message {
17
- role: 'system' | 'user' | 'assistant' | 'tool';
18
- content: string;
19
- tokens?: number;
20
- /** Multi-modal content descriptors; blobs themselves live in Artifacts. */
21
- images?: Array<{
22
- artifactId?: string;
23
- url?: string;
24
- mime?: string;
25
- }>;
26
- }
27
- interface LlmSpan extends SpanBase {
28
- kind: 'llm';
29
- model: string;
30
- messages: Message[];
31
- output?: string;
32
- inputTokens?: number;
33
- /** All generated tokens, including the reasoning subset when present. */
34
- outputTokens?: number;
35
- cachedTokens?: number;
36
- cacheWriteTokens?: number;
37
- /** Reasoning-token subset of `outputTokens`. */
38
- reasoningTokens?: number;
39
- costUsd?: number;
40
- finishReason?: string;
41
- }
42
- interface ToolSpan extends SpanBase {
43
- kind: 'tool';
44
- toolName: string;
45
- args: unknown;
46
- /** False when the source observed the call but did not capture its arguments. */
47
- argsCaptured?: boolean;
48
- result?: unknown;
49
- latencyMs?: number;
50
- }
51
- interface RetrievalSpan extends SpanBase {
52
- kind: 'retrieval';
53
- query: string;
54
- hits: Array<{
55
- docId: string;
56
- score: number;
57
- content?: string;
58
- }>;
59
- }
60
- interface JudgeSpan extends SpanBase {
61
- kind: 'judge';
62
- judgeId: string;
63
- /** Span this judgment applies to. */
64
- targetSpanId: string;
65
- dimension: string;
66
- /** Numeric score (free-range; interpretation up to the judge). */
67
- score: number;
68
- rationale?: string;
69
- evidence?: string;
70
- }
71
- interface SandboxSpan extends SpanBase {
72
- kind: 'sandbox';
73
- image?: string;
74
- command?: string;
75
- exitCode?: number;
76
- testsTotal?: number;
77
- testsPassed?: number;
78
- stdoutHash?: string;
79
- stderrHash?: string;
80
- /** Duration in ms; the harness fills this explicitly (endedAt - startedAt may miss setup). */
81
- wallMs?: number;
82
- }
83
- interface GenericSpan extends SpanBase {
84
- kind: 'agent' | 'custom';
85
- }
86
- type Span = LlmSpan | ToolSpan | RetrievalSpan | JudgeSpan | SandboxSpan | GenericSpan;
87
-
88
- /**
89
- * Code-edit extraction + the "watch the agent write code" animation.
90
- *
91
- * The base storyboard (./index) compresses a run into scenes but keeps scenes
92
- * payload-free (title + narration + evidence span ids). To actually SHOW the
93
- * code an agent wrote, this module pulls the concrete edit (path, diff,
94
- * before/after, language) out of the raw edit-tool spans and renders a
95
- * self-contained HTML replay that types each file out, character by character,
96
- * like an editor recording.
97
- *
98
- * Additive on purpose: it reuses the canonical `Span` (trace/schema) and the
99
- * `Storyboard` IR (./index) without modifying the reducer/compiler — so it
100
- * composes with the existing pipeline and a Remotion consumer can read the same
101
- * `CodeEdit[]` to render an MP4.
102
- */
103
-
104
- /** A concrete code change lifted from a tool span. */
105
- interface CodeEdit {
106
- /** Span the edit came from — back-reference into the trace. */
107
- spanId: string;
108
- path: string;
109
- language?: string;
110
- /** Unified diff, when the tool carried one. */
111
- diff?: string;
112
- /** Full file body before / after, when present — enables true keystroke
113
- * animation rather than only flashing a diff. */
114
- before?: string;
115
- after?: string;
116
- additions: number;
117
- deletions: number;
118
- startedAt: number;
119
- }
120
- /** Extract a CodeEdit from a single span, or undefined if it is not an edit. */
121
- declare function codeEditFromSpan(span: Span): CodeEdit | undefined;
122
- /** All code edits in a run, in chronological order. */
123
- declare function extractCodeEdits(spans: readonly Span[]): CodeEdit[];
124
- /** Pair each code-edit (`diff`) scene with its concrete edit, matched via the
125
- * scene's evidence span ids. Scenes without a recoverable edit are dropped. */
126
- declare function codeEditsForStoryboard(storyboard: Storyboard, spans: readonly Span[]): Array<{
127
- scene: Scene;
128
- edit: CodeEdit;
129
- }>;
130
- /** The text the animation types for an edit: prefer the full new file body,
131
- * then the added lines of a diff, then a minimal placeholder so the scene is
132
- * never blank. */
133
- declare function editAnimationText(edit: CodeEdit): string;
134
- interface CodeAnimationOptions {
135
- /** Page title. Default "Agent writing code". */
136
- title?: string;
137
- /** Characters typed per animation tick. Higher = faster. Default 4. */
138
- charsPerTick?: number;
139
- /** Pause between files, ms. Default 900. */
140
- pauseBetweenMs?: number;
141
- }
142
- /**
143
- * Render a self-contained HTML page that animates the agent writing each file,
144
- * character by character, with a filename tab, line numbers, and a blinking
145
- * cursor — the shareable "watch it build" clip. No build step, no assets, no
146
- * deps. The same `CodeEdit[]` feeds a Remotion MP4 renderer in a consumer
147
- * package; this is the dependency-free baseline.
148
- */
149
- declare function renderCodeAnimationHtml(source: readonly Span[] | readonly CodeEdit[], opts?: CodeAnimationOptions): string;
150
-
151
- /**
152
- * Storyboard — compile a raw agent trace into a small set of meaningful scenes,
153
- * then render them as a shareable, watchable replay.
154
- *
155
- * Span[] → SemanticEvent[] → Storyboard{scenes} → { markdown | html }
156
- *
157
- * The trace is the source of truth; the storyboard is the IR; markdown/html
158
- * (and, in a consumer package, Remotion/MP4) are compiled targets. Everything
159
- * here is PURE — same spans in, same bytes out (no clock/random) — so a run's
160
- * replay is deterministic and diffable.
161
- *
162
- * Crucially, every scene carries a modality-typed VISUAL extracted from the
163
- * span — a browser/computer screenshot, a code diff, a terminal command +
164
- * output, file content, an API request/response, or reasoning prose — so no
165
- * matter what the agent did, the replay SHOWS it, not just narrates it. The
166
- * reducer is rules-based; an LLM pass can refine titles/summaries later, but
167
- * the structure + visuals do not depend on one. Renderers that need a browser
168
- * (Remotion, React) live in consumers; this module only emits strings.
169
- */
170
-
171
- /** What the agent meaningfully did — the compressed vocabulary. */
172
- type SemanticKind = 'understood_task' | 'user_message' | 'agent_reply' | 'reasoned' | 'ran_command' | 'read_file' | 'edited_code' | 'searched' | 'used_browser' | 'used_computer' | 'called_api' | 'called_tool' | 'evaluated' | 'observed_failure' | 'completed';
173
- /** The modality-typed payload a scene shows. This is what makes any agent
174
- * action — screen, browser, shell, code, API — actually viewable. */
175
- type SceneVisual = {
176
- type: 'screenshot';
177
- src: string;
178
- caption?: string;
179
- } | {
180
- type: 'browser';
181
- url?: string;
182
- action?: string;
183
- screenshot?: string;
184
- } | {
185
- type: 'diff';
186
- path: string;
187
- patch: string;
188
- } | {
189
- type: 'code';
190
- path: string;
191
- content: string;
192
- } | {
193
- type: 'terminal';
194
- command: string;
195
- output?: string;
196
- } | {
197
- type: 'api';
198
- method?: string;
199
- url: string;
200
- status?: number;
201
- request?: string;
202
- response?: string;
203
- } | {
204
- type: 'prose';
205
- text: string;
206
- } | {
207
- type: 'none';
208
- };
209
- interface SemanticEvent {
210
- kind: SemanticKind;
211
- /** One-line headline (the ticket/scene title). */
212
- title: string;
213
- /** Short human summary. */
214
- summary: string;
215
- /** The modality payload to show for this moment. */
216
- visual: SceneVisual;
217
- /** Span ids backing this moment — the evidence trail. */
218
- evidenceSpanIds: string[];
219
- /** 1 (noise) … 5 (pivotal: failures, edits). Drives selection + duration. */
220
- importance: 1 | 2 | 3 | 4 | 5;
221
- startTs: number;
222
- endTs: number;
223
- }
224
- interface ReduceOptions {
225
- /** Collapse adjacent same-kind moments into one. Default true. */
226
- collapseAdjacent?: boolean;
227
- }
228
- /**
229
- * Reduce a span tree into the meaningful moments a viewer cares about. The
230
- * conversation (user asks, agent replies) is lifted from LLM spans first so the
231
- * dialogue is first-class; the remaining work spans are classified + have their
232
- * modality visual extracted. Adjacent same-kind work moments collapse (the
233
- * compression step), carrying the latest visual; failures and conversation
234
- * turns never collapse.
235
- */
236
- declare function reduceToSemanticEvents(spans: readonly Span[], opts?: ReduceOptions): SemanticEvent[];
237
- type SceneType = 'title_card' | 'prompt' | 'reply' | 'reasoning' | 'terminal' | 'file' | 'diff' | 'search' | 'browser' | 'computer' | 'api' | 'tool' | 'eval' | 'error' | 'summary';
238
- interface Scene {
239
- sceneType: SceneType;
240
- title: string;
241
- narration: string;
242
- /** The modality payload the renderer shows. */
243
- visual: SceneVisual;
244
- durationMs: number;
245
- evidenceSpanIds: string[];
246
- }
247
- interface Storyboard {
248
- title: string;
249
- totalMs: number;
250
- scenes: Scene[];
251
- }
252
- interface CompileOptions {
253
- /** Headline for the title card. Default "Agent run". */
254
- title?: string;
255
- /** Max action scenes between the title + summary cards. Default 16. */
256
- maxScenes?: number;
257
- }
258
- /**
259
- * Select the moments worth showing and lay them out as scenes. Every failure
260
- * (importance 5) and edit (4) is always kept; the rest fill the budget by
261
- * importance, then re-sort chronological. A title card opens, a summary closes.
262
- */
263
- declare function compileStoryboard(events: readonly SemanticEvent[], opts?: CompileOptions): Storyboard;
264
- /** Render the storyboard as a Markdown timeline — the human-readable shot list. */
265
- declare function renderStoryboardMarkdown(storyboard: Storyboard): string;
266
- interface HtmlRenderOptions {
267
- /** Document title + on-page heading. Defaults to the storyboard title. */
268
- title?: string;
269
- }
270
- /**
271
- * Render the storyboard as a self-contained, auto-playing HTML replay — one
272
- * shareable file, no build step, no external assets. Each scene animates in
273
- * for its duration and SHOWS its modality (screenshot / diff / terminal / API
274
- * / browser / prose); controls let a viewer scrub. This is the "free clip" a
275
- * run produces; an MP4 is the same storyboard fed to Remotion in a consumer.
276
- */
277
- declare function renderStoryboardHtml(storyboard: Storyboard, opts?: HtmlRenderOptions): string;
278
-
279
- export { type CodeAnimationOptions, type CodeEdit, type CompileOptions, type HtmlRenderOptions, type ReduceOptions, type Scene, type SceneType, type SceneVisual, type SemanticEvent, type SemanticKind, type Storyboard, codeEditFromSpan, codeEditsForStoryboard, compileStoryboard, editAnimationText, extractCodeEdits, reduceToSemanticEvents, renderCodeAnimationHtml, renderStoryboardHtml, renderStoryboardMarkdown };