@tangle-network/agent-eval 0.140.1 → 0.141.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/CHANGELOG.md +15 -0
- package/dist/analyst/index.d.ts +74 -6
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +6 -6
- package/dist/{benchmark-command-Bo_hkhQf.js → benchmark-command-D8xXNVVh.js} +2239 -1820
- package/dist/benchmark-command-D8xXNVVh.js.map +1 -0
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-HwoBE32G.js → benchmarks-Ce8GdJbc.js} +4 -4
- package/dist/{benchmarks-HwoBE32G.js.map → benchmarks-Ce8GdJbc.js.map} +1 -1
- package/dist/campaign/index.js +3 -3
- package/dist/{campaign-BzjYNYVZ.js → campaign-COFTVy3Q.js} +3 -3
- package/dist/{campaign-BzjYNYVZ.js.map → campaign-COFTVy3Q.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +56 -13
- package/dist/contract/index.js.map +1 -1
- package/dist/{default-registry-BOiBXNFh.js → default-registry-BupFSXSN.js} +108 -20
- package/dist/default-registry-BupFSXSN.js.map +1 -0
- package/dist/default-registry-Ci7wAAR8.d.ts.map +1 -1
- package/dist/{dspy-rlm-engine-Bkak4nzo.js → dspy-rlm-engine-Bw8Zz9CX.js} +7 -4
- package/dist/{dspy-rlm-engine-Bkak4nzo.js.map → dspy-rlm-engine-Bw8Zz9CX.js.map} +1 -1
- package/dist/{extract-usage-C5vMw-0R.js → extract-usage-7l1Xq5ti.js} +2 -2
- package/dist/{extract-usage-C5vMw-0R.js.map → extract-usage-7l1Xq5ti.js.map} +1 -1
- package/dist/index.d.ts +68 -31
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +122 -46
- package/dist/index.js.map +1 -1
- package/dist/{kind-factory-DB7nIs35.js → kind-factory-Bvwe3pup.js} +11 -1
- package/dist/kind-factory-Bvwe3pup.js.map +1 -0
- package/dist/multishot/index.d.ts +29 -6
- package/dist/multishot/index.d.ts.map +1 -1
- package/dist/multishot/index.js +53 -3
- package/dist/multishot/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/dist/replay-BqTgoioO.d.ts.map +1 -1
- package/dist/{replay-k2MsOmv5.js → replay-DjUfTrHD.js} +40 -48
- package/dist/replay-DjUfTrHD.js.map +1 -0
- package/dist/{single-run-lock-CiQThJxB.js → single-run-lock-BcvPQY57.js} +65 -15
- package/dist/single-run-lock-BcvPQY57.js.map +1 -0
- package/dist/{skill-usage-CVVnoIx-.d.ts → skill-usage-CNZTk_LT.d.ts} +8 -4
- package/dist/{skill-usage-CVVnoIx-.d.ts.map → skill-usage-CNZTk_LT.d.ts.map} +1 -1
- package/dist/{skillopt-optimization-method-CSBQ8Qma.js → skillopt-optimization-method-DV6c4ooy.js} +2 -2
- package/dist/{skillopt-optimization-method-CSBQ8Qma.js.map → skillopt-optimization-method-DV6c4ooy.js.map} +1 -1
- package/dist/{store-otlp-vRByAR6h.js → store-otlp-D4I90_vR.js} +2 -2
- package/dist/{store-otlp-vRByAR6h.js.map → store-otlp-D4I90_vR.js.map} +1 -1
- package/dist/traces.js +4 -4
- package/docs/adapters-observability.md +35 -21
- package/docs/concepts.md +1 -0
- package/docs/distributed-driver.md +7 -3
- package/docs/feature-guide.md +1 -0
- package/docs/insight-report.md +1 -1
- package/docs/trace-analysis.md +11 -0
- package/docs/wire-protocol.md +70 -2
- package/package.json +5 -3
- package/dist/benchmark-command-Bo_hkhQf.js.map +0 -1
- package/dist/default-registry-BOiBXNFh.js.map +0 -1
- package/dist/kind-factory-DB7nIs35.js.map +0 -1
- package/dist/replay-k2MsOmv5.js.map +0 -1
- package/dist/single-run-lock-CiQThJxB.js.map +0 -1
package/docs/wire-protocol.md
CHANGED
|
@@ -96,14 +96,71 @@ GET /v1/version
|
|
|
96
96
|
```json
|
|
97
97
|
{
|
|
98
98
|
"package": "@tangle-network/agent-eval",
|
|
99
|
-
"version": "0.
|
|
99
|
+
"version": "0.140.1",
|
|
100
100
|
"wireVersion": "1.0.0",
|
|
101
|
-
"apiSurface": ["judge", "listRubrics", "version"]
|
|
101
|
+
"apiSurface": ["judge", "listRubrics", "version", "feedback.ingest", "traces.ingest"]
|
|
102
102
|
}
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
`version` matches the package version. `wireVersion` bumps independently: only on breaking request/response schema changes. Package versions can differ across releases as long as `wireVersion` matches.
|
|
106
106
|
|
|
107
|
+
### `traces.ingest`: batch-ingest production trace events
|
|
108
|
+
|
|
109
|
+
```http
|
|
110
|
+
POST /v1/traces/ingest
|
|
111
|
+
{
|
|
112
|
+
"events": [
|
|
113
|
+
{
|
|
114
|
+
"eventId": "evt_01h...",
|
|
115
|
+
"runId": "run_01h...",
|
|
116
|
+
"spanId": "span_01h...",
|
|
117
|
+
"kind": "log",
|
|
118
|
+
"timestamp": 1732556400000,
|
|
119
|
+
"payload": { "message": "..." }
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"accepted": 1,
|
|
128
|
+
"rejected": 0,
|
|
129
|
+
"errors": []
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Also accepts `content-type: application/x-ndjson` — one `TraceEvent` object per line instead of a wrapping `{"events": [...]}` body. Max 10,000 events per call; chunk bigger streams.
|
|
134
|
+
|
|
135
|
+
Best-effort: each event is appended independently, so one bad event doesn't poison the batch — rejects land in `errors[]`, keyed by `eventId`. The underlying store is append-only: retries of the same payload produce duplicate events, so consumers should de-duplicate by `eventId` downstream (production traces frequently land via at-least-once buses — Kafka, SQS — where dedup is unavoidable). Requires a `traceStore` passed to `createApp`; without one this returns `503 service_unavailable`.
|
|
136
|
+
|
|
137
|
+
`kind` is one of `log`, `error`, `budget_decrement`, `budget_breach`, `state_mutation`, `policy_violation`, `redaction_applied`, `custom`, matching the `TraceSchema` v1 `EventKind` enum. `payload` is free-form — the runtime owns its shape.
|
|
138
|
+
|
|
139
|
+
### `feedback.ingest`: ingest a review/feedback trajectory
|
|
140
|
+
|
|
141
|
+
```http
|
|
142
|
+
POST /v1/feedback
|
|
143
|
+
{
|
|
144
|
+
"id": "traj_01h...",
|
|
145
|
+
"task": { "intent": "Summarize the incident report." },
|
|
146
|
+
"labels": [
|
|
147
|
+
{ "source": "user", "kind": "approve", "value": true, "createdAt": "2026-08-01T00:00:00Z" }
|
|
148
|
+
],
|
|
149
|
+
"createdAt": "2026-08-01T00:00:00Z"
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"id": "traj_01h...",
|
|
156
|
+
"persisted": true
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Idempotent on `id`: re-posting the same id replaces the prior record. Requires a `feedbackStore` passed to `createApp`; without one this returns `503 service_unavailable`.
|
|
161
|
+
|
|
162
|
+
`task.intent` and `createdAt` are required; `attempts` and `labels` default to `[]`; `outcome`, `split` (`train` / `dev` / `test` / `holdout`), and `tags` are optional. See `FeedbackTrajectorySchema` in `src/wire/schemas.ts` for the full shape, including per-attempt artifacts, proposed actions, and per-label severity.
|
|
163
|
+
|
|
107
164
|
### `GET /healthz`: liveness
|
|
108
165
|
|
|
109
166
|
For probing whether a server is up. Returns `{ "status": "ok", "uptimeSec": <number> }`.
|
|
@@ -132,6 +189,7 @@ Every error response uses the same shape:
|
|
|
132
189
|
| 404 | `rubric_not_found` | Unknown `rubricName`. |
|
|
133
190
|
| 500 | `judge_error` | LLM returned malformed output. |
|
|
134
191
|
| 500 | `internal_error` | Unexpected server error. |
|
|
192
|
+
| 503 | `service_unavailable` | `traces.ingest` or `feedback.ingest` called without the matching store passed to `createApp`. |
|
|
135
193
|
|
|
136
194
|
stdio RPC uses the same shape inside an envelope: `{"error": {...}}` instead of `{"result": {...}}`. Exit code is non-zero on error.
|
|
137
195
|
|
|
@@ -154,6 +212,16 @@ curl http://localhost:5005/v1/rubrics | jq
|
|
|
154
212
|
curl -X POST http://localhost:5005/v1/judge \
|
|
155
213
|
-H 'content-type: application/json' \
|
|
156
214
|
-d '{"rubricName":"anti-slop","content":"We just shipped …"}'
|
|
215
|
+
|
|
216
|
+
# traces ingest
|
|
217
|
+
curl -X POST http://localhost:5005/v1/traces/ingest \
|
|
218
|
+
-H 'content-type: application/json' \
|
|
219
|
+
-d '{"events":[{"eventId":"evt_1","runId":"run_1","kind":"log","timestamp":1732556400000,"payload":{}}]}'
|
|
220
|
+
|
|
221
|
+
# feedback ingest
|
|
222
|
+
curl -X POST http://localhost:5005/v1/feedback \
|
|
223
|
+
-H 'content-type: application/json' \
|
|
224
|
+
-d '{"id":"traj_1","task":{"intent":"Summarize the incident report."},"createdAt":"2026-08-01T00:00:00Z"}'
|
|
157
225
|
```
|
|
158
226
|
|
|
159
227
|
## Using stdio RPC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-eval",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.141.0",
|
|
4
4
|
"description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-eval#readme",
|
|
6
6
|
"repository": {
|
|
@@ -168,8 +168,9 @@
|
|
|
168
168
|
"dependencies": {
|
|
169
169
|
"@asteasolutions/zod-to-openapi": "^9.1.0",
|
|
170
170
|
"@hono/node-server": "^2.0.12",
|
|
171
|
-
"@tangle-network/agent-core": "0.4.
|
|
172
|
-
"@tangle-network/agent-interface": "0.
|
|
171
|
+
"@tangle-network/agent-core": "0.4.30",
|
|
172
|
+
"@tangle-network/agent-interface": "0.41.0",
|
|
173
|
+
"@tangle-network/agent-trace-contract": "^1.0.2",
|
|
173
174
|
"hono": "^4.12.32",
|
|
174
175
|
"linear-sum-assignment": "1.0.9",
|
|
175
176
|
"re2js": "2.8.6",
|
|
@@ -190,6 +191,7 @@
|
|
|
190
191
|
"oxc-parser": "^0.141.0",
|
|
191
192
|
"publint": "^0.3.22",
|
|
192
193
|
"tsdown": "^0.22.14",
|
|
194
|
+
"tsx": "^4.23.1",
|
|
193
195
|
"typescript": "^7.0.2",
|
|
194
196
|
"vitest": "^4.1.10",
|
|
195
197
|
"yaml": "2.9.0"
|