@tangle-network/agent-eval 0.190.1 → 0.191.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 +31 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-DNV_U6QR.d.ts → agent-profile-DDfIjdyS.d.ts} +3 -3
- package/dist/{agent-profile-DNV_U6QR.d.ts.map → agent-profile-DDfIjdyS.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +11 -11
- package/dist/analyst/index.js +5 -5
- package/dist/{insight-report-CvPkEIcC.d.ts → analyze-runs-CPiKLJFs.d.ts} +73 -3
- package/dist/analyze-runs-CPiKLJFs.d.ts.map +1 -0
- package/dist/{attribute-vocabulary-DLJ6303h.d.ts → attribute-vocabulary-CcXqHODT.d.ts} +23 -12
- package/dist/attribute-vocabulary-CcXqHODT.d.ts.map +1 -0
- package/dist/{benchmark-command-BXIr_k8D.js → benchmark-command-3tZJnD82.js} +8 -8
- package/dist/{benchmark-command-BXIr_k8D.js.map → benchmark-command-3tZJnD82.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +3 -3
- package/dist/benchmarks/index.js +3 -3
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +9 -7
- package/dist/{campaign-B7q74uIh.js → campaign-C8iWEF0M.js} +10 -8
- package/dist/{campaign-B7q74uIh.js.map → campaign-C8iWEF0M.js.map} +1 -1
- package/dist/{campaign-evidence-D40-LHIL.js → campaign-evidence-BqjlTM3P.js} +10 -111
- package/dist/campaign-evidence-BqjlTM3P.js.map +1 -0
- package/dist/claim-V9Zqbq0J.js +54 -0
- package/dist/claim-V9Zqbq0J.js.map +1 -0
- package/dist/cli.js +99 -2
- package/dist/cli.js.map +1 -1
- package/dist/client-wFyDisxi.d.ts +236 -0
- package/dist/client-wFyDisxi.d.ts.map +1 -0
- package/dist/contract/index.d.ts +10 -11
- package/dist/contract/index.js +9 -139
- package/dist/contract/index.js.map +1 -1
- package/dist/{default-registry-B5HrwrPM.d.ts → default-registry-DK_9aVJf.d.ts} +6 -6
- package/dist/{default-registry-B5HrwrPM.d.ts.map → default-registry-DK_9aVJf.d.ts.map} +1 -1
- package/dist/{default-registry-16I-Bxlf.js → default-registry-xMLX160E.js} +3 -3
- package/dist/{default-registry-16I-Bxlf.js.map → default-registry-xMLX160E.js.map} +1 -1
- package/dist/{define-agent-eval-DPizhHfy.js → define-agent-eval-BE43YTm4.js} +27 -109
- package/dist/define-agent-eval-BE43YTm4.js.map +1 -0
- package/dist/{define-agent-eval-DblGedQk.d.ts → define-agent-eval-P28y7mI1.d.ts} +16 -20
- package/dist/define-agent-eval-P28y7mI1.d.ts.map +1 -0
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/diagnosis/index.js +1 -1
- package/dist/{dspy-rlm-engine-Cs5LzJ-f.js → dspy-rlm-engine-MfpwoEaj.js} +3 -3
- package/dist/{dspy-rlm-engine-Cs5LzJ-f.js.map → dspy-rlm-engine-MfpwoEaj.js.map} +1 -1
- package/dist/{engine-BkLCnZQX.d.ts → engine-vNiM02Ub.d.ts} +4 -4
- package/dist/{engine-BkLCnZQX.d.ts.map → engine-vNiM02Ub.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +2 -2
- package/dist/{exact-types-CfpP2A4Z.d.ts → exact-types-KGxBWH4b.d.ts} +2 -2
- package/dist/{exact-types-CfpP2A4Z.d.ts.map → exact-types-KGxBWH4b.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +1 -1
- package/dist/experiment/index.js +2 -1
- package/dist/experiment/index.js.map +1 -1
- package/dist/{external-optimizer-process-BnSmrkgL.js → external-optimizer-process-xFTliuiK.js} +2 -2
- package/dist/{external-optimizer-process-BnSmrkgL.js.map → external-optimizer-process-xFTliuiK.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-kbcPu5po.js → external-optimizer-subprocess-B234V9V0.js} +4 -27
- package/dist/external-optimizer-subprocess-B234V9V0.js.map +1 -0
- package/dist/{extract-usage-BrQ8mCLX.js → extract-usage-DFATEuWW.js} +2 -2
- package/dist/{extract-usage-BrQ8mCLX.js.map → extract-usage-DFATEuWW.js.map} +1 -1
- package/dist/{feedback-trajectory-BYjh7NEM.d.ts → feedback-trajectory-BXCGTRkz.d.ts} +3 -3
- package/dist/{feedback-trajectory-BYjh7NEM.d.ts.map → feedback-trajectory-BXCGTRkz.d.ts.map} +1 -1
- package/dist/hosted/index.d.ts +66 -6
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/hosted/index.js +2 -2
- package/dist/{index-CJv56rhX.d.ts → index-CzfnASj_.d.ts} +18 -11
- package/dist/index-CzfnASj_.d.ts.map +1 -0
- package/dist/{index-2e_MTznj.d.ts → index-D-TN7ZRM.d.ts} +6 -6
- package/dist/{index-2e_MTznj.d.ts.map → index-D-TN7ZRM.d.ts.map} +1 -1
- package/dist/{index-CWoIJHmy.d.ts → index-DH-MWH5f.d.ts} +10 -104
- package/dist/index-DH-MWH5f.d.ts.map +1 -0
- package/dist/index.d.ts +16 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -11
- package/dist/jev.d.ts +2 -2
- package/dist/{kind-factory-ByZeXDqF.js → kind-factory-CdPPHtGZ.js} +10 -26
- package/dist/kind-factory-CdPPHtGZ.js.map +1 -0
- package/dist/{llm-judge-BnxAv7ed.js → llm-judge-NJOHM0iA.js} +9 -1426
- package/dist/llm-judge-NJOHM0iA.js.map +1 -0
- package/dist/{matrix-CNypzP-v.d.ts → matrix-CgqdFm5N.d.ts} +2 -2
- package/dist/{matrix-CNypzP-v.d.ts.map → matrix-CgqdFm5N.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/{otel-spans-CQY1pNiN.js → otel-spans-DS7t1t1J.js} +8 -19
- package/dist/otel-spans-DS7t1t1J.js.map +1 -0
- package/dist/otlp-attributes-D9ptWaIJ.js +53 -0
- package/dist/otlp-attributes-D9ptWaIJ.js.map +1 -0
- package/dist/{prime-protocol-Fwvctmhm.d.ts → prime-protocol-T0i6xcAs.d.ts} +2 -2
- package/dist/{prime-protocol-Fwvctmhm.d.ts.map → prime-protocol-T0i6xcAs.d.ts.map} +1 -1
- package/dist/{produced-state-BXjXJHJT.js → produced-state-CY-L7CqS.js} +3 -3
- package/dist/{produced-state-BXjXJHJT.js.map → produced-state-CY-L7CqS.js.map} +1 -1
- package/dist/{registry-mAQVtuLx.d.ts → registry-Bu3lNole.d.ts} +3 -3
- package/dist/{registry-mAQVtuLx.d.ts.map → registry-Bu3lNole.d.ts.map} +1 -1
- package/dist/rl.d.ts +1 -1
- package/dist/rl.js +1 -1
- package/dist/{run-record-DnMFyg_g.js → run-record-tNnlQIrD.js} +2 -10
- package/dist/{run-record-DnMFyg_g.js.map → run-record-tNnlQIrD.js.map} +1 -1
- package/dist/search-ledger-CQ8Uy4FK.js +1451 -0
- package/dist/search-ledger-CQ8Uy4FK.js.map +1 -0
- package/dist/search-ledger-file-EvdDZRhv.js +27 -0
- package/dist/search-ledger-file-EvdDZRhv.js.map +1 -0
- package/dist/search-shipper-C55V7HE3.js +781 -0
- package/dist/search-shipper-C55V7HE3.js.map +1 -0
- package/dist/{semantic-concept-judge-ClB73cei.js → semantic-concept-judge-Bt7bXAAo.js} +3 -3
- package/dist/{semantic-concept-judge-ClB73cei.js.map → semantic-concept-judge-Bt7bXAAo.js.map} +1 -1
- package/dist/{skillopt-optimization-method-l2vDBtKp.js → skillopt-optimization-method-DwO3TOAV.js} +6 -5
- package/dist/{skillopt-optimization-method-l2vDBtKp.js.map → skillopt-optimization-method-DwO3TOAV.js.map} +1 -1
- package/dist/{statistical-heldout-CLpjYffJ.d.ts → statistical-heldout-BED3wBtX.d.ts} +2 -2
- package/dist/{statistical-heldout-CLpjYffJ.d.ts.map → statistical-heldout-BED3wBtX.d.ts.map} +1 -1
- package/dist/{store-otlp-84DH0OEH.js → store-otlp-BPowgPm6.js} +2 -2
- package/dist/{store-otlp-84DH0OEH.js.map → store-otlp-BPowgPm6.js.map} +1 -1
- package/dist/{store-tool-spans-DUiqyHvR.js → store-tool-spans-BcC_5ef-.js} +5 -5
- package/dist/{store-tool-spans-DUiqyHvR.js.map → store-tool-spans-BcC_5ef-.js.map} +1 -1
- package/dist/{store-tool-spans-BBXs8hDP.d.ts → store-tool-spans-Cfh9XUCm.d.ts} +5 -9
- package/dist/store-tool-spans-Cfh9XUCm.d.ts.map +1 -0
- package/dist/{task-failure-attributes-B34TiMBe.js → task-failure-attributes-CEqEfuIY.js} +17 -9
- package/dist/task-failure-attributes-CEqEfuIY.js.map +1 -0
- package/dist/{tool-groups-W7MJobX_.d.ts → tool-groups-D-mkeN0N.d.ts} +3 -3
- package/dist/tool-groups-D-mkeN0N.d.ts.map +1 -0
- package/dist/trace-attributes.d.ts +1 -1
- package/dist/trace-attributes.js +23 -75
- package/dist/trace-attributes.js.map +1 -1
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/traces.d.ts +11 -18
- package/dist/traces.d.ts.map +1 -1
- package/dist/traces.js +16 -16
- package/dist/traces.js.map +1 -1
- package/dist/{types-BvmWNjjs.d.ts → types-BmQRs661.d.ts} +2 -2
- package/dist/{types-BvmWNjjs.d.ts.map → types-BmQRs661.d.ts.map} +1 -1
- package/dist/{types-Bay1dh2o.d.ts → types-CeDfCRXp.d.ts} +11 -16
- package/dist/types-CeDfCRXp.d.ts.map +1 -0
- package/dist/{types-Cvqy7asY.d.ts → types-ClK-sHs8.d.ts} +2 -2
- package/dist/{types-Cvqy7asY.d.ts.map → types-ClK-sHs8.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +1 -1
- package/docs/hosted-ingest-spec.md +92 -133
- package/docs/public-api.md +46 -35
- package/docs/search-ledger.md +17 -0
- package/package.json +2 -2
- package/dist/analyze-runs-BvK4-wSs.d.ts +0 -75
- package/dist/analyze-runs-BvK4-wSs.d.ts.map +0 -1
- package/dist/attribute-vocabulary-DLJ6303h.d.ts.map +0 -1
- package/dist/campaign-evidence-D40-LHIL.js.map +0 -1
- package/dist/client-BhEyAdfe.d.ts +0 -202
- package/dist/client-BhEyAdfe.d.ts.map +0 -1
- package/dist/client-QwJpsNYU.js +0 -655
- package/dist/client-QwJpsNYU.js.map +0 -1
- package/dist/define-agent-eval-DPizhHfy.js.map +0 -1
- package/dist/define-agent-eval-DblGedQk.d.ts.map +0 -1
- package/dist/external-optimizer-subprocess-kbcPu5po.js.map +0 -1
- package/dist/index-CJv56rhX.d.ts.map +0 -1
- package/dist/index-CWoIJHmy.d.ts.map +0 -1
- package/dist/insight-report-CvPkEIcC.d.ts.map +0 -1
- package/dist/kind-factory-ByZeXDqF.js.map +0 -1
- package/dist/llm-judge-BnxAv7ed.js.map +0 -1
- package/dist/otel-spans-CQY1pNiN.js.map +0 -1
- package/dist/otlp-attributes-BpC_blLF.js +0 -83
- package/dist/otlp-attributes-BpC_blLF.js.map +0 -1
- package/dist/store-tool-spans-BBXs8hDP.d.ts.map +0 -1
- package/dist/task-failure-attributes-B34TiMBe.js.map +0 -1
- package/dist/tool-groups-W7MJobX_.d.ts.map +0 -1
- package/dist/types-Bay1dh2o.d.ts.map +0 -1
|
@@ -1,133 +1,121 @@
|
|
|
1
1
|
# Hosted-ingest wire spec: `2026-07-24.v1`
|
|
2
2
|
|
|
3
|
-
This is the only hosted-ingest wire format
|
|
3
|
+
This is the only hosted-ingest wire format the current package implements.
|
|
4
4
|
Clients and servers reject every other wire version.
|
|
5
5
|
|
|
6
|
-
This is the contract between `@tangle-network/agent-eval` and any hosted
|
|
7
|
-
|
|
6
|
+
This is the contract between `@tangle-network/agent-eval` and any hosted or self-hosted store.
|
|
7
|
+
A builder can use our store, self-host the reference receiver from `examples/hosted-ingest-server/`, or implement this spec.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- Self-host the reference receiver from
|
|
11
|
-
`examples/hosted-ingest-server/`.
|
|
12
|
-
- Implement their own orchestrator against this spec.
|
|
9
|
+
The wire carries two streams:
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
- **Search ledgers.** A producer ships a search's hash-chained ledger and the blobs its entries name.
|
|
12
|
+
The ledger is the search's record: nodes, edges, cells, decisions and the claim ([search ledger](./search-ledger.md)).
|
|
13
|
+
- **Trace spans.** OTLP-shaped spans with `tangle.*` pivots, so a store can join a cell to its execution.
|
|
14
|
+
|
|
15
|
+
The shapes are exported from `@tangle-network/agent-eval/hosted` as zod schemas.
|
|
16
|
+
A store imports them instead of copying them.
|
|
15
17
|
|
|
16
18
|
---
|
|
17
19
|
|
|
18
20
|
## Transport
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Headers on every request:
|
|
21
23
|
|
|
22
24
|
| Header | Value |
|
|
23
25
|
|---|---|
|
|
24
|
-
| `Authorization` | `Bearer <tenant-key>`
|
|
25
|
-
| `
|
|
26
|
-
| `X-Tangle-
|
|
27
|
-
| `
|
|
28
|
-
| `Idempotency-Key` | Non-empty request key, at most 256 characters; clients generate one per call and reuse it across retries |
|
|
26
|
+
| `Authorization` | `Bearer <tenant-key>` |
|
|
27
|
+
| `X-Tangle-Tenant-Id` | The tenant's stable id |
|
|
28
|
+
| `X-Tangle-Wire-Version` | `2026-07-24.v1` |
|
|
29
|
+
| `Idempotency-Key` | On `POST` and `PUT`: at most 256 characters, reused across retries |
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
The server can return 202 for asynchronous acceptance or 200 for synchronous acceptance.
|
|
31
|
+
A client retries network errors, 408, 429 and 5xx.
|
|
32
|
+
When the response carries `Retry-After` (delay-seconds or an HTTP date), the client waits exactly that long before the next attempt; otherwise it backs off exponentially.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
---
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
## Search ledgers
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
incrementally via repeated calls with the same `runId`. The
|
|
40
|
-
orchestrator deduplicates by `(tenantId, runId, generation.index)`.
|
|
38
|
+
A producer ships in this order, so a store has an entry's content before the entry.
|
|
41
39
|
|
|
42
|
-
### `
|
|
40
|
+
### `PUT /v1/search-blobs/<sha256 hex>`
|
|
43
41
|
|
|
44
|
-
Body:
|
|
42
|
+
Body: the exact bytes an artifact ref names.
|
|
43
|
+
`Content-Type` is `application/json` for the JSON blobs the recorder writes, otherwise `application/octet-stream`.
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`
|
|
49
|
-
|
|
45
|
+
The store re-hashes the bytes and refuses a mismatch with 422.
|
|
46
|
+
The call is idempotent by content.
|
|
47
|
+
Response (`SearchBlobPutResponseSchema`): `{ sha256, byteLength, state }`, where `state` is `stored`, `masked` or `withheld`.
|
|
48
|
+
A store masks or withholds bytes its redaction scan or the tenant's content posture refuses; it never rejects the entry that names them.
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
### `GET /v1/ingest/search-ledger/<searchId>/head`
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
Response (`SearchLedgerHeadSchema`): `{ searchId, nextSequence, headHash }`.
|
|
53
|
+
`nextSequence` is the number of entries the store holds, and `headHash` is the hash of the last one, or null when it holds none.
|
|
54
|
+
A restarted producer starts here.
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
interface EvalRunEvent {
|
|
57
|
-
runId: string // stable; same id across all generations of one run
|
|
58
|
-
runDir: string // logical run directory (mem://... or filesystem path)
|
|
59
|
-
timestamp: string // ISO-8601
|
|
60
|
-
status: // lifecycle stage this event represents
|
|
61
|
-
| 'started'
|
|
62
|
-
| 'baseline-complete'
|
|
63
|
-
| 'generation-complete'
|
|
64
|
-
| 'gate-decided'
|
|
65
|
-
| 'finished'
|
|
66
|
-
| 'errored'
|
|
67
|
-
labels: Record<string, string> // free-form (env, branch, model id, etc.)
|
|
68
|
-
baseline?: EvalRunGenerationSnapshot // present when status >= baseline-complete
|
|
69
|
-
generations: EvalRunGenerationSnapshot[]
|
|
70
|
-
gateDecision?: // present when status >= gate-decided
|
|
71
|
-
| 'ship' | 'hold' | 'need_more_work' | 'model_ceiling' | 'arch_ceiling'
|
|
72
|
-
holdoutLift?: number // winner-on-holdout - baseline-on-holdout
|
|
73
|
-
totalCostUsd: number
|
|
74
|
-
totalDurationMs: number
|
|
75
|
-
errorMessage?: string // present when status === 'errored'
|
|
76
|
-
insightReport?: InsightReport // current report contract
|
|
77
|
-
}
|
|
78
|
-
```
|
|
56
|
+
### `POST /v1/ingest/search-ledger`
|
|
79
57
|
|
|
80
|
-
|
|
58
|
+
Body (`IngestSearchLedgerRequestSchema`):
|
|
81
59
|
|
|
82
60
|
```ts
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
costUsd: number
|
|
90
|
-
durationMs: number
|
|
61
|
+
{
|
|
62
|
+
wireVersion: '2026-07-24.v1'
|
|
63
|
+
searchId: string
|
|
64
|
+
runKind: 'optimization' | 'eval' // an eval is a one-node search
|
|
65
|
+
fromSequence: number // the sequence of lines[0]
|
|
66
|
+
lines: string[] // canonical ledger lines, without newlines
|
|
91
67
|
}
|
|
92
68
|
```
|
|
93
69
|
|
|
94
|
-
|
|
70
|
+
At most 1,000 lines and 1 MiB of line bytes per request.
|
|
71
|
+
Each line is the producer's own ledger bytes, so producer and store hash identical input.
|
|
95
72
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
73
|
+
The store applies `admitSearchLedgerBatch` to the batch, in one transaction:
|
|
74
|
+
|
|
75
|
+
1. `fromSequence` past the store's head: `409 sequence_gap`.
|
|
76
|
+
2. Each line must verify alone with `parseSearchLedgerLine`: the schema tag, the entry and event schemas, canonical bytes, its `entryHash`, and its `searchId`. A line that does not: 422.
|
|
77
|
+
3. A line below the head with the stored hash is a no-op; a different hash is `409 chain_conflict`.
|
|
78
|
+
4. The first new line must extend the stored head; if it does not, `409 chain_conflict`.
|
|
79
|
+
5. The new entries pass the `SearchState` state machine, or the batch returns 422 and stores nothing.
|
|
80
|
+
|
|
81
|
+
Response (`SearchLedgerHeadSchema`): the head after the batch.
|
|
82
|
+
A 409 body (`SearchLedgerConflictSchema`) is `{ error: 'sequence_gap' | 'chain_conflict', message, head }`.
|
|
83
|
+
|
|
84
|
+
A producer resends from `head.nextSequence` after a gap.
|
|
85
|
+
It stops on a fork: the store holds a different chain for the same search, and nothing is overwritten.
|
|
86
|
+
|
|
87
|
+
`runKind` is fixed by the first batch; a later batch with another kind is a 422.
|
|
88
|
+
|
|
89
|
+
### The shipper
|
|
110
90
|
|
|
111
|
-
|
|
91
|
+
`shipSearchLedger({ tenant, ledger: { path, searchId }, runKind })` ships every complete line of a ledger file and returns the store's head and blob counts.
|
|
92
|
+
`startSearchShipper(...)` tails the file while the search runs: the search never waits on the network, and `stop()` ships the rest.
|
|
93
|
+
`agent-eval search ship <ledger> --run-kind optimization|eval` does the same from a terminal, reading the store from `TANGLE_INGEST_URL`, `TANGLE_INGEST_API_KEY` and `TANGLE_TENANT_ID`.
|
|
94
|
+
`selfImprove({ hostedTenant, searchLedger })` runs the tailing shipper for its own ledger.
|
|
95
|
+
|
|
96
|
+
`content: 'digests'` ships entries without blobs, so the store holds refs and digests but no text.
|
|
97
|
+
A blob whose local bytes are missing or do not match their ref is not uploaded and is reported under `blobs.missing`; the entries still ship.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Trace spans
|
|
102
|
+
|
|
103
|
+
### `POST /v1/ingest/traces`
|
|
104
|
+
|
|
105
|
+
Body (`IngestTracesRequestSchema`): `{ wireVersion, spans: TraceSpanEvent[] }`.
|
|
106
|
+
Response (`IngestResponseSchema`): `{ accepted, rejected: Array<{ index, reason }> }`.
|
|
112
107
|
|
|
113
108
|
```ts
|
|
114
109
|
interface TraceSpanEvent {
|
|
115
|
-
// Standard OTel
|
|
116
110
|
traceId: string
|
|
117
111
|
spanId: string
|
|
118
112
|
parentSpanId?: string
|
|
119
113
|
name: string
|
|
120
|
-
startTimeUnixNano: string // canonical unsigned 64-bit integer
|
|
121
|
-
endTimeUnixNano: string
|
|
114
|
+
startTimeUnixNano: string // canonical unsigned 64-bit integer in base 10
|
|
115
|
+
endTimeUnixNano: string
|
|
122
116
|
attributes: Record<string, string | number | boolean>
|
|
123
|
-
events?: Array<{
|
|
124
|
-
|
|
125
|
-
name: string
|
|
126
|
-
attributes?: Record<string, string | number | boolean>
|
|
127
|
-
}>
|
|
128
|
-
status?: { code: 'OK' | 'ERROR' | 'UNSET', message? }
|
|
129
|
-
|
|
130
|
-
// Tangle additions (all optional) for pivoting
|
|
117
|
+
events?: Array<{ timeUnixNano: string; name: string; attributes?: Record<string, string | number | boolean> }>
|
|
118
|
+
status?: { code: 'OK' | 'ERROR' | 'UNSET'; message?: string }
|
|
131
119
|
'tangle.runId'?: string
|
|
132
120
|
'tangle.generation'?: number
|
|
133
121
|
'tangle.cellId'?: string
|
|
@@ -135,59 +123,30 @@ interface TraceSpanEvent {
|
|
|
135
123
|
}
|
|
136
124
|
```
|
|
137
125
|
|
|
126
|
+
A store keeps at most one span per `(tenantId, traceId, spanId)`.
|
|
127
|
+
It accepts an exact duplicate as stored and rejects a conflicting payload with the same identity.
|
|
128
|
+
When an `Idempotency-Key` matches a request from the same tenant in the last 24 hours, it returns the recorded response.
|
|
129
|
+
|
|
138
130
|
---
|
|
139
131
|
|
|
140
132
|
## Server requirements
|
|
141
133
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
1.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
3. **Validate tenant isolation**: queries with `tenantId` X never return
|
|
150
|
-
data tagged with `tenantId` Y. Test this adversarially.
|
|
151
|
-
4. **Honor idempotency**: require an `Idempotency-Key`; when it matches a prior request to the same endpoint from the same tenant in the last 24 hours, return the same response without processing the body again.
|
|
152
|
-
5. **Deduplicate spans**: store at most one span for each `(tenantId, traceId, spanId)` identity.
|
|
153
|
-
Accept an exact duplicate as already stored and reject a conflicting payload with the same identity.
|
|
154
|
-
6. **Keep run state monotonic**: accept forward lifecycle transitions, but never replace `finished` or `errored` with a late event.
|
|
155
|
-
Delayed events can add a missing generation without replacing terminal totals, labels, or status.
|
|
156
|
-
7. **Persist eval-runs durably**: at least the event + cell scores must
|
|
157
|
-
survive an orchestrator restart. Trace spans MAY be best-effort.
|
|
158
|
-
8. **Provide read access**: GET endpoints for the tenant to list + fetch
|
|
159
|
-
their own runs. Wire format for reads is NOT part of this spec: each
|
|
160
|
-
orchestrator can pick its own (REST + JSON, gRPC, GraphQL).
|
|
161
|
-
|
|
162
|
-
Servers SHOULD also:
|
|
163
|
-
|
|
164
|
-
- Provide a webhook callback per tenant for `gate-decided` events.
|
|
165
|
-
- Provide a billable-events emitter (Stripe meter / equivalent) per ingest
|
|
166
|
-
call so consumption can be metered.
|
|
167
|
-
- Provide a dashboard or API to view + diff per-scenario lifts over time.
|
|
134
|
+
A store that implements this spec must:
|
|
135
|
+
|
|
136
|
+
1. Reject a request without a valid bearer token (401) or with an unknown tenant (404).
|
|
137
|
+
2. Reject every wire version other than `2026-07-24.v1` (400) and name the accepted one.
|
|
138
|
+
3. Isolate tenants: a read for tenant X never returns tenant Y's data, and a blob, search or span of another tenant reads as absent.
|
|
139
|
+
4. Apply the search-ledger batch rule above, and store a batch whole or not at all.
|
|
140
|
+
5. Keep search entries, blobs and their metadata durably; trace spans may be best-effort.
|
|
168
141
|
|
|
169
142
|
---
|
|
170
143
|
|
|
171
144
|
## Reference implementation
|
|
172
145
|
|
|
173
|
-
`examples/hosted-ingest-server/` is
|
|
174
|
-
It
|
|
175
|
-
|
|
146
|
+
`examples/hosted-ingest-server/` is an in-memory Hono receiver for local development.
|
|
147
|
+
It applies `admitSearchLedgerBatch` and `SearchState` to every batch, re-hashes blobs, and serves `GET /v1/searches/<searchId>` with the replayed audit.
|
|
148
|
+
A process restart clears it.
|
|
176
149
|
|
|
177
150
|
```sh
|
|
178
151
|
TENANT_KEY=dev-token TENANT_ID=acme pnpm tsx examples/hosted-ingest-server/server.ts
|
|
179
152
|
```
|
|
180
|
-
|
|
181
|
-
Send events with [`createHostedClient`](../src/hosted/client.ts) from `@tangle-network/agent-eval/hosted`.
|
|
182
|
-
Call `client.ingestEvalRun(event)` with a valid `EvalRunEvent` after configuring the client's endpoint, tenant ID, and API key.
|
|
183
|
-
For `selfImprove`, configure `hostedTenant` as shown in the [receiver example](../examples/hosted-ingest-server/).
|
|
184
|
-
The receiver's authenticated `GET /v1/runs` endpoint lists ingested runs.
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
## Version
|
|
189
|
-
|
|
190
|
-
`HostedWireVersion` is `"2026-07-24.v1"`.
|
|
191
|
-
The current clients emit only this value.
|
|
192
|
-
Servers return 400 for every other value and list the accepted version.
|
|
193
|
-
There are no compatibility readers or migration branches.
|
package/docs/public-api.md
CHANGED
|
@@ -7,11 +7,11 @@ Generated by `pnpm api:census` on demand — this is a dated reading, not a gate
|
|
|
7
7
|
| measure | count |
|
|
8
8
|
| --- | --- |
|
|
9
9
|
| export subpaths | 32 |
|
|
10
|
-
| published value exports (subpath x symbol) |
|
|
11
|
-
| distinct symbols |
|
|
12
|
-
| production |
|
|
10
|
+
| published value exports (subpath x symbol) | 1511 |
|
|
11
|
+
| distinct symbols | 1324 |
|
|
12
|
+
| production | 992 |
|
|
13
13
|
| planned | 268 |
|
|
14
|
-
| none |
|
|
14
|
+
| none | 251 |
|
|
15
15
|
|
|
16
16
|
Type-only exports are not listed: a type binds no runtime surface, and removing one cannot break a caller at run time.
|
|
17
17
|
|
|
@@ -152,7 +152,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
152
152
|
| `checkTraceContracts` | production | creative-agent:eval/lib/trace-contracts.ts |
|
|
153
153
|
| `clamp01` | production | agent-dev-container:products/intelligence/api/src/lib/consultant/executor.ts |
|
|
154
154
|
| `classifyFailure` | production | phony:products/builder/api/src/eval/autoresearch/trace-analyst.ts |
|
|
155
|
-
| `classifyFailureReason` | production | this package: src/diagnosis/first-failure.ts:
|
|
155
|
+
| `classifyFailureReason` | production | this package: src/diagnosis/first-failure.ts:39 |
|
|
156
156
|
| `cliffsDelta` | production | agent-builder:src/lib/.server/eval/loops/differential-eval.ts |
|
|
157
157
|
| `CODING_HARNESSES` | production | agent-runtime:src/runtime/define-leaderboard.ts |
|
|
158
158
|
| `cohensD` | production | starter-foundry:examples/recruiter-eval-workspace/eval/src/eval/regression/gate.ts |
|
|
@@ -402,7 +402,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
402
402
|
| `scorePolicyEditReadiness` | none | — |
|
|
403
403
|
| `scoreRedTeamOutput` | production | agent-dev-container:products/intelligence/api/src/lib/optimization-gate.ts |
|
|
404
404
|
| `scoreTraceInsightReadiness` | production | blueprint-agent:scripts/experiments/lib/analyze-vb-run/report-html-sections.ts |
|
|
405
|
-
| `searchCellRunId` | production | this package: src/campaign/search-ledger-recording.ts:
|
|
405
|
+
| `searchCellRunId` | production | this package: src/campaign/search-ledger-recording.ts:25 |
|
|
406
406
|
| `seatPresets` | production | supervisor-lab:bench/comms/judges.ts |
|
|
407
407
|
| `selfImprove` | production | agent-app:src/eval-campaign/index.ts |
|
|
408
408
|
| `SEMANTIC_CONCEPT_JUDGE_VERSION` | production | blueprint-agent:scripts/experiments/lib/semantic-audit.ts |
|
|
@@ -584,7 +584,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
584
584
|
| `rlmEngineLimits` | none | only this package's tests: src/analyst/definition-parity.test.ts:26 |
|
|
585
585
|
| `roundAgentRxStep` | production | this package: src/analyst/benchmark-agentrx-calibration.ts:2 |
|
|
586
586
|
| `runAnalystBenchmark` | production | this package: benchmarks/trace-analysis/codetracebench-glm52-20260730/summarize-codetracer.mjs:6 |
|
|
587
|
-
| `runAnalystBenchmarkCommand` | production | this package: src/cli.ts:
|
|
587
|
+
| `runAnalystBenchmarkCommand` | production | this package: src/cli.ts:18 |
|
|
588
588
|
| `runPrimeExchange` | production | this package: src/analyst/benchmark-runner-prime.ts:19 |
|
|
589
589
|
| `runTraceAnalyst` | production | this package: scripts/gepa-analyst-campaign.ts:71 |
|
|
590
590
|
| `scoreAnalystFindings` | production | this package: scripts/gepa-analyst-campaign.ts:57 |
|
|
@@ -644,7 +644,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
644
644
|
|
|
645
645
|
### `./campaign`
|
|
646
646
|
|
|
647
|
-
|
|
647
|
+
144 value exports — 92 production, 26 planned, 26 none.
|
|
648
648
|
|
|
649
649
|
| symbol | consumer | evidence |
|
|
650
650
|
| --- | --- | --- |
|
|
@@ -662,7 +662,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
662
662
|
| `buildTraceAnalystSurfaceDispatch` | none | only this package's tests: src/campaign/analyst-surface.test.ts:4 |
|
|
663
663
|
| `campaignBreakdown` | production | this package: src/campaign/external-text-evaluation.ts:11 |
|
|
664
664
|
| `campaignMeanComposite` | production | agent-dev-container:products/intelligence/api/src/lib/optimization-engine.ts |
|
|
665
|
-
| `campaignMeasurementDigest` | production | this package: src/contract/self-improve-method.ts:
|
|
665
|
+
| `campaignMeasurementDigest` | production | this package: src/contract/self-improve-method.ts:14 |
|
|
666
666
|
| `campaignScenarioIdentity` | production | agent-runtime:src/improvement/method-identity.ts |
|
|
667
667
|
| `campaignSplitDigest` | production | discovery-lab:tools/profile-population.mjs |
|
|
668
668
|
| `campaignSplitDigestFromIdentities` | production | agent-runtime:src/improvement/method-identity.ts |
|
|
@@ -679,7 +679,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
679
679
|
| `createProfileMatrixPlan` | production | discovery-lab:tools/run-profile-confirmation.mjs |
|
|
680
680
|
| `createReferenceEquivalenceJudge` | none | only this package's tests: src/reference-equivalence-judge.test.ts:13 |
|
|
681
681
|
| `createRunCostLedger` | production | agent-dev-container:products/intelligence/api/src/lib/eval-engine.ts |
|
|
682
|
-
| `createSearchHistoryReceipt` | production | this package: src/campaign/search-ledger-recording.ts:
|
|
682
|
+
| `createSearchHistoryReceipt` | production | this package: src/campaign/search-ledger-recording.ts:27 |
|
|
683
683
|
| `crowdedFrontierParent` | planned | doc: docs/campaign-proposers.md |
|
|
684
684
|
| `decodeExternalTextCandidate` | production | agent-runtime:src/improvement/method-execution.ts |
|
|
685
685
|
| `DEFAULT_EXTERNAL_OPTIMIZER_CALLBACK_LIMITS` | none | — |
|
|
@@ -724,6 +724,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
724
724
|
| `pairHoldout` | production | agent-dev-container:products/intelligence/api/src/lib/run-provenance.ts |
|
|
725
725
|
| `paretoPolicy` | none | only this package's tests: src/campaign/gates/promotion-policy.test.ts:3 |
|
|
726
726
|
| `paretoSignificanceGate` | production | agent-app:src/eval-campaign/index.ts |
|
|
727
|
+
| `parseSearchLedgerLine` | production | this package: src/hosted/search-ledger-wire.ts:24 |
|
|
727
728
|
| `phoenixEvaluatorJudge` | none | only this package's tests: src/campaign/upstream-evaluators.test.ts:6 |
|
|
728
729
|
| `planCampaignRun` | production | this package: src/campaign/fixtures.ts:5 |
|
|
729
730
|
| `planEvalFixtureRun` | planned | example: examples/eval-fixtures-quickstart/index.ts:11 |
|
|
@@ -755,21 +756,21 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
755
756
|
| `scoreDiscrimination` | production | supervisor-lab:bench/comms/seat-discrimination.ts |
|
|
756
757
|
| `scoreUserStory` | production | blueprint-agent:scripts/experiments/eval/launch-scoreboard/scoreboard-core.ts |
|
|
757
758
|
| `SEARCH_ESTIMATOR` | planned | doc: docs/search-ledger.md |
|
|
758
|
-
| `SEARCH_LEDGER_SCHEMA` | production | this package: src/campaign/search-ledger.ts:
|
|
759
|
-
| `searchCellId` | production | this package: src/campaign/search-ledger-recording.ts:
|
|
759
|
+
| `SEARCH_LEDGER_SCHEMA` | production | this package: src/campaign/search-ledger.ts:41 |
|
|
760
|
+
| `searchCellId` | production | this package: src/campaign/search-ledger-recording.ts:57 |
|
|
760
761
|
| `searchCellSetDigest` | planned | doc: docs/search-ledger.md |
|
|
761
762
|
| `searchEdgeId` | planned | doc: docs/search-ledger.md |
|
|
762
763
|
| `searchHistoryCoverageRow` | production | this package: src/campaign/optimization-method.ts:14 |
|
|
763
764
|
| `SearchHistoryRequiredError` | none | — |
|
|
764
|
-
| `SearchLedgerConflictError` | production | this package: src/campaign/search-ledger.ts:
|
|
765
|
+
| `SearchLedgerConflictError` | production | this package: src/campaign/search-ledger.ts:34 |
|
|
765
766
|
| `SearchLedgerError` | production | this package: src/campaign/estimate-node.ts:20 |
|
|
766
767
|
| `SearchLedgerIntegrityError` | production | this package: src/campaign/search-ledger-file.ts:10 |
|
|
767
|
-
| `searchNodeId` | production | this package: src/campaign/search-ledger-recording.ts:
|
|
768
|
+
| `searchNodeId` | production | this package: src/campaign/search-ledger-recording.ts:57 |
|
|
768
769
|
| `searchPosterior` | planned | doc: docs/search-ledger.md |
|
|
769
770
|
| `SearchRecorder` | production | this package: src/campaign/gepa-search-import.ts:23 |
|
|
770
|
-
| `SearchState` | production | this package: src/campaign/search-ledger.ts:
|
|
771
|
+
| `SearchState` | production | this package: src/campaign/search-ledger.ts:48 |
|
|
771
772
|
| `SearchStateView` | production | this package: src/campaign/estimate-node.ts:28 |
|
|
772
|
-
| `searchTaskSetDigest` | production | this package: src/campaign/search-ledger-recording.ts:
|
|
773
|
+
| `searchTaskSetDigest` | production | this package: src/campaign/search-ledger-recording.ts:57 |
|
|
773
774
|
| `searchUnitScores` | production | this package: src/campaign/estimate-node.ts:28 |
|
|
774
775
|
| `selectDiscriminative` | none | only this package's tests: src/campaign/scenario-selection.test.ts:2 |
|
|
775
776
|
| `sequentialDecide` | planned | doc: docs/experiment.md |
|
|
@@ -785,7 +786,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
785
786
|
| `traceAnalystQualityJudge` | production | this package: scripts/gepa-analyst-campaign.ts:74 |
|
|
786
787
|
| `transientDispatchFailure` | planned | doc: docs/eval-surface-map.md |
|
|
787
788
|
| `userStoryScoreboard` | production | blueprint-agent:scripts/experiments/eval/launch-scoreboard/run.ts |
|
|
788
|
-
| `validateSearchLedgerEvent` | production | this package: src/campaign/search-ledger-recording.ts:
|
|
789
|
+
| `validateSearchLedgerEvent` | production | this package: src/campaign/search-ledger-recording.ts:28 |
|
|
789
790
|
| `verifyCodeSurface` | production | agent-runtime:src/candidate-execution/builder.ts |
|
|
790
791
|
| `verifyLoopProvenanceRecord` | none | only this package's tests: src/campaign/provenance-integrity.test.ts:5 |
|
|
791
792
|
| `verifySearchHistoryArtifact` | production | this package: src/campaign/optimization-method.ts:14 |
|
|
@@ -794,7 +795,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
794
795
|
|
|
795
796
|
### `./contract`
|
|
796
797
|
|
|
797
|
-
|
|
798
|
+
62 value exports — 41 production, 14 planned, 7 none.
|
|
798
799
|
|
|
799
800
|
| symbol | consumer | evidence |
|
|
800
801
|
| --- | --- | --- |
|
|
@@ -808,9 +809,6 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
808
809
|
| `createReferenceEquivalenceJudge` | none | only this package's tests: src/reference-equivalence-judge.test.ts:13 |
|
|
809
810
|
| `defaultProductionGate` | production | agent-app:src/eval-campaign/index.ts |
|
|
810
811
|
| `defineAgentEval` | planned | example: examples/evaluate-a-change/index.ts:10 |
|
|
811
|
-
| `diffGenerations` | none | only this package's tests: tests/contract-diff.test.ts:2 |
|
|
812
|
-
| `diffRunBaselineToWinner` | none | only this package's tests: tests/contract-diff.test.ts:2 |
|
|
813
|
-
| `diffRuns` | none | only this package's tests: tests/contract-diff.test.ts:2 |
|
|
814
812
|
| `evalReportingSuite` | none | only this package's tests: tests/contract-eval-reporting-suite.test.ts:19 |
|
|
815
813
|
| `evaluatePairedMeasurements` | production | this package: src/contract/profile-measured-comparison.ts:26 |
|
|
816
814
|
| `externalTextOptimizationMethod` | production | agent-app:src/eval-campaign/index.ts |
|
|
@@ -1012,20 +1010,33 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1012
1010
|
|
|
1013
1011
|
### `./hosted`
|
|
1014
1012
|
|
|
1015
|
-
|
|
1013
|
+
24 value exports — 20 production, 2 planned, 2 none.
|
|
1016
1014
|
|
|
1017
1015
|
| symbol | consumer | evidence |
|
|
1018
1016
|
| --- | --- | --- |
|
|
1017
|
+
| `admitSearchLedgerBatch` | planned | example: examples/hosted-ingest-server/server.ts:30 |
|
|
1019
1018
|
| `createHostedClient` | production | traces:src/index.ts |
|
|
1020
|
-
| `EvalRunEventSchema` | planned | example: examples/hosted-ingest-server/server.ts:33 |
|
|
1021
1019
|
| `HOSTED_WIRE_VERSION` | production | agent-dev-container:packages/sdk-data/src/sink/intelligence-sink.ts |
|
|
1022
1020
|
| `hostedClientFromEnv` | production | traces:src/index.ts |
|
|
1021
|
+
| `HostedRequestError` | none | — |
|
|
1023
1022
|
| `hostedTenantFromEnv` | production | creative-agent:eval/self-improve.ts |
|
|
1024
|
-
| `
|
|
1025
|
-
| `
|
|
1026
|
-
| `IngestTracesRequestSchema` | production | this package: src/hosted/client.ts:
|
|
1027
|
-
| `
|
|
1028
|
-
| `
|
|
1023
|
+
| `IngestResponseSchema` | production | this package: src/hosted/client.ts:22 |
|
|
1024
|
+
| `IngestSearchLedgerRequestSchema` | production | this package: src/hosted/client.ts:23 |
|
|
1025
|
+
| `IngestTracesRequestSchema` | production | this package: src/hosted/client.ts:22 |
|
|
1026
|
+
| `SEARCH_LEDGER_BATCH_MAX_BYTES` | production | this package: src/hosted/search-shipper.ts:18 |
|
|
1027
|
+
| `SEARCH_LEDGER_BATCH_MAX_LINES` | production | this package: src/hosted/search-shipper.ts:18 |
|
|
1028
|
+
| `SEARCH_LEDGER_INGEST_PATH` | production | this package: src/hosted/client.ts:23 |
|
|
1029
|
+
| `searchBlobPath` | production | this package: src/hosted/client.ts:23 |
|
|
1030
|
+
| `SearchBlobPutResponseSchema` | production | this package: src/hosted/client.ts:23 |
|
|
1031
|
+
| `searchLedgerArtifactRefs` | production | this package: src/hosted/search-shipper.ts:18 |
|
|
1032
|
+
| `SearchLedgerConflictSchema` | production | this package: src/hosted/client.ts:23 |
|
|
1033
|
+
| `searchLedgerHeadPath` | production | this package: src/hosted/client.ts:23 |
|
|
1034
|
+
| `SearchLedgerHeadSchema` | production | this package: src/hosted/client.ts:23 |
|
|
1035
|
+
| `SearchRunKindSchema` | production | this package: src/search-command.ts:13 |
|
|
1036
|
+
| `SearchShipConflictError` | production | this package: src/search-command.ts:14 |
|
|
1037
|
+
| `shipSearchLedger` | production | this package: src/contract/self-improve-method.ts:24 |
|
|
1038
|
+
| `startSearchShipper` | production | this package: src/contract/self-improve.ts:66 |
|
|
1039
|
+
| `TraceSpanEventSchema` | planned | example: examples/hosted-ingest-server/server.ts:29 |
|
|
1029
1040
|
| `UnixNanoTimestampSchema` | none | — |
|
|
1030
1041
|
|
|
1031
1042
|
### `./jev`
|
|
@@ -1368,7 +1379,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1368
1379
|
| `ROLLOUT_ROLES` | production | this package: src/rollout/interchange/harbor.ts:60 |
|
|
1369
1380
|
| `ROLLOUT_SCHEMA` | production | this package: src/rollout/interchange/harbor.ts:60 |
|
|
1370
1381
|
| `ROLLOUT_SPLITS` | production | this package: src/rollout/interchange/harbor.ts:60 |
|
|
1371
|
-
| `runRolloutReleaseCli` | production | this package: src/cli.ts:
|
|
1382
|
+
| `runRolloutReleaseCli` | production | this package: src/cli.ts:20 |
|
|
1372
1383
|
| `scoreOrigin` | production | this package: src/rollout/mint.ts:39 |
|
|
1373
1384
|
| `scrubLines` | production | supervisor-lab:bench/vertical-rollout-package.ts |
|
|
1374
1385
|
| `scrubRolloutLine` | none | only this package's tests: src/rollout/release/scrub.test.ts:4 |
|
|
@@ -1429,7 +1440,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1429
1440
|
| `renderSupervisorRunMarkdown` | production | discovery-lab:experiments/0005-run-visibility/render-run.mjs |
|
|
1430
1441
|
| `reportSupervisorRound` | planned | named in agent-runtime (bind not in the import graph) |
|
|
1431
1442
|
| `rollupSupervisorRuns` | production | discovery-lab:tools/disco.mjs |
|
|
1432
|
-
| `runSupervisorRunCommand` | production | this package: src/cli.ts:
|
|
1443
|
+
| `runSupervisorRunCommand` | production | this package: src/cli.ts:22 |
|
|
1433
1444
|
| `RUNTIME_FAILED_STATUS` | none | — |
|
|
1434
1445
|
| `runtimeSupervisorRunReader` | none | only this package's tests: src/supervisor-run/index.test.ts:2 |
|
|
1435
1446
|
| `showMeasured` | production | this package: src/supervisor-run/render.ts:8 |
|
|
@@ -1774,7 +1785,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1774
1785
|
|
|
1775
1786
|
| symbol | consumer | evidence |
|
|
1776
1787
|
| --- | --- | --- |
|
|
1777
|
-
| `buildOpenApi` | production | this package: src/cli.ts:
|
|
1788
|
+
| `buildOpenApi` | production | this package: src/cli.ts:24 |
|
|
1778
1789
|
| `createApp` | planned | doc: docs/wire-protocol.md |
|
|
1779
1790
|
| `dispatchRpc` | planned | doc: docs/wire-protocol.md |
|
|
1780
1791
|
| `ErrorResponseSchema` | production | this package: src/wire/openapi.ts:15 |
|
|
@@ -1785,7 +1796,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1785
1796
|
| `handleJudge` | production | this package: src/wire/rpc.ts:15 |
|
|
1786
1797
|
| `handleListRubrics` | production | this package: src/wire/rpc.ts:15 |
|
|
1787
1798
|
| `handleTracesIngest` | production | this package: src/wire/server.ts:20 |
|
|
1788
|
-
| `handleVersion` | production | this package: src/cli.ts:
|
|
1799
|
+
| `handleVersion` | production | this package: src/cli.ts:23 |
|
|
1789
1800
|
| `hashRubric` | production | this package: src/wire/handlers.ts:22 |
|
|
1790
1801
|
| `HealthResponseSchema` | production | this package: src/wire/openapi.ts:15 |
|
|
1791
1802
|
| `JudgeRequestSchema` | production | this package: src/wire/openapi.ts:15 |
|
|
@@ -1795,10 +1806,10 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1795
1806
|
| `RUBRIC_VERSION_SCHEME` | none | — |
|
|
1796
1807
|
| `RubricDimensionSchema` | none | only this package's tests: tests/wire/schemas.test.ts:12 |
|
|
1797
1808
|
| `RubricSchema` | none | only this package's tests: tests/wire/schemas.test.ts:12 |
|
|
1798
|
-
| `runRpcBatch` | production | this package: src/cli.ts:
|
|
1799
|
-
| `runRpcOnce` | production | this package: src/cli.ts:
|
|
1809
|
+
| `runRpcBatch` | production | this package: src/cli.ts:25 |
|
|
1810
|
+
| `runRpcOnce` | production | this package: src/cli.ts:25 |
|
|
1800
1811
|
| `startServer` | production | creative-agent:eval/ingestion-server.ts |
|
|
1801
|
-
| `startServerAsync` | production | this package: src/cli.ts:
|
|
1812
|
+
| `startServerAsync` | production | this package: src/cli.ts:26 |
|
|
1802
1813
|
| `TraceEventSchema` | planned | named in insurance-agent (bind not in the import graph) |
|
|
1803
1814
|
| `TracesIngestRequestSchema` | production | this package: src/wire/openapi.ts:15 |
|
|
1804
1815
|
| `TracesIngestResponseSchema` | production | this package: src/wire/openapi.ts:15 |
|
package/docs/search-ledger.md
CHANGED
|
@@ -141,6 +141,23 @@ The loop's scenarios are its proposer's feedback, so they are the train split; i
|
|
|
141
141
|
`importGepaPopulation` turns the population into nodes and `correlated` edges and reports collapsed duplicates.
|
|
142
142
|
`importExternalEvaluations` turns every callback evaluation into an `external` cell; a candidate GEPA evaluated but kept out of its population gets an `unknown` edge and is decided `pruned`.
|
|
143
143
|
|
|
144
|
+
## Ship a search
|
|
145
|
+
|
|
146
|
+
A hosted store (Intelligence, or the reference receiver in `examples/hosted-ingest-server/`) receives a search through the [hosted ingest wire](./hosted-ingest-spec.md).
|
|
147
|
+
The shipper reads the ledger file, uploads the blobs each entry names, and posts the entries from the store's head.
|
|
148
|
+
A restarted shipper, a lost response, or a store that lost data continues from the store's head; a store that holds a different chain for the same search stops it with `SearchShipConflictError`.
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
import { shipSearchLedger, startSearchShipper } from '@tangle-network/agent-eval/hosted'
|
|
152
|
+
|
|
153
|
+
const shipper = startSearchShipper({ tenant, ledger: { path: ledger.path, searchId }, runKind: 'optimization' })
|
|
154
|
+
// ...the search appends to its ledger; the shipper tails it...
|
|
155
|
+
const shipped = await shipper.stop() // { head, localLines, batches, blobs: { uploaded, missing, ... } }
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
`selfImprove({ hostedTenant, searchLedger })` does this for its own ledger.
|
|
159
|
+
`agent-eval search ship <ledger> --run-kind optimization|eval` finishes or resumes a ship from a terminal.
|
|
160
|
+
|
|
144
161
|
## Receipts and `require-complete`
|
|
145
162
|
|
|
146
163
|
`createSearchHistoryReceipt({ producerId, runId, ledger })` reads the ledger's bytes, replays them, and binds the byte digest, the audit digest, and a bounded summary.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-eval",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.191.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": {
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
"@hono/node-server": "^2.1.1",
|
|
222
222
|
"@tangle-network/agent-core": "^0.9.6",
|
|
223
223
|
"@tangle-network/agent-interface": "^2.0.0",
|
|
224
|
-
"@tangle-network/agent-trace-contract": "^1.0
|
|
224
|
+
"@tangle-network/agent-trace-contract": "^1.2.0",
|
|
225
225
|
"hono": "^4.13.5",
|
|
226
226
|
"linear-sum-assignment": "1.0.9",
|
|
227
227
|
"re2js": "2.8.6",
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { a as RunRecord } from "./run-record-DF-fuu31.js";
|
|
2
|
-
import { r as DatasetScenario } from "./dataset-DQqhOCPt.js";
|
|
3
|
-
import "./summary-report-DvvesgR_.js";
|
|
4
|
-
import { o as InsightReport, r as ExecutionInsight, t as CostProvenanceSummary } from "./insight-report-CvPkEIcC.js";
|
|
5
|
-
import { n as AnalystRegistry } from "./registry-mAQVtuLx.js";
|
|
6
|
-
//#region src/contract/analyze-runs.d.ts
|
|
7
|
-
interface AnalyzeRunsOptions {
|
|
8
|
-
/** The runs to analyze. */
|
|
9
|
-
runs: RunRecord[];
|
|
10
|
-
/** Which split to score against when reading composite from RunOutcome.
|
|
11
|
-
* Default: holdout when ANY run has a `holdoutScore`, else search. */
|
|
12
|
-
split?: 'search' | 'holdout' | 'auto';
|
|
13
|
-
/** Pairwise analysis configuration. When both `baselineCandidateId` and
|
|
14
|
-
* `candidateCandidateId` are present, lift is computed on paired
|
|
15
|
-
* (experimentId, scenarioId, seed) identities shared between the two sides.
|
|
16
|
-
* Unmatched rows remain visible in the lift result. */
|
|
17
|
-
baselineCandidateId?: string;
|
|
18
|
-
candidateCandidateId?: string;
|
|
19
|
-
/** Average matched run scores within these units before estimating lift.
|
|
20
|
-
* Raw run distributions and unmatched-run counts remain unchanged. */
|
|
21
|
-
independentUnitByScenarioId?: ReadonlyMap<string, string>;
|
|
22
|
-
/** Canary scenarios — checked against every run's raw output for
|
|
23
|
-
* holdout contamination. */
|
|
24
|
-
canaryScenarios?: DatasetScenario[];
|
|
25
|
-
/** Analyst registry for failure clustering. When omitted, the
|
|
26
|
-
* `failureClusters` section is left undefined. */
|
|
27
|
-
analyst?: AnalystRegistry;
|
|
28
|
-
/** Downstream outcome metric per run (e.g. engagement rate, approval
|
|
29
|
-
* rate, downstream pass rate). When present, the report includes
|
|
30
|
-
* `outcomeCorrelation` + a simple linear reward model fit. */
|
|
31
|
-
outcomeSignal?: {
|
|
32
|
-
metric: string;
|
|
33
|
-
valueByRunId: Record<string, number>;
|
|
34
|
-
};
|
|
35
|
-
/** Multi-rater feedback for inter-rater agreement. Each entry is one
|
|
36
|
-
* rater's score for one run. Two or more raters → kappa + disagreement
|
|
37
|
-
* triage list. */
|
|
38
|
-
raterScores?: Array<{
|
|
39
|
-
runId: string;
|
|
40
|
-
rater: string;
|
|
41
|
-
score: number;
|
|
42
|
-
}>;
|
|
43
|
-
/** Number of histogram bins for distributional summaries. Default 12. */
|
|
44
|
-
histogramBins?: number;
|
|
45
|
-
/** Decision threshold — the smallest composite lift the caller cares
|
|
46
|
-
* about. Used by the recommendations engine to call ship vs hold.
|
|
47
|
-
* Default 0.02. */
|
|
48
|
-
decisionThreshold?: number;
|
|
49
|
-
/** Optional prior-period runs. When set, the report includes
|
|
50
|
-
* `priorPeriodComparison` with per-metric Welch-CI deltas and
|
|
51
|
-
* recommendations fire on statistically significant regressions.
|
|
52
|
-
* The two windows do NOT have to share scenarios — the comparison
|
|
53
|
-
* is two-sample unpaired (the substrate's `lift` field uses paired
|
|
54
|
-
* bootstrap on shared (experimentId, scenarioId, seed) identities; this is the
|
|
55
|
-
* shape for "this week vs last week" rather than "candidate vs
|
|
56
|
-
* baseline within a campaign"). */
|
|
57
|
-
baselineRuns?: RunRecord[];
|
|
58
|
-
/** Human-readable label for the baseline window, e.g. "vs prior 7
|
|
59
|
-
* days", "vs v3.1 release". Surfaces in recommendations + UI. */
|
|
60
|
-
baselineLabel?: string;
|
|
61
|
-
}
|
|
62
|
-
interface SummarizeExecutionOptions {
|
|
63
|
-
runs: RunRecord[];
|
|
64
|
-
histogramBins?: number;
|
|
65
|
-
}
|
|
66
|
-
interface ExecutionReport {
|
|
67
|
-
execution: ExecutionInsight;
|
|
68
|
-
costProvenance: CostProvenanceSummary;
|
|
69
|
-
}
|
|
70
|
-
/** Summarize runtime facts without interpreting task quality or promotion readiness. */
|
|
71
|
-
declare function summarizeExecution(opts: SummarizeExecutionOptions): ExecutionReport;
|
|
72
|
-
declare function analyzeRuns(opts: AnalyzeRunsOptions): Promise<InsightReport>;
|
|
73
|
-
//#endregion
|
|
74
|
-
export { summarizeExecution as a, analyzeRuns as i, ExecutionReport as n, SummarizeExecutionOptions as r, AnalyzeRunsOptions as t };
|
|
75
|
-
//# sourceMappingURL=analyze-runs-BvK4-wSs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-runs-BvK4-wSs.d.ts","names":[],"sources":["../src/contract/analyze-runs.ts"],"mappings":";;;;;;UAqEiB;;EAEf,MAAM;;;EAGN;;;;;EAKA;EACA;;;EAGA,8BAA8B;;;EAG9B,kBAAkB;;;EAGlB,UAAU;;;;EAIV;IACE;IACA,cAAc;;;;;EAKhB,cAAc;IAAQ;IAAe;IAAe;;;EAEpD;;;;EAIA;;;;;;;;;EASA,eAAe;;;EAGf;;UAGe;EACf,MAAM;EACN;;UAGe;EACf,WAAW;EACX,gBAAgB;;;iBAIF,mBAAmB,MAAM,4BAA4B;iBAgB/C,YAAY,MAAM,qBAAqB,QAAQ"}
|