@tangle-network/agent-eval 0.137.0 → 0.139.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 +78 -0
- package/README.md +34 -0
- package/dist/analyst/index.d.ts +485 -104
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +10 -607
- package/dist/analyst/index.js.map +1 -1
- package/dist/{benchmark-YDrpumqB.js → benchmark-CYtcIF2V.js} +299 -159
- package/dist/benchmark-CYtcIF2V.js.map +1 -0
- package/dist/{benchmark-CHX4orG7.d.ts → benchmark-DDVdWcwA.d.ts} +67 -15
- package/dist/benchmark-DDVdWcwA.d.ts.map +1 -0
- package/dist/benchmark-command-BKfjOBJ5.js +4537 -0
- package/dist/benchmark-command-BKfjOBJ5.js.map +1 -0
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-DCLkQOmc.js → benchmarks-zxhy1QV3.js} +4 -3
- package/dist/{benchmarks-DCLkQOmc.js.map → benchmarks-zxhy1QV3.js.map} +1 -1
- package/dist/campaign/index.d.ts +5 -5
- package/dist/campaign/index.js +4 -3
- package/dist/{campaign-lgObcHFC.js → campaign-DrS6_hLd.js} +19 -11
- package/dist/campaign-DrS6_hLd.js.map +1 -0
- package/dist/canonical-D011XM8r.js +86 -0
- package/dist/canonical-D011XM8r.js.map +1 -0
- package/dist/cli.js +10 -3
- package/dist/cli.js.map +1 -1
- package/dist/{client-C8L6h6Wf.d.ts → client-BohnDFBq.d.ts} +4 -4
- package/dist/{client-C8L6h6Wf.d.ts.map → client-BohnDFBq.d.ts.map} +1 -1
- package/dist/{completion-verifier-DSyRNVzU.d.ts → completion-verifier-IPoP4fQO.d.ts} +178 -4
- package/dist/completion-verifier-IPoP4fQO.d.ts.map +1 -0
- package/dist/contract/index.d.ts +10 -10
- package/dist/contract/index.js +9 -8
- package/dist/contract/index.js.map +1 -1
- package/dist/control.d.ts +2 -2
- package/dist/{cost-ledger-D-5_-dhi.js → cost-ledger-CZ9diLxY.js} +90 -45
- package/dist/cost-ledger-CZ9diLxY.js.map +1 -0
- package/dist/{cost-ledger-D2o6JOrL.d.ts → cost-ledger-DKgyIWRj.d.ts} +6 -2
- package/dist/cost-ledger-DKgyIWRj.d.ts.map +1 -0
- package/dist/default-registry-B8vf7Rmf.d.ts +118 -0
- package/dist/default-registry-B8vf7Rmf.d.ts.map +1 -0
- package/dist/default-registry-BgJJItGr.js +2364 -0
- package/dist/default-registry-BgJJItGr.js.map +1 -0
- package/dist/dspy-rlm-engine-DTkVyDX-.js +344 -0
- package/dist/dspy-rlm-engine-DTkVyDX-.js.map +1 -0
- package/dist/{eval-campaign-CHqfLnff.js → eval-campaign-BmptJj50.js} +2 -2
- package/dist/{eval-campaign-CHqfLnff.js.map → eval-campaign-BmptJj50.js.map} +1 -1
- package/dist/exact-types-MaaFcllV.d.ts +234 -0
- package/dist/exact-types-MaaFcllV.d.ts.map +1 -0
- package/dist/external-optimizer-contracts-BrxY2Sli.d.ts +32 -0
- package/dist/external-optimizer-contracts-BrxY2Sli.d.ts.map +1 -0
- package/dist/{extract-usage-p-56bh8q.js → extract-usage-DZs601Va.js} +2 -2
- package/dist/{extract-usage-p-56bh8q.js.map → extract-usage-DZs601Va.js.map} +1 -1
- package/dist/{feedback-trajectory-N_F0PwHz.d.ts → feedback-trajectory-BJUWOkJM.d.ts} +3 -2
- package/dist/feedback-trajectory-BJUWOkJM.d.ts.map +1 -0
- package/dist/fuzz.d.ts +1 -1
- package/dist/fuzz.js +1 -1
- package/dist/{hf-dataset-DBJXXoY1.js → hf-dataset-XggBupCr.js} +2 -2
- package/dist/{hf-dataset-DBJXXoY1.js.map → hf-dataset-XggBupCr.js.map} +1 -1
- package/dist/hosted/index.d.ts +3 -3
- package/dist/{index-C-Pr4OWg.d.ts → index-BTm_P9aC.d.ts} +12 -11
- package/dist/index-BTm_P9aC.d.ts.map +1 -0
- package/dist/{index-U3RHOShi.d.ts → index-CWOPCJiw.d.ts} +2 -2
- package/dist/{index-U3RHOShi.d.ts.map → index-CWOPCJiw.d.ts.map} +1 -1
- package/dist/{index-DRNl6g_N.d.ts → index-CtR1xh4V.d.ts} +3 -3
- package/dist/{index-DRNl6g_N.d.ts.map → index-CtR1xh4V.d.ts.map} +1 -1
- package/dist/index-DEb46kc6.d.ts.map +1 -1
- package/dist/{index-BnP1QJUv.d.ts → index-_66rVpwN.d.ts} +5 -5
- package/dist/{index-BnP1QJUv.d.ts.map → index-_66rVpwN.d.ts.map} +1 -1
- package/dist/index.d.ts +35 -55
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +55 -514
- package/dist/index.js.map +1 -1
- package/dist/{insight-report-B9ooYH_g.d.ts → insight-report-Bu5Wi9tG.d.ts} +4 -4
- package/dist/{insight-report-B9ooYH_g.d.ts.map → insight-report-Bu5Wi9tG.d.ts.map} +1 -1
- package/dist/{integrity-CKxosZ5Z.d.ts → integrity-COTh3DTH.d.ts} +2 -2
- package/dist/{integrity-CKxosZ5Z.d.ts.map → integrity-COTh3DTH.d.ts.map} +1 -1
- package/dist/kind-factory-CFxA0JQX.js +2133 -0
- package/dist/kind-factory-CFxA0JQX.js.map +1 -0
- package/dist/ledger-core/index.js +2 -1
- package/dist/{ledger-core-t6sItivm.js → ledger-core-Dxz0Rkwa.js} +210 -99
- package/dist/ledger-core-Dxz0Rkwa.js.map +1 -0
- package/dist/{llm-client-DKB25jV8.js → llm-client-bkztEfIx.js} +5 -5
- package/dist/llm-client-bkztEfIx.js.map +1 -0
- package/dist/meta-eval/index.d.ts +2 -2
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/{proposal-findings-DCawte-y.js → proposal-findings-2GIUo1et.js} +2 -68
- package/dist/proposal-findings-2GIUo1et.js.map +1 -0
- package/dist/{release-report-CofgVNZt.d.ts → release-report-fZarvIm-.d.ts} +3 -3
- package/dist/{release-report-CofgVNZt.d.ts.map → release-report-fZarvIm-.d.ts.map} +1 -1
- package/dist/{replay-K8FaC0CB.d.ts → replay-DjG4IG60.d.ts} +34 -143
- package/dist/replay-DjG4IG60.d.ts.map +1 -0
- package/dist/{replay-Bju0T8Ls.js → replay-SA4OB7O7.js} +48 -136
- package/dist/replay-SA4OB7O7.js.map +1 -0
- package/dist/reporting.d.ts +4 -4
- package/dist/{researcher-Da0Wj-bt.d.ts → researcher-BxhtGfKa.d.ts} +5 -5
- package/dist/{researcher-Da0Wj-bt.d.ts.map → researcher-BxhtGfKa.d.ts.map} +1 -1
- package/dist/{reward-hacking-CQ3hTCO3.d.ts → reward-hacking-CqSLiV51.d.ts} +2 -2
- package/dist/{reward-hacking-CQ3hTCO3.d.ts.map → reward-hacking-CqSLiV51.d.ts.map} +1 -1
- package/dist/rl.d.ts +5 -5
- package/dist/rl.js +1 -1
- package/dist/rollout/index.d.ts +1 -1
- package/dist/rollout/index.js +2 -2
- package/dist/{rollout-DQFl0UXA.js → rollout-8nj3mYvx.js} +2 -2
- package/dist/{rollout-DQFl0UXA.js.map → rollout-8nj3mYvx.js.map} +1 -1
- package/dist/{rubric-predictive-validity-C4sztLR3.d.ts → rubric-predictive-validity-DQBQj6uV.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-C4sztLR3.d.ts.map → rubric-predictive-validity-DQBQj6uV.d.ts.map} +1 -1
- package/dist/{run-evidence-BDIircdA.d.ts → run-evidence-C4RcRQT5.d.ts} +3 -3
- package/dist/{run-evidence-BDIircdA.d.ts.map → run-evidence-C4RcRQT5.d.ts.map} +1 -1
- package/dist/{run-record-BPCa2rQ8.d.ts → run-record-CztDMXVF.d.ts} +2 -2
- package/dist/{run-record-BPCa2rQ8.d.ts.map → run-record-CztDMXVF.d.ts.map} +1 -1
- package/dist/{semantic-concept-judge-Bz64IckK.js → semantic-concept-judge-BuIJ9IfB.js} +49 -6
- package/dist/semantic-concept-judge-BuIJ9IfB.js.map +1 -0
- package/dist/{server-KjXZZUDX.js → server-DaCpLfi0.js} +3 -3
- package/dist/{server-KjXZZUDX.js.map → server-DaCpLfi0.js.map} +1 -1
- package/dist/single-run-lock-BTTtPZ9N.js +989 -0
- package/dist/single-run-lock-BTTtPZ9N.js.map +1 -0
- package/dist/{skill-usage-CFDLLlhF.d.ts → skill-usage-B-BFS8M2.d.ts} +65 -40
- package/dist/skill-usage-B-BFS8M2.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-f4o9sUT4.js → skillopt-optimization-method-BbGnCC53.js} +20 -979
- package/dist/skillopt-optimization-method-BbGnCC53.js.map +1 -0
- package/dist/{skillopt-optimization-method-BpbnlvAZ.d.ts → skillopt-optimization-method-_s0Tub7Y.d.ts} +11 -39
- package/dist/skillopt-optimization-method-_s0Tub7Y.d.ts.map +1 -0
- package/dist/{statistics-_7P642CN.d.ts → statistics-B5d0Zd-z.d.ts} +2 -2
- package/dist/{statistics-_7P642CN.d.ts.map → statistics-B5d0Zd-z.d.ts.map} +1 -1
- package/dist/store-otlp-DX4fGIcf.js +757 -0
- package/dist/store-otlp-DX4fGIcf.js.map +1 -0
- package/dist/{summary-report-DHipz9Kx.d.ts → summary-report-Cg7BifAM.d.ts} +3 -3
- package/dist/{summary-report-DHipz9Kx.d.ts.map → summary-report-Cg7BifAM.d.ts.map} +1 -1
- package/dist/tool-groups-CdYq22lX.d.ts +258 -0
- package/dist/tool-groups-CdYq22lX.d.ts.map +1 -0
- package/dist/traces.d.ts +7 -6
- package/dist/traces.js +5 -4
- package/dist/{types-CTGbIm57.d.ts → types-BBFNHxSK.d.ts} +5 -5
- package/dist/{types-CTGbIm57.d.ts.map → types-BBFNHxSK.d.ts.map} +1 -1
- package/dist/{types-CKswbJGO.d.ts → types-DoEYskCd.d.ts} +5 -5
- package/dist/{types-CKswbJGO.d.ts.map → types-DoEYskCd.d.ts.map} +1 -1
- package/dist/{types-CTvKfr5F.d.ts → types-uPrS6mD-.d.ts} +2 -2
- package/dist/{types-CTvKfr5F.d.ts.map → types-uPrS6mD-.d.ts.map} +1 -1
- package/dist/usage-receipt-CgxMEBZq.js +134 -0
- package/dist/usage-receipt-CgxMEBZq.js.map +1 -0
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/trace-analysis.md +191 -385
- package/package.json +5 -4
- package/dist/analyze-runs-PVtnfjvA.d.ts +0 -72
- package/dist/analyze-runs-PVtnfjvA.d.ts.map +0 -1
- package/dist/benchmark-CHX4orG7.d.ts.map +0 -1
- package/dist/benchmark-YDrpumqB.js.map +0 -1
- package/dist/campaign-lgObcHFC.js.map +0 -1
- package/dist/completion-verifier-DSyRNVzU.d.ts.map +0 -1
- package/dist/concurrency-MUjT7VjM.js +0 -109
- package/dist/concurrency-MUjT7VjM.js.map +0 -1
- package/dist/cost-ledger-D-5_-dhi.js.map +0 -1
- package/dist/cost-ledger-D2o6JOrL.d.ts.map +0 -1
- package/dist/default-registry-CLXbRt0f.js +0 -2594
- package/dist/default-registry-CLXbRt0f.js.map +0 -1
- package/dist/default-registry-Dc5D_Loc.d.ts +0 -202
- package/dist/default-registry-Dc5D_Loc.d.ts.map +0 -1
- package/dist/feedback-trajectory-N_F0PwHz.d.ts.map +0 -1
- package/dist/index-C-Pr4OWg.d.ts.map +0 -1
- package/dist/ledger-core-t6sItivm.js.map +0 -1
- package/dist/llm-client-DKB25jV8.js.map +0 -1
- package/dist/proposal-findings-DCawte-y.js.map +0 -1
- package/dist/registry-BdM7SuTr.d.ts +0 -124
- package/dist/registry-BdM7SuTr.d.ts.map +0 -1
- package/dist/replay-Bju0T8Ls.js.map +0 -1
- package/dist/replay-K8FaC0CB.d.ts.map +0 -1
- package/dist/semantic-concept-judge-Bz64IckK.js.map +0 -1
- package/dist/skill-usage-CFDLLlhF.d.ts.map +0 -1
- package/dist/skillopt-optimization-method-BpbnlvAZ.d.ts.map +0 -1
- package/dist/skillopt-optimization-method-f4o9sUT4.js.map +0 -1
- package/dist/tools-DZk2Jn64.js +0 -1876
- package/dist/tools-DZk2Jn64.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hf-dataset-DBJXXoY1.js","names":[],"sources":["../src/rollout/ledger.ts","../src/rollout/release/gate-report.ts","../src/rollout/release/card.ts","../src/rollout/release/scrub.ts","../src/rollout/release/hf-dataset.ts"],"sourcesContent":["/**\n * Rollout-ledger file API — append-only JSONL of validated `tangle.rollout.v1`\n * lines. Writes validate BEFORE touching disk (a bad line never lands);\n * reads validate line-by-line and fail loud with the line number, because a\n * silently-skipped rollout is a corrupted dataset.\n *\n * \"Validate\" includes the anti-Goodhart invariant (a realness-gated line may\n * not carry a positive reward), so a poisoned line can neither enter a ledger\n * nor leave one.\n *\n * Two read modes, matching the two write-side row classes: `readRolloutLedger`\n * re-validates under the mint policy (training data), `readRolloutJournal`\n * under the write policy (supervision journals, whose unscreened positive\n * rewards are writable and must stay readable).\n */\n\nimport { appendFile, mkdir, readFile, writeFile } from 'node:fs/promises'\nimport { dirname } from 'node:path'\nimport { assertMinted, assertRolloutLine, type MintedRolloutLine, type RolloutLine } from './schema'\n\nfunction serialize(lines: RolloutLine[]): string {\n for (const [i, line] of lines.entries()) assertRolloutLine(line, `rollout line [${i}]`)\n return lines.map((line) => JSON.stringify(line)).join('\\n') + (lines.length > 0 ? '\\n' : '')\n}\n\n/** Replace the ledger file with exactly `lines`. */\nexport async function writeRolloutLedger(path: string, lines: RolloutLine[]): Promise<void> {\n const payload = serialize(lines)\n await mkdir(dirname(path), { recursive: true })\n await writeFile(path, payload)\n}\n\n/** Append `lines` to the ledger file (created if absent). */\nexport async function appendRolloutLines(path: string, lines: RolloutLine[]): Promise<void> {\n if (lines.length === 0) return\n const payload = serialize(lines)\n await mkdir(dirname(path), { recursive: true })\n await appendFile(path, payload)\n}\n\n/**\n * Read and validate every line. Throws on the first malformed/invalid line\n * (with its 1-based line number) — fail-closed, never a silent drop.\n *\n * Validation includes the anti-Goodhart invariant, which is why the result is\n * `MintedRolloutLine[]`: a ledger file is the main way a rollout reaches this\n * process from outside the type system (another run, another machine, a\n * hand-edited JSONL), so this read is the runtime boundary where a poisoned\n * line is refused rather than exported.\n */\nexport async function readRolloutLedger(path: string): Promise<MintedRolloutLine[]> {\n return readLines(path, (parsed, context) => assertMinted(parsed, context))\n}\n\n/**\n * Read a ledger under the WRITE-side policy (`validateRolloutLine`), which\n * omits the unscreened-reward check. `writeRolloutLedger` accepts a\n * supervision-journal row (`realness_screened: false` with a positive reward\n * — the documented `unscreenedRewardFields` shape), and `GATE_POLICIES` says\n * such rows \"must stay writable, readable and reportable\"; a read API that\n * only re-validated under `assertMinted` made every such file unreadable —\n * write-accepted but read-refused is a data-loss trap.\n *\n * The result is `RolloutLine[]`, NOT `MintedRolloutLine[]`: nothing read here\n * can reach a training exporter without passing `assertMinted`, so the\n * promotion gate (which DOES enforce unscreened-reward) is exactly as closed\n * as before. Use `readRolloutLedger` when the file is training data.\n */\nexport async function readRolloutJournal(path: string): Promise<RolloutLine[]> {\n return readLines(path, (parsed, context): RolloutLine => {\n assertRolloutLine(parsed, context)\n return parsed\n })\n}\n\nasync function readLines<T>(\n path: string,\n admit: (parsed: unknown, context: string) => T,\n): Promise<T[]> {\n const raw = await readFile(path, 'utf8')\n const lines: T[] = []\n const rawLines = raw.split('\\n')\n for (let i = 0; i < rawLines.length; i++) {\n const text = rawLines[i]\n if (!text?.trim()) continue\n let parsed: unknown\n try {\n parsed = JSON.parse(text)\n } catch (error) {\n throw new Error(\n `${path}:${i + 1}: malformed JSON — ${error instanceof Error ? error.message : String(error)}`,\n )\n }\n lines.push(admit(parsed, `${path}:${i + 1}`))\n }\n return lines\n}\n","/**\n * Per-format accounting of the anti-Goodhart gate for one dataset release.\n *\n * The defect this exists to make impossible: a dataset card that STATES what\n * the gate does while the build does something else. A sentence in a README is\n * a claim about bytes it never reads, so it drifts the moment an exporter\n * changes — and the drift ships to whoever downloads the dataset.\n *\n * So the card is not allowed to assert anything about the gate. The build\n * measures the rows it is ABOUT TO WRITE (`measureFormatGate`), the measurement\n * is checked against the declared per-format disposition (`assertGateReport`,\n * which throws rather than warns), and the card renders only numbers handed to\n * it. A card that disagrees with its own data files cannot be produced without\n * failing the build first.\n *\n * The dispositions themselves are the release policy, stated once as data:\n *\n * sft EXCLUDE — an SFT row is an imitation target. A gamed\n * trajectory must never be imitated, at any weight.\n * verifiers ZERO_AND_FLAG — reward is a signed learning signal here, so a\n * gamed trajectory at reward 0 is a correct\n * negative. Dropping it would bias the negative\n * population toward honest failures and leave a\n * trainer no example of what gaming looks like\n * when it is penalized.\n * rft ZERO_AND_FLAG — RFT re-samples the completion; only the prompt\n * and the grader's `reference.*` verdict ship, so\n * nothing gamed is imitated. The flag is what lets\n * a grader author skip the instance.\n * raw ZERO_AND_FLAG — a faithful audit dump. Removing rows from it\n * would defeat its only purpose, and the gated\n * row is the one an auditor most wants.\n *\n * `ZERO_AND_FLAG` is never `reward: 0` alone. Zeroing without the label makes a\n * faked success indistinguishable from an honest failure — it hides the gamed\n * population from the buyer instead of disclosing it. Every included format\n * carries `realness_gated` on the row itself.\n *\n * And `ZERO_AND_FLAG` means the whole outcome, not the scalar. A gated row that\n * ships `reward: 0` beside the per-layer verifier scores the reward was\n * computed from has not been zeroed in any sense a trainer respects; the\n * accounting therefore measures every reward-derived number each format writes,\n * not just the one field.\n */\n\nimport type { RftItem, SftRow, VerifiersRolloutOutput } from '../exporters'\nimport {\n GATE_CHECK_IDS,\n GATE_POLICIES,\n type GateCheckId,\n undeclaredStepPayload,\n} from '../gate-checks'\nimport type { MintedRolloutLine } from '../schema'\nimport type { ReleaseFormat } from './card'\n\n/** What a format does with a line the realness gate flagged. */\nexport type GateDisposition = 'exclude' | 'zero-and-flag'\n\nexport const FORMAT_GATE_DISPOSITION: Record<ReleaseFormat, GateDisposition> = {\n sft: 'exclude',\n verifiers: 'zero-and-flag',\n rft: 'zero-and-flag',\n raw: 'zero-and-flag',\n}\n\n/** What the gate accounting reads off an emitted row, per format. */\nexport interface ReleaseRowRef {\n rollout_id: string\n reward: number | null\n /**\n * The rest of the row that was DERIVED from the reward — the per-layer score\n * dict, the judge verdict record, whatever this format ships beside the\n * scalar. Walked for positive numbers, so the certification is about the\n * whole outcome rather than one field.\n *\n * Absent when the format's row carries nothing but the scalar. NOT the whole\n * row: `cost.tokens_in`, `wall_s` and `total_steps` are positive numbers that\n * have nothing to do with the reward, and a certification that flags them is\n * a certification nobody can act on.\n */\n evidence?: unknown\n /**\n * The screen claim AS EMITTED — read off the row, not off the line it came\n * from, because what ships is what matters. Required, not optional: an\n * optional field is how a format quietly opts out of the check that reads it,\n * and every emitted row shape carries `RealnessLabels` precisely so no adapter\n * has to.\n */\n realness_screened: boolean | null\n /**\n * The part of an emitted `steps[]` the wire format does not declare.\n *\n * Separate from `evidence` because the declared step fields are FULL of\n * legitimate positive numbers — `durationMs`, `llm_call_count`,\n * `prompt_token_ids` — and a certification that flags those is one nobody can\n * act on. Only the undeclared remainder is unclassified reward-bearing\n * payload, which is the same partition the check applies.\n *\n * Set only by formats whose row carries steps: today `raw` alone.\n */\n stepEvidence?: unknown\n}\n\n/** A positive number found inside an emitted gated row, with where it was. */\nexport interface EmittedEvidence {\n /** JSON-ish path from the row's evidence root, e.g. `metrics['layer.tests']`. */\n path: string\n value: number\n}\n\nexport interface FormatGateCounts {\n /** Gated lines that reached this format's exporter. */\n input: number\n /** Gated rows the format actually wrote. */\n emitted: number\n /**\n * Gated lines this format did not write. Not all of these are the gate:\n * `verifiers` also drops gap lines (empty transcript) and `rft` drops lines\n * with no prompt turn, so an excluded count can mix both causes.\n */\n excluded: number\n /** Highest reward on an emitted gated row; `null` when none was emitted. */\n maxEmittedReward: number | null\n /**\n * The largest positive number found in the reward-DERIVED payload of an\n * emitted gated row, and its path; `null` when there is none.\n *\n * This column exists because the release once certified CLEAN while leaking.\n * `assertGateReport` inspected `outcome.reward` alone, so a gated row shipping\n * `reward: 0` next to `metrics['layer.tests']: 1` — the deterministic verifier\n * score the reward was computed from, and the per-rubric score dict of the\n * Prime Intellect verifiers format — passed, and the card rendered \"max reward\n * | 0\" over a file that carried the gamed signal at full value. A wrong\n * certification is worse than the leak: it is the leak plus a document saying\n * there isn't one.\n */\n maxEmittedEvidence: EmittedEvidence | null\n /**\n * Rows this format wrote carrying a positive reward whose producer DECLARED\n * that no authenticity screen ever ran on it (`realness_screened: false`).\n *\n * Measured over EVERY emitted row, not just the gated ones: an unscreened\n * reward is by definition one the gate never had a verdict on, so it is not in\n * the gated set and a measurement scoped to that set would report 0 forever.\n * `assertMinted` already refuses these, which is exactly why the release still\n * measures them — the last door before a public dataset does not get to assume\n * the earlier doors held.\n */\n unscreenedPositiveRows: number\n /** Highest reward on such a row; `null` when there is none. */\n maxUnscreenedReward: number | null\n /**\n * The largest positive number found in an emitted gated row's UNDECLARED\n * per-step payload, and its path; `null` when there is none.\n *\n * The column exists because the gate read `outcome` and nothing else for\n * three rounds, so a gated line shipping `steps: [{kind, name, reward: 0.86}]`\n * certified clean — the release accounting agreed with the exporter that a\n * per-step reward was not a reward.\n */\n maxEmittedStepEvidence: EmittedEvidence | null\n}\n\nexport interface GateReport {\n /** Gated lines in the release input, after the split/proposer filters. */\n gatedLines: number\n byFormat: Partial<Record<ReleaseFormat, FormatGateCounts>>\n}\n\n/** Rollout ids of every gated line, the key the emitted rows are matched on. */\nexport function gatedRolloutIds(lines: readonly MintedRolloutLine[]): Set<string> {\n return new Set(lines.filter((line) => line.outcome.realness_gated).map((line) => line.rollout_id))\n}\n\n/**\n * Row refs per format. Written as one adapter per format so that the knowledge\n * of WHERE the id and reward live in each published shape sits next to the\n * assertion that uses it — an exporter that moves either field breaks here\n * rather than silently reporting zero gated rows.\n */\nexport const releaseRowRefs = {\n // An SFT row is `{messages, metadata}` and `metadata` holds ids plus the\n // scalar — no reward-derived payload beyond `reward` itself, and the gated\n // disposition is EXCLUDE anyway.\n sft: (rows: readonly SftRow[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.metadata.rollout_id,\n reward: row.metadata.reward,\n realness_screened: row.metadata.realness_screened,\n })),\n // `metrics` IS the per-rubric score dict in the Prime Intellect verifiers\n // format — the same numbers the reward was computed from. This is the leak\n // that shipped.\n verifiers: (rows: readonly VerifiersRolloutOutput[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.info.rollout_id,\n reward: row.reward,\n evidence: row.metrics,\n realness_screened: row.info.realness_screened,\n })),\n // RFT re-samples the completion, but the grader reads `item.reference.*`, so\n // the verbatim judge verdict is a reward-bearing field on the row.\n rft: (rows: readonly RftItem[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.reference.rollout_id,\n reward: row.reference.reward,\n evidence: row.reference.verdict,\n realness_screened: row.reference.realness_screened,\n })),\n raw: (lines: readonly MintedRolloutLine[]): ReleaseRowRef[] =>\n lines.map((line) => ({\n rollout_id: line.rollout_id,\n reward: line.outcome.reward,\n // `provenance.gated_evidence` is deliberately NOT walked: relocating the\n // diagnostics there is what the gate DOES, and the raw config is the\n // audit dump those diagnostics exist for.\n evidence: { metrics: line.outcome.metrics, verdict: line.outcome.verdict },\n // `raw` is the only config that writes the whole line, so it is the only\n // one whose rows can carry a per-step reward.\n stepEvidence: undeclaredStepPayload(line.steps),\n realness_screened: line.outcome.realness_screened ?? null,\n })),\n}\n\n/** Every positive finite number inside a row's reward-derived payload, with its path. */\nfunction positiveNumbersIn(value: unknown, path: string): EmittedEvidence[] {\n if (typeof value === 'number') {\n return Number.isFinite(value) && value > 0 ? [{ path, value }] : []\n }\n if (Array.isArray(value)) {\n return value.flatMap((item, i) => positiveNumbersIn(item, `${path}[${i}]`))\n }\n if (typeof value === 'object' && value !== null) {\n return Object.entries(value).flatMap(([key, child]) =>\n positiveNumbersIn(child, path === '' ? key : `${path}.${key}`),\n )\n }\n return []\n}\n\n/** Measure one format's gated rows from the refs of the rows about to be written. */\nexport function measureFormatGate(\n gated: ReadonlySet<string>,\n refs: readonly ReleaseRowRef[],\n): FormatGateCounts {\n const emitted = refs.filter((ref) => gated.has(ref.rollout_id))\n const rewards = emitted.map((ref) => ref.reward).filter((r): r is number => r !== null)\n const evidence = emitted.flatMap((ref) => positiveNumbersIn(ref.evidence, ''))\n const stepEvidence = emitted.flatMap((ref) => positiveNumbersIn(ref.stepEvidence, 'steps'))\n const unscreened = refs\n .filter((ref) => ref.realness_screened === false)\n .map((ref) => ref.reward)\n .filter((r): r is number => r !== null && r > 0)\n return {\n input: gated.size,\n emitted: emitted.length,\n excluded: gated.size - emitted.length,\n maxEmittedReward: rewards.length === 0 ? null : Math.max(...rewards),\n maxEmittedEvidence: evidence.reduce<EmittedEvidence | null>(\n (best, found) => (best === null || found.value > best.value ? found : best),\n null,\n ),\n unscreenedPositiveRows: unscreened.length,\n maxUnscreenedReward: unscreened.length === 0 ? null : Math.max(...unscreened),\n maxEmittedStepEvidence: stepEvidence.reduce<EmittedEvidence | null>(\n (best, found) => (best === null || found.value > best.value ? found : best),\n null,\n ),\n }\n}\n\n/**\n * The measured form of each canonical gate check, over the rows a release is\n * ABOUT TO WRITE. Returns the failure message, or `null` when the format is\n * clean on that check.\n *\n * TOTAL over `GateCheckId` — this map and `GATE_POLICIES.assertGateReport` are\n * the two things a new check breaks here, so the release certifier cannot be\n * left behind by a check added anywhere else in the package. That is the whole\n * point: for four rounds each guard composed its own subset by hand, and a\n * release certifying CLEAN while leaking is the most expensive version of that\n * mistake, because it is the leak plus a document saying there isn't one.\n */\nconst REPORT_MEASURES: {\n readonly [K in GateCheckId]: (format: ReleaseFormat, counts: FormatGateCounts) => string | null\n} = {\n 'reward-relationship': (format, counts) =>\n counts.maxEmittedReward === null || counts.maxEmittedReward <= 0\n ? null\n : `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `reward (max ${counts.maxEmittedReward}). A run flagged as gamed may not ship a ` +\n 'positive reward in any config.',\n 'gated-evidence': (format, counts) => {\n if (counts.maxEmittedEvidence === null) return null\n const { path, value } = counts.maxEmittedEvidence\n return (\n `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `reward-derived number (${path} = ${value}). Zeroing the scalar is not enough — the ` +\n 'per-layer scores and judge verdict a fabricated reward was computed FROM are the ' +\n 'same signal in component form, and in this format they are read as training input. ' +\n 'They belong in `provenance.gated_evidence` (see `gateGamedOutcome`), not on the row.'\n )\n },\n 'undeclared-step-payload': (format, counts) => {\n if (counts.maxEmittedStepEvidence === null) return null\n const { path, value } = counts.maxEmittedStepEvidence\n return (\n `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `per-step number under a field \\`tangle.rollout.v1\\` does not declare (${path} = ${value}). ` +\n 'A per-step reward is the same training signal as the scalar, in credit-assignment form, ' +\n 'and the exporters copy `steps` through verbatim — so the row ships it beside a `reward` ' +\n 'of 0. It belongs in `provenance.gated_evidence.steps` (see `gateGamedOutcome`).'\n )\n },\n 'unscreened-reward': (format, counts) =>\n counts.maxUnscreenedReward === null\n ? null\n : `release format \"${format}\": ${counts.unscreenedPositiveRows} row(s) carry a positive ` +\n `reward (max ${counts.maxUnscreenedReward}) whose producer declares that NO authenticity ` +\n 'screen ran on it (`realness_screened: false`). Nothing has established those successes ' +\n 'are real, and a published dataset may not present an unqualified verdict as a measured ' +\n 'one. Screen the runs, or publish them at `reward: null`.',\n}\n\n/**\n * Fail the build when the measurement disagrees with the declared policy.\n *\n * Throws, never filters: an emitted positive reward on a gated row means an\n * exporter upstream stopped applying the gate, and silently dropping the row\n * would hide the producer that made it — the producer is the actual defect.\n *\n * Certifies the whole emitted outcome, not `reward` alone. The earlier version\n * checked one field and therefore certified a release CLEAN while its\n * `verifiers/train.jsonl` shipped the gamed run's per-layer scores at 1.0 in\n * the top-level `metrics` dict — the card then rendered \"max reward | 0\" over\n * exactly that file. A certification that is wrong is worse than an\n * uncertified leak, so the checks it runs are no longer written down here at\n * all: it iterates `GATE_CHECK_IDS` under its own declared policy.\n */\nexport function assertGateReport(report: GateReport): void {\n for (const [format, counts] of Object.entries(report.byFormat) as Array<\n [ReleaseFormat, FormatGateCounts]\n >) {\n for (const id of GATE_CHECK_IDS) {\n if (GATE_POLICIES.assertGateReport[id].kind !== 'enforce') continue\n const failure = REPORT_MEASURES[id](format, counts)\n if (failure !== null) throw new Error(failure)\n }\n // Not a gate check: this one is the RELEASE POLICY (`FORMAT_GATE_DISPOSITION`)\n // rather than the anti-Goodhart invariant — it asks whether the format did\n // what it said it would with gated rows, not whether a row is poisoned.\n if (FORMAT_GATE_DISPOSITION[format] === 'exclude' && counts.emitted > 0) {\n throw new Error(\n `release format \"${format}\" declares gated lines EXCLUDED but wrote ${counts.emitted} ` +\n 'of them.',\n )\n }\n }\n}\n","/**\n * HuggingFace dataset-card (README.md) generation for a rollout-ledger release.\n *\n * The card is a pure function of the SCRUBBED lines plus the release options —\n * no timestamps, no environment reads — so rebuilding from the same ledger\n * yields byte-identical output. It documents the schema, provenance (run ids,\n * generations, the official judge), per-role reward semantics including the\n * inherited/contribution caveat, and a role × reward counts table.\n */\n\nimport { type MintedRolloutLine, ROLLOUT_ROLES, ROLLOUT_SCHEMA, type RolloutRole } from '../schema'\nimport { assertGateReport, FORMAT_GATE_DISPOSITION, type GateReport } from './gate-report'\nimport type { ScrubCounts } from './scrub'\n\nexport const RELEASE_FORMATS = ['sft', 'verifiers', 'rft', 'raw'] as const\nexport type ReleaseFormat = (typeof RELEASE_FORMATS)[number]\n\n/** Format → data file path inside the dataset dir (train split only). */\nexport const FORMAT_FILES: Record<ReleaseFormat, string> = {\n sft: 'sft/train.jsonl',\n verifiers: 'verifiers/train.jsonl',\n rft: 'rft/train.jsonl',\n raw: 'raw/train.jsonl',\n}\n\nconst FORMAT_DESCRIPTIONS: Record<ReleaseFormat, string> = {\n sft: 'Successful trainable-split transcripts (`reward >= 1`, never realness-gated) as `{messages, metadata}` chat JSONL.',\n verifiers:\n 'Prime Intellect verifiers `RolloutOutput`: prompt/completion split at the first assistant turn, plus reward, metrics, tool defs, and token usage.',\n rft: 'OpenAI RFT items: prompt turns plus `reference.*` verdict fields for a grader (completions are re-sampled during RFT).',\n raw: `Full \\`${ROLLOUT_SCHEMA}\\` ledger lines (scrubbed), one per agent invocation.`,\n}\n\nexport interface DatasetCardInputs {\n /** Scrubbed, release-filtered lines (what actually ships). */\n lines: MintedRolloutLine[]\n formats: ReleaseFormat[]\n includeProposers: boolean\n /** Source ledger basenames, for provenance. */\n sourceFiles: string[]\n scrubTotals: ScrubCounts\n excluded: { proposers: number; nonTrain: number }\n formatCounts: Partial<Record<ReleaseFormat, number>>\n /**\n * Per-format anti-Goodhart accounting MEASURED on the rows the build wrote.\n * Required, not optional: the card's only statement about the gate is a\n * render of these numbers, so a card cannot be produced without them and\n * cannot drift from the data files it ships beside.\n */\n gate: GateReport\n}\n\nfunction unique(values: Array<string | null>): string[] {\n return [...new Set(values.filter((v): v is string => v !== null))].sort()\n}\n\nfunction formatReward(reward: number | null): string {\n if (reward === null) return 'null'\n return Number.isInteger(reward) ? String(reward) : reward.toFixed(4)\n}\n\nfunction markdownTable(header: string[], rows: string[][]): string {\n return [\n `| ${header.join(' | ')} |`,\n `| ${header.map(() => '---').join(' | ')} |`,\n ...rows.map((row) => `| ${row.join(' | ')} |`),\n ].join('\\n')\n}\n\n/** Where the anti-Goodhart flag lives on each format's emitted row. */\nconst GATE_FLAG_FIELD: Record<ReleaseFormat, string> = {\n sft: '— (no gated row is written)',\n verifiers: '`info.realness_gated`',\n rft: '`reference.realness_gated`',\n raw: '`outcome.realness_gated`',\n}\n\nconst GATE_POLICY_LABEL: Record<ReleaseFormat, string> = {\n sft: 'EXCLUDED — an SFT row is an imitation target',\n verifiers: 'INCLUDED, reward forced to 0, flagged',\n rft: 'INCLUDED, reward forced to 0, flagged',\n raw: 'INCLUDED verbatim, flagged',\n}\n\nfunction gateSection(formats: ReleaseFormat[], gate: GateReport, totalLines: number): string {\n const rows = formats.map((format) => {\n const counts = gate.byFormat[format]\n return [\n format,\n GATE_POLICY_LABEL[format],\n String(counts?.emitted ?? 0),\n String(counts?.excluded ?? 0),\n counts?.maxEmittedReward === null || counts === undefined\n ? '—'\n : formatReward(counts.maxEmittedReward),\n counts?.maxEmittedEvidence == null\n ? '—'\n : `${counts.maxEmittedEvidence.path} = ${counts.maxEmittedEvidence.value}`,\n GATE_FLAG_FIELD[format],\n ]\n })\n const mixedExclusion = formats.some(\n (format) => FORMAT_GATE_DISPOSITION[format] === 'zero-and-flag',\n )\n return [\n `\\`outcome.realness_gated: true\\` marks a run whose success signal was faked (it satisfied the proxy without doing the work). **${gate.gatedLines} of ${totalLines} lines in this release are gated.**`,\n '',\n 'The gate is enforced, not asserted. A line pairing `realness_gated: true` with a reward above 0 is rejected by the schema validator, so it cannot be read out of a source ledger or written into `raw/train.jsonl` at all; on a gated line the numbers the reward was computed from (`outcome.metrics`, the verbatim judge `outcome.verdict`, and any per-step field the schema does not declare — a per-step reward is the same signal in credit-assignment form) are moved out of `outcome` and `steps[]` and into `provenance.gated_evidence`, where no config reads them as training input; the exporters re-check the same invariant on every line; and the release build measures the rows it is about to write and refuses to write ANY file if a gated row carries a positive reward — or any positive number derived from one — in ANY config.',\n '',\n 'The table below is **measured on the rows in this release**, not a description of intent — the build counts the emitted rows and this card renders those counts:',\n '',\n markdownTable(\n [\n 'config',\n 'policy',\n 'gated rows written',\n 'gated rows not written',\n 'max reward',\n 'max reward-derived number',\n 'flag',\n ],\n rows,\n ),\n '',\n 'Why gated rows are kept where they are kept: an SFT row is imitated verbatim, so a gamed trajectory must never appear in one at any weight. In `verifiers` the reward is a signed learning signal, and a gamed trajectory at reward 0 is a correct negative — dropping it would bias the negative population toward honest failures and leave a trainer no example of gaming being penalized. `rft` re-samples the completion, so only the prompt and the grader reference ship. `raw` is a faithful audit dump, where the gated row is the one an auditor most wants.',\n '',\n \"Reward 0 is never the only label: every included config carries the flag on the row itself, because zeroing alone makes a faked success indistinguishable from an honest failure. Filter on the flag to drop the gamed population, or select on it to mine it. The gated run's own measurements are not destroyed either — they are parked verbatim under `provenance.gated_evidence` in `raw/train.jsonl`, which is where an auditor can see what the run claimed and why it was flagged.\",\n mixedExclusion\n ? '\\n\"Gated rows not written\" is not all gate: `verifiers` also drops gap lines (empty transcript) and `rft` drops lines with no prompt turn, so that column can mix both causes.'\n : '',\n ]\n .join('\\n')\n .trimEnd()\n}\n\nfunction roleRewardRows(lines: MintedRolloutLine[]): string[][] {\n const counts = new Map<RolloutRole, Map<string, number>>()\n for (const line of lines) {\n const byReward = counts.get(line.role) ?? new Map<string, number>()\n const key = formatReward(line.outcome.reward)\n byReward.set(key, (byReward.get(key) ?? 0) + 1)\n counts.set(line.role, byReward)\n }\n const rows: string[][] = []\n for (const role of ROLLOUT_ROLES) {\n const byReward = counts.get(role)\n if (!byReward) continue\n const keys = [...byReward.keys()].sort((a, b) => {\n if (a === 'null') return 1\n if (b === 'null') return -1\n return Number(b) - Number(a)\n })\n for (const key of keys) rows.push([role, key, String(byReward.get(key))])\n }\n return rows\n}\n\nexport function buildDatasetCard(inputs: DatasetCardInputs): string {\n const {\n lines,\n formats,\n includeProposers,\n sourceFiles,\n scrubTotals,\n excluded,\n formatCounts,\n gate,\n } = inputs\n // The card is the artifact a buyer reads; it may not render a gate report\n // that violates the release policy even when called outside the build.\n assertGateReport(gate)\n\n const runIds = unique(lines.map((line) => line.run_id))\n const generations = [...new Set(lines.map((line) => line.generation))]\n .filter((g): g is number => g !== null)\n .sort((a, b) => a - b)\n const models = unique(lines.map((line) => line.policy.model))\n const harnesses = unique(lines.map((line) => line.policy.harness))\n const captures = unique(lines.map((line) => line.provenance.capture))\n const rewardSources = unique(lines.map((line) => line.outcome.reward_source))\n const gapLines = lines.filter((line) => line.messages.length === 0).length\n const gatedLines = lines.filter((line) => line.outcome.realness_gated).length\n if (gatedLines !== gate.gatedLines) {\n throw new Error(\n `dataset card: gate report claims ${gate.gatedLines} realness-gated line(s) but the lines ` +\n `it describes contain ${gatedLines} — the card and the build measured different data.`,\n )\n }\n\n const configs = formats\n .map((format) =>\n [\n ` - config_name: ${format}`,\n ' data_files:',\n ' - split: train',\n ` path: ${FORMAT_FILES[format]}`,\n ].join('\\n'),\n )\n .join('\\n')\n\n const frontmatter = [\n '---',\n 'license: unknown',\n 'pretty_name: Tangle rollout ledger — agent trajectories',\n 'configs:',\n configs,\n '---',\n ].join('\\n')\n\n const formatsTable = markdownTable(\n ['config', 'path', 'rows', 'contents'],\n formats.map((format) => [\n format,\n `\\`${FORMAT_FILES[format]}\\``,\n String(formatCounts[format] ?? 0),\n FORMAT_DESCRIPTIONS[format],\n ]),\n )\n\n const countsTable = markdownTable(['role', 'reward', 'lines'], roleRewardRows(lines))\n\n const scrubTable = markdownTable(\n ['rule', 'rewrites'],\n Object.entries(scrubTotals).map(([rule, count]) => [rule, String(count)]),\n )\n\n const proposerNote = includeProposers\n ? 'Proposer sessions are INCLUDED (`--include-proposers`); their transcripts contain improvement-loop harness source.'\n : `Proposer sessions are excluded by default (${excluded.proposers} lines dropped); they contain improvement-loop harness source. Rebuild with \\`--include-proposers\\` to keep them.`\n\n return `${frontmatter}\n\n# Tangle rollout ledger — agent trajectories\n\nOne line per agent invocation (supervisor episode, worker session, proposer shot, judge call, analyst pass) captured by the \\`${ROLLOUT_SCHEMA}\\` rollout ledger, labeled with improvement-loop coordinates and the official-judge reward, with the full message transcript inline.\n\nThis release contains the **trainable split only** (\\`search\\`). Holdout, dev, and canary splits are structurally excluded at build time, and the build additionally drops any non-trainable line as a fail-closed filter (${excluded.nonTrain} dropped here).\n\n## Formats\n\n${formatsTable}\n\n## Anti-Goodhart gate (\\`realness_gated\\`)\n\n${gateSection(formats, gate, lines.length)}\n\n## Schema (\\`${ROLLOUT_SCHEMA}\\`)\n\nEach raw line carries:\n\n- \\`rollout_id\\` / \\`parent_rollout_id\\` — invocation identity; workers point at their spawning supervisor episode.\n- \\`run_id\\`, \\`experiment_id\\`, \\`candidate_id\\` — run/experiment/candidate identity from the producing RunRecord, when present.\n- \\`generation\\`, \\`candidate_index\\` — improvement-loop coordinates (\\`-1\\` = baseline campaign; \\`null\\` = not an improvement loop).\n- \\`role\\` — one of ${ROLLOUT_ROLES.map((role) => `\\`${role}\\``).join(', ')}.\n- \\`task\\` — suite, instance id, split, seed, replicate index.\n- \\`policy\\` — harness, model, provider, profile commit, prompt/config hashes, sampling params.\n- \\`messages\\` / \\`tool_defs\\` — full transcript in canonical OpenAI chat-with-tools form (including \\`reasoning_content\\`). An empty \\`messages\\` array is a labeled gap line; \\`provenance.gap\\` says why the transcript could not be recovered (${gapLines} gap lines in this release).\n- \\`outcome\\` — \\`reward\\` (the single scalar), \\`reward_source\\`, the verbatim judge \\`verdict\\`, non-scalar \\`metrics\\`, and \\`realness_gated\\` (anti-Goodhart flag; see [Anti-Goodhart gate](#anti-goodhart-gate-realness_gated) for the per-config treatment and the measured counts).\n- \\`cost\\` — usd, token counts, wall time.\n- \\`artifacts\\` / \\`provenance\\` — patch/run-dir/transcript pointers (scrubbed) and capture metadata.\n\n## Provenance\n\n- Source ledgers: ${sourceFiles.map((file) => `\\`${file}\\``).join(', ')}\n- Run ids: ${runIds.map((id) => `\\`${id}\\``).join(', ')}\n- Generations: ${generations.join(', ')} (\\`-1\\` = baseline campaign)\n- Models: ${models.map((m) => `\\`${m}\\``).join(', ')}\n- Harnesses: ${harnesses.map((h) => `\\`${h}\\``).join(', ')}\n- Capture modes: ${captures.join(', ')}\n- Every reward traces to a named source (reward sources in this release: ${rewardSources.map((s) => `\\`${s}\\``).join(', ')}).\n\n${proposerNote}\n\n## Reward semantics per role\n\n- **agent** — the producing RunRecord's holdout/search score, with the realness gate forcing gamed successes to 0.\n- **supervisor** — the official-judge verdict on the episode's delivered artifact (1 = resolved, 0 = not).\n- **worker** — INHERITED from the parent supervisor episode (\\`…/inherited\\`). Caveat: reward 1 does not establish this worker's individual contribution (sibling workers in the same episode share the episode outcome), and reward 0 does not prove this worker failed.\n- **proposer** — the fraction of improvement-set instances the proposed candidate resolved (\\`…/candidate-resolved-fraction\\`); a scalar in [0, 1], not a binary verdict.\n- **judge / analyst** — carry the episode verdict where one applies; otherwise \\`reward: null\\` (a labeled gap, never 0).\n\n## Counts\n\n${countsTable}\n\nTotal lines: ${lines.length}\n\n## Scrubbing\n\nAbsolute home paths were rewritten to \\`$WORK\\`, credential-shaped strings were replaced with \\`[REDACTED:<kind>]\\` markers, internal hostnames were normalized to \\`*.internal.example\\`, and username-bearing incidentals (\\`ls -l\\` owner columns, per-user pytest tmpdirs) were normalized to \\`user\\` / \\`$USER\\`. Rewrite counts for this release (full per-file breakdown in \\`scrub-report.json\\`):\n\n${scrubTable}\n\n## License\n\n\\`license: unknown\\` is a placeholder — the releasing operator must set the real SPDX license id in the frontmatter above before publishing.\n\n## Citation\n\n\\`\\`\\`bibtex\n@misc{tangle_rollout_ledger,\n title = {Tangle rollout ledger — agent trajectories},\n author = {{Tangle Network}},\n howpublished = {HuggingFace Datasets},\n note = {Operator: fill in the repository URL, authors, and year before publishing}\n}\n\\`\\`\\`\n`\n}\n","/**\n * Deterministic scrubbing pass over rollout-ledger lines before public release.\n *\n * Every rule is a pure regex rewrite applied to every string value in a line\n * (messages, artifacts, run ids, tool arguments — everywhere), so the scrubbed\n * line is still a valid `tangle.rollout.v1` line. Rules are idempotent:\n * scrub(scrub(x)) === scrub(x), and a second pass counts zero hits — that is\n * the property the release pipeline relies on to prove nothing half-scrubbed\n * ships. Rule order matters: whole `KEY=value` env pairs are redacted before\n * the bare-key rule so one secret is never counted twice.\n */\n\nimport { assertMinted, type MintedRolloutLine } from '../schema'\n\nexport interface ScrubRule {\n name: string\n pattern: RegExp\n /** Rewrite for one match; `g1` is the first capture group when present. */\n rewrite: (match: string, g1?: string) => string\n}\n\nexport const SCRUB_RULES: readonly ScrubRule[] = [\n {\n // /home/<user> and /Users/<user> prefixes → $WORK ($HOME-derived paths).\n name: 'home-path',\n pattern: /\\/(?:home|Users)\\/[A-Za-z0-9._-]+/g,\n rewrite: () => '$WORK',\n },\n {\n // Harness stores encode cwd as a dashed path segment (-home-drew-…);\n // strip the leading -home-<user> so the username never ships.\n name: 'home-path-encoded',\n pattern: /(?<=\\/)-(?:home|Users)-[A-Za-z0-9_.]+/g,\n rewrite: () => '$WORK',\n },\n {\n // pytest names its tmpdir after the invoking user (/tmp/pytest-of-drew).\n name: 'tmp-user-dir',\n pattern: /\\/tmp\\/pytest-of-[A-Za-z0-9._-]+/g,\n rewrite: () => '/tmp/pytest-of-$USER',\n },\n {\n // `ls -l` owner/group columns leak the username in captured tool output.\n // The `(?!user user…)` guard keeps a second pass at zero rewrites.\n name: 'ls-owner',\n pattern:\n /([-bcdlps][-rwxsStT]{9}[.+@]?\\s+\\d+\\s+)(?!user user(?=\\s))[A-Za-z0-9._-]+\\s+[A-Za-z0-9._-]+(?=\\s)/g,\n rewrite: (_match, prefix) => `${prefix}user user`,\n },\n {\n // Env-var-shaped secrets: NAME=value where NAME looks credential-bearing.\n // The (?!\\[REDACTED:) guard keeps the rule idempotent on its own output.\n name: 'env-secret',\n pattern:\n /\\b([A-Z][A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CREDENTIALS?))=(?!\\[REDACTED:)(\"[^\"]*\"|'[^']*'|[^\\s\"']+)/g,\n rewrite: (_match, name) => `${name}=[REDACTED:env]`,\n },\n {\n name: 'bearer-token',\n pattern: /\\b(Bearer|Basic)\\s+(?!\\[REDACTED:)[A-Za-z0-9\\-._~+/=]{8,}/g,\n rewrite: (_match, scheme) => `${scheme} [REDACTED:bearer]`,\n },\n {\n // Bare provider-prefixed keys (OpenAI/Anthropic sk-, GitHub ghp_/gho_/…,\n // fine-grained PATs, HuggingFace hf_, Slack xox*, AWS AKIA).\n name: 'api-key',\n pattern:\n /\\b(?:sk-[A-Za-z0-9_-]{16,}|gh[pousr]_[A-Za-z0-9]{16,}|github_pat_[A-Za-z0-9_]{20,}|hf_[A-Za-z0-9]{16,}|xox[baprs]-[A-Za-z0-9-]{10,}|AKIA[0-9A-Z]{16})\\b/g,\n rewrite: () => '[REDACTED:api-key]',\n },\n {\n // Our infra hostnames → placeholder domain, subdomain preserved\n // (router.tangle.tools → router.internal.example).\n name: 'infra-host',\n pattern: /(?<![A-Za-z0-9.-])((?:[A-Za-z0-9-]+\\.)*)tangle\\.(?:tools|network)(?![A-Za-z0-9-])/g,\n rewrite: (_match, prefix) => `${prefix ?? ''}internal.example`,\n },\n {\n // Known workstation hostnames leak through email Message-IDs and fqdn\n // lookups inside captured test output; extend the list as machines join.\n name: 'machine-host',\n pattern: /\\b[A-Za-z0-9]+-GTR-Pro\\b/g,\n rewrite: () => 'workstation',\n },\n]\n\n/** Rule name → number of matches rewritten. Always carries every rule (0 is data). */\nexport type ScrubCounts = Record<string, number>\n\nexport function emptyScrubCounts(): ScrubCounts {\n return Object.fromEntries(SCRUB_RULES.map((rule) => [rule.name, 0]))\n}\n\nexport function addScrubCounts(into: ScrubCounts, from: ScrubCounts): ScrubCounts {\n for (const [name, count] of Object.entries(from)) into[name] = (into[name] ?? 0) + count\n return into\n}\n\nexport function scrubText(text: string, counts: ScrubCounts): string {\n let out = text\n for (const rule of SCRUB_RULES) {\n out = out.replace(rule.pattern, (match: string, ...rest: unknown[]) => {\n counts[rule.name] = (counts[rule.name] ?? 0) + 1\n return rule.rewrite(match, typeof rest[0] === 'string' ? rest[0] : undefined)\n })\n }\n return out\n}\n\nfunction scrubValue(value: unknown, counts: ScrubCounts): unknown {\n if (typeof value === 'string') return scrubText(value, counts)\n if (Array.isArray(value)) return value.map((item) => scrubValue(item, counts))\n if (value !== null && typeof value === 'object') {\n const out: Record<string, unknown> = {}\n for (const [key, item] of Object.entries(value)) out[key] = scrubValue(item, counts)\n return out\n }\n return value\n}\n\n/**\n * Scrub every string value in a line; structure and key order are preserved.\n *\n * `assertMinted` on the way out rather than a cast: scrubbing rebuilds the\n * object, so the brand has to be re-earned, and re-validating proves the rules\n * did not rewrite a field the schema constrains (`reward` is a number, not a\n * string, so no rule should ever touch it — this is what checks that).\n */\nexport function scrubRolloutLine(line: MintedRolloutLine, counts: ScrubCounts): MintedRolloutLine {\n return assertMinted(scrubValue(line, counts), `scrubbed rollout line ${line.rollout_id}`)\n}\n\nexport function scrubLines(lines: MintedRolloutLine[]): {\n lines: MintedRolloutLine[]\n counts: ScrubCounts\n} {\n const counts = emptyScrubCounts()\n return { lines: lines.map((line) => scrubRolloutLine(line, counts)), counts }\n}\n\n/**\n * A `RolloutScrubber` (text → text) applying the full rule set — the\n * default hook to pass to `mintRolloutRows({ scrub })` so lines are\n * scrubbed at mint time, before they ever reach a ledger file. Release\n * builds re-run `scrubLines` regardless (idempotent), so double-scrubbing\n * is safe and counted as zero.\n */\nexport function defaultRolloutScrubber(text: string): string {\n return scrubText(text, emptyScrubCounts())\n}\n","/**\n * One-command HuggingFace dataset release from rollout ledgers:\n *\n * agent-eval rollout-release <ledger.jsonl...> --out <dir> \\\n * [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]\n *\n * Pipeline per input ledger: read + validate → fail-closed filters\n * (trainable split only; proposer sessions dropped unless\n * --include-proposers, they contain improvement-loop harness source) →\n * deterministic scrub → export the requested formats + scrub-report.json +\n * auto-generated README.md card. Deterministic: same inputs and flags →\n * byte-identical output dir.\n *\n * --push uploads the built dir with `huggingface-cli upload` only when the\n * CLI exists on PATH and HF_TOKEN is present in the env; the token is\n * never printed. Everything else runs fully offline.\n */\n\nimport { spawnSync } from 'node:child_process'\nimport { mkdir, writeFile } from 'node:fs/promises'\nimport { basename, dirname, join } from 'node:path'\nimport { toJsonl, toRftItems, toSftRows, toVerifiersRolloutOutputs } from '../exporters'\nimport { readRolloutLedger, writeRolloutLedger } from '../ledger'\nimport { isTrainableSplit, type MintedRolloutLine } from '../schema'\nimport { buildDatasetCard, FORMAT_FILES, RELEASE_FORMATS, type ReleaseFormat } from './card'\nimport {\n assertGateReport,\n FORMAT_GATE_DISPOSITION,\n type GateReport,\n gatedRolloutIds,\n measureFormatGate,\n releaseRowRefs,\n} from './gate-report'\nimport { addScrubCounts, emptyScrubCounts, type ScrubCounts, scrubLines } from './scrub'\n\nexport interface BuildOptions {\n out: string\n formats: ReleaseFormat[]\n includeProposers: boolean\n}\n\nexport interface ScrubReport {\n /** Input ledger path → rule → rewrite count (only shipped lines are scrubbed). */\n files: Record<string, ScrubCounts>\n totals: ScrubCounts\n excluded: { proposers: number; nonTrain: number }\n}\n\nexport interface BuildSummary {\n inputs: string[]\n read: number\n kept: number\n scrub: ScrubReport\n formatCounts: Partial<Record<ReleaseFormat, number>>\n /** Per-format anti-Goodhart accounting, measured on the rows written. */\n gate: GateReport\n files: string[]\n}\n\nexport async function buildHfDataset(\n inputs: string[],\n options: BuildOptions,\n): Promise<BuildSummary> {\n if (inputs.length === 0) throw new Error('no input ledgers given')\n if (options.formats.length === 0) throw new Error('no formats selected')\n\n const report: ScrubReport = {\n files: {},\n totals: emptyScrubCounts(),\n excluded: { proposers: 0, nonTrain: 0 },\n }\n const kept: MintedRolloutLine[] = []\n let read = 0\n\n for (const input of inputs) {\n const lines = await readRolloutLedger(input)\n read += lines.length\n const shippable = lines.filter((line) => {\n if (!isTrainableSplit(line.task.split)) {\n report.excluded.nonTrain += 1\n return false\n }\n if (!options.includeProposers && line.role === 'proposer') {\n report.excluded.proposers += 1\n return false\n }\n return true\n })\n const scrubbed = scrubLines(shippable)\n report.files[input] = scrubbed.counts\n addScrubCounts(report.totals, scrubbed.counts)\n kept.push(...scrubbed.lines)\n }\n\n const formatCounts: Partial<Record<ReleaseFormat, number>> = {}\n const files: string[] = []\n const gated = gatedRolloutIds(kept)\n const gate: GateReport = { gatedLines: gated.size, byFormat: {} }\n\n // Every selected format's rows are exported and gate-measured BEFORE the\n // first byte is written. A build that would ship a gamed run at a positive\n // reward fails with nothing on disk, rather than leaving a poisoned config\n // behind for someone to `--push`.\n const pending: Array<{ path: string; write: () => Promise<void> }> = []\n\n for (const format of options.formats) {\n const path = join(options.out, FORMAT_FILES[format])\n if (format === 'raw') {\n // writeRolloutLedger re-validates every scrubbed line before it lands.\n gate.byFormat.raw = measureFormatGate(gated, releaseRowRefs.raw(kept))\n formatCounts.raw = kept.length\n pending.push({ path, write: () => writeRolloutLedger(path, kept) })\n } else if (format === 'sft') {\n const rows = toSftRows(kept)\n gate.byFormat.sft = measureFormatGate(gated, releaseRowRefs.sft(rows))\n formatCounts.sft = rows.length\n pending.push({ path, write: () => writeFile(path, toJsonl(rows)) })\n } else if (format === 'verifiers') {\n // The declared disposition drives the exporter: 'zero-and-flag' ships\n // gated lines and honest failures as labeled negatives at reward 0.\n const outputs = toVerifiersRolloutOutputs(kept, {\n gatedLines: FORMAT_GATE_DISPOSITION.verifiers,\n })\n gate.byFormat.verifiers = measureFormatGate(gated, releaseRowRefs.verifiers(outputs))\n formatCounts.verifiers = outputs.length\n pending.push({ path, write: () => writeFile(path, toJsonl(outputs)) })\n } else {\n const items = toRftItems(kept, { gatedLines: FORMAT_GATE_DISPOSITION.rft })\n gate.byFormat.rft = measureFormatGate(gated, releaseRowRefs.rft(items))\n formatCounts.rft = items.length\n pending.push({ path, write: () => writeFile(path, toJsonl(items)) })\n }\n }\n\n assertGateReport(gate)\n\n for (const { path, write } of pending) {\n await mkdir(dirname(path), { recursive: true })\n await write()\n files.push(path)\n }\n\n const reportPath = join(options.out, 'scrub-report.json')\n await writeFile(reportPath, `${JSON.stringify(report, null, 2)}\\n`)\n files.push(reportPath)\n\n const cardPath = join(options.out, 'README.md')\n await writeFile(\n cardPath,\n buildDatasetCard({\n lines: kept,\n formats: options.formats,\n includeProposers: options.includeProposers,\n sourceFiles: inputs.map((input) => basename(input)),\n scrubTotals: report.totals,\n excluded: report.excluded,\n formatCounts,\n gate,\n }),\n )\n files.push(cardPath)\n\n return { inputs, read, kept: kept.length, scrub: report, formatCounts, gate, files }\n}\n\nexport function planPushCommand(repo: string, outDir: string): string[] {\n return ['huggingface-cli', 'upload', repo, outDir, '.', '--repo-type', 'dataset']\n}\n\nexport function pushDataset(repo: string, outDir: string): void {\n const found = spawnSync('which', ['huggingface-cli'], { stdio: 'ignore' })\n if (found.status !== 0) {\n throw new Error(\n 'huggingface-cli not found on PATH — install huggingface_hub[cli] before --push',\n )\n }\n if (!process.env.HF_TOKEN) {\n throw new Error('HF_TOKEN not present in env — refusing to push')\n }\n const [command, ...args] = planPushCommand(repo, outDir) as [string, ...string[]]\n // Token stays in the inherited env; it is never echoed or interpolated.\n const run = spawnSync(command, args, { stdio: 'inherit' })\n if (run.status !== 0) throw new Error(`huggingface-cli upload exited ${String(run.status)}`)\n}\n\nexport interface RolloutReleaseCliArgs extends BuildOptions {\n inputs: string[]\n push: string | null\n}\n\nexport const ROLLOUT_RELEASE_USAGE =\n 'usage: agent-eval rollout-release <ledger.jsonl...> --out <dir> [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]'\n\nexport function parseRolloutReleaseArgs(argv: string[]): RolloutReleaseCliArgs {\n const args: RolloutReleaseCliArgs = {\n inputs: [],\n out: '',\n formats: [...RELEASE_FORMATS],\n includeProposers: false,\n push: null,\n }\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i]!\n if (arg === '--out') {\n args.out = argv[++i] ?? ''\n } else if (arg === '--formats') {\n const raw = (argv[++i] ?? '').split(',').filter(Boolean)\n for (const format of raw) {\n if (!RELEASE_FORMATS.includes(format as ReleaseFormat)) {\n throw new Error(\n `unknown format \"${format}\" — expected one of ${RELEASE_FORMATS.join(',')}`,\n )\n }\n }\n args.formats = raw as ReleaseFormat[]\n } else if (arg === '--include-proposers') {\n args.includeProposers = true\n } else if (arg === '--push') {\n args.push = argv[++i] ?? null\n } else if (arg.startsWith('--')) {\n throw new Error(`unknown flag \"${arg}\"`)\n } else {\n args.inputs.push(arg)\n }\n }\n if (args.inputs.length === 0 || !args.out) {\n throw new Error(ROLLOUT_RELEASE_USAGE)\n }\n if (args.push !== null && !/^[\\w.-]+\\/[\\w.-]+$/.test(args.push)) {\n throw new Error(`--push expects <org/name>, got \"${args.push}\"`)\n }\n return args\n}\n\n/** CLI driver for `agent-eval rollout-release`. Returns the process exit code. */\nexport async function runRolloutReleaseCli(argv: string[]): Promise<number> {\n let args: RolloutReleaseCliArgs\n try {\n args = parseRolloutReleaseArgs(argv)\n } catch (error) {\n process.stderr.write(`${error instanceof Error ? error.message : String(error)}\\n`)\n return 2\n }\n const summary = await buildHfDataset(args.inputs, args)\n process.stdout.write(\n `${JSON.stringify(\n {\n read: summary.read,\n kept: summary.kept,\n formatCounts: summary.formatCounts,\n gate: summary.gate,\n scrub: summary.scrub,\n },\n null,\n 2,\n )}\\n`,\n )\n process.stdout.write(`dataset → ${args.out} (${summary.files.length} files)\\n`)\n if (args.push !== null) {\n pushDataset(args.push, args.out)\n process.stdout.write(`pushed → ${args.push}\\n`)\n }\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,UAAU,OAA8B;CAC/C,KAAK,MAAM,CAAC,GAAG,SAAS,MAAM,QAAQ,GAAG,kBAAkB,MAAM,iBAAiB,EAAE,EAAE;CACtF,OAAO,MAAM,KAAK,SAAS,KAAK,UAAU,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,MAAM,SAAS,IAAI,OAAO;AAC3F;;AAGA,eAAsB,mBAAmB,MAAc,OAAqC;CAC1F,MAAM,UAAU,UAAU,KAAK;CAC/B,MAAM,MAAM,QAAQ,IAAI,GAAG,EAAE,WAAW,KAAK,CAAC;CAC9C,MAAM,UAAU,MAAM,OAAO;AAC/B;;AAGA,eAAsB,mBAAmB,MAAc,OAAqC;CAC1F,IAAI,MAAM,WAAW,GAAG;CACxB,MAAM,UAAU,UAAU,KAAK;CAC/B,MAAM,MAAM,QAAQ,IAAI,GAAG,EAAE,WAAW,KAAK,CAAC;CAC9C,MAAM,WAAW,MAAM,OAAO;AAChC;;;;;;;;;;;AAYA,eAAsB,kBAAkB,MAA4C;CAClF,OAAO,UAAU,OAAO,QAAQ,YAAY,aAAa,QAAQ,OAAO,CAAC;AAC3E;;;;;;;;;;;;;;;AAgBA,eAAsB,mBAAmB,MAAsC;CAC7E,OAAO,UAAU,OAAO,QAAQ,YAAyB;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AQ;CACjB,GACA,MACA,CACF,EAAE,GACJ;CACA,QAAQ,OAAO,MAAM,aAAa,KAAK,IAAI,IAAI,QAAQ,MAAM,OAAO,UAAU;CAC9E,IAAI,KAAK,SAAS,MAAM;EACtB,YAAY,KAAK,MAAM,KAAK,GAAG;EAC/B,QAAQ,OAAO,MAAM,YAAY,KAAK,KAAK,GAAG;CAChD;CACA,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"hf-dataset-XggBupCr.js","names":[],"sources":["../src/rollout/ledger.ts","../src/rollout/release/gate-report.ts","../src/rollout/release/card.ts","../src/rollout/release/scrub.ts","../src/rollout/release/hf-dataset.ts"],"sourcesContent":["/**\n * Rollout-ledger file API — append-only JSONL of validated `tangle.rollout.v1`\n * lines. Writes validate BEFORE touching disk (a bad line never lands);\n * reads validate line-by-line and fail loud with the line number, because a\n * silently-skipped rollout is a corrupted dataset.\n *\n * \"Validate\" includes the anti-Goodhart invariant (a realness-gated line may\n * not carry a positive reward), so a poisoned line can neither enter a ledger\n * nor leave one.\n *\n * Two read modes, matching the two write-side row classes: `readRolloutLedger`\n * re-validates under the mint policy (training data), `readRolloutJournal`\n * under the write policy (supervision journals, whose unscreened positive\n * rewards are writable and must stay readable).\n */\n\nimport { appendFile, mkdir, readFile, writeFile } from 'node:fs/promises'\nimport { dirname } from 'node:path'\nimport { assertMinted, assertRolloutLine, type MintedRolloutLine, type RolloutLine } from './schema'\n\nfunction serialize(lines: RolloutLine[]): string {\n for (const [i, line] of lines.entries()) assertRolloutLine(line, `rollout line [${i}]`)\n return lines.map((line) => JSON.stringify(line)).join('\\n') + (lines.length > 0 ? '\\n' : '')\n}\n\n/** Replace the ledger file with exactly `lines`. */\nexport async function writeRolloutLedger(path: string, lines: RolloutLine[]): Promise<void> {\n const payload = serialize(lines)\n await mkdir(dirname(path), { recursive: true })\n await writeFile(path, payload)\n}\n\n/** Append `lines` to the ledger file (created if absent). */\nexport async function appendRolloutLines(path: string, lines: RolloutLine[]): Promise<void> {\n if (lines.length === 0) return\n const payload = serialize(lines)\n await mkdir(dirname(path), { recursive: true })\n await appendFile(path, payload)\n}\n\n/**\n * Read and validate every line. Throws on the first malformed/invalid line\n * (with its 1-based line number) — fail-closed, never a silent drop.\n *\n * Validation includes the anti-Goodhart invariant, which is why the result is\n * `MintedRolloutLine[]`: a ledger file is the main way a rollout reaches this\n * process from outside the type system (another run, another machine, a\n * hand-edited JSONL), so this read is the runtime boundary where a poisoned\n * line is refused rather than exported.\n */\nexport async function readRolloutLedger(path: string): Promise<MintedRolloutLine[]> {\n return readLines(path, (parsed, context) => assertMinted(parsed, context))\n}\n\n/**\n * Read a ledger under the WRITE-side policy (`validateRolloutLine`), which\n * omits the unscreened-reward check. `writeRolloutLedger` accepts a\n * supervision-journal row (`realness_screened: false` with a positive reward\n * — the documented `unscreenedRewardFields` shape), and `GATE_POLICIES` says\n * such rows \"must stay writable, readable and reportable\"; a read API that\n * only re-validated under `assertMinted` made every such file unreadable —\n * write-accepted but read-refused is a data-loss trap.\n *\n * The result is `RolloutLine[]`, NOT `MintedRolloutLine[]`: nothing read here\n * can reach a training exporter without passing `assertMinted`, so the\n * promotion gate (which DOES enforce unscreened-reward) is exactly as closed\n * as before. Use `readRolloutLedger` when the file is training data.\n */\nexport async function readRolloutJournal(path: string): Promise<RolloutLine[]> {\n return readLines(path, (parsed, context): RolloutLine => {\n assertRolloutLine(parsed, context)\n return parsed\n })\n}\n\nasync function readLines<T>(\n path: string,\n admit: (parsed: unknown, context: string) => T,\n): Promise<T[]> {\n const raw = await readFile(path, 'utf8')\n const lines: T[] = []\n const rawLines = raw.split('\\n')\n for (let i = 0; i < rawLines.length; i++) {\n const text = rawLines[i]\n if (!text?.trim()) continue\n let parsed: unknown\n try {\n parsed = JSON.parse(text)\n } catch (error) {\n throw new Error(\n `${path}:${i + 1}: malformed JSON — ${error instanceof Error ? error.message : String(error)}`,\n )\n }\n lines.push(admit(parsed, `${path}:${i + 1}`))\n }\n return lines\n}\n","/**\n * Per-format accounting of the anti-Goodhart gate for one dataset release.\n *\n * The defect this exists to make impossible: a dataset card that STATES what\n * the gate does while the build does something else. A sentence in a README is\n * a claim about bytes it never reads, so it drifts the moment an exporter\n * changes — and the drift ships to whoever downloads the dataset.\n *\n * So the card is not allowed to assert anything about the gate. The build\n * measures the rows it is ABOUT TO WRITE (`measureFormatGate`), the measurement\n * is checked against the declared per-format disposition (`assertGateReport`,\n * which throws rather than warns), and the card renders only numbers handed to\n * it. A card that disagrees with its own data files cannot be produced without\n * failing the build first.\n *\n * The dispositions themselves are the release policy, stated once as data:\n *\n * sft EXCLUDE — an SFT row is an imitation target. A gamed\n * trajectory must never be imitated, at any weight.\n * verifiers ZERO_AND_FLAG — reward is a signed learning signal here, so a\n * gamed trajectory at reward 0 is a correct\n * negative. Dropping it would bias the negative\n * population toward honest failures and leave a\n * trainer no example of what gaming looks like\n * when it is penalized.\n * rft ZERO_AND_FLAG — RFT re-samples the completion; only the prompt\n * and the grader's `reference.*` verdict ship, so\n * nothing gamed is imitated. The flag is what lets\n * a grader author skip the instance.\n * raw ZERO_AND_FLAG — a faithful audit dump. Removing rows from it\n * would defeat its only purpose, and the gated\n * row is the one an auditor most wants.\n *\n * `ZERO_AND_FLAG` is never `reward: 0` alone. Zeroing without the label makes a\n * faked success indistinguishable from an honest failure — it hides the gamed\n * population from the buyer instead of disclosing it. Every included format\n * carries `realness_gated` on the row itself.\n *\n * And `ZERO_AND_FLAG` means the whole outcome, not the scalar. A gated row that\n * ships `reward: 0` beside the per-layer verifier scores the reward was\n * computed from has not been zeroed in any sense a trainer respects; the\n * accounting therefore measures every reward-derived number each format writes,\n * not just the one field.\n */\n\nimport type { RftItem, SftRow, VerifiersRolloutOutput } from '../exporters'\nimport {\n GATE_CHECK_IDS,\n GATE_POLICIES,\n type GateCheckId,\n undeclaredStepPayload,\n} from '../gate-checks'\nimport type { MintedRolloutLine } from '../schema'\nimport type { ReleaseFormat } from './card'\n\n/** What a format does with a line the realness gate flagged. */\nexport type GateDisposition = 'exclude' | 'zero-and-flag'\n\nexport const FORMAT_GATE_DISPOSITION: Record<ReleaseFormat, GateDisposition> = {\n sft: 'exclude',\n verifiers: 'zero-and-flag',\n rft: 'zero-and-flag',\n raw: 'zero-and-flag',\n}\n\n/** What the gate accounting reads off an emitted row, per format. */\nexport interface ReleaseRowRef {\n rollout_id: string\n reward: number | null\n /**\n * The rest of the row that was DERIVED from the reward — the per-layer score\n * dict, the judge verdict record, whatever this format ships beside the\n * scalar. Walked for positive numbers, so the certification is about the\n * whole outcome rather than one field.\n *\n * Absent when the format's row carries nothing but the scalar. NOT the whole\n * row: `cost.tokens_in`, `wall_s` and `total_steps` are positive numbers that\n * have nothing to do with the reward, and a certification that flags them is\n * a certification nobody can act on.\n */\n evidence?: unknown\n /**\n * The screen claim AS EMITTED — read off the row, not off the line it came\n * from, because what ships is what matters. Required, not optional: an\n * optional field is how a format quietly opts out of the check that reads it,\n * and every emitted row shape carries `RealnessLabels` precisely so no adapter\n * has to.\n */\n realness_screened: boolean | null\n /**\n * The part of an emitted `steps[]` the wire format does not declare.\n *\n * Separate from `evidence` because the declared step fields are FULL of\n * legitimate positive numbers — `durationMs`, `llm_call_count`,\n * `prompt_token_ids` — and a certification that flags those is one nobody can\n * act on. Only the undeclared remainder is unclassified reward-bearing\n * payload, which is the same partition the check applies.\n *\n * Set only by formats whose row carries steps: today `raw` alone.\n */\n stepEvidence?: unknown\n}\n\n/** A positive number found inside an emitted gated row, with where it was. */\nexport interface EmittedEvidence {\n /** JSON-ish path from the row's evidence root, e.g. `metrics['layer.tests']`. */\n path: string\n value: number\n}\n\nexport interface FormatGateCounts {\n /** Gated lines that reached this format's exporter. */\n input: number\n /** Gated rows the format actually wrote. */\n emitted: number\n /**\n * Gated lines this format did not write. Not all of these are the gate:\n * `verifiers` also drops gap lines (empty transcript) and `rft` drops lines\n * with no prompt turn, so an excluded count can mix both causes.\n */\n excluded: number\n /** Highest reward on an emitted gated row; `null` when none was emitted. */\n maxEmittedReward: number | null\n /**\n * The largest positive number found in the reward-DERIVED payload of an\n * emitted gated row, and its path; `null` when there is none.\n *\n * This column exists because the release once certified CLEAN while leaking.\n * `assertGateReport` inspected `outcome.reward` alone, so a gated row shipping\n * `reward: 0` next to `metrics['layer.tests']: 1` — the deterministic verifier\n * score the reward was computed from, and the per-rubric score dict of the\n * Prime Intellect verifiers format — passed, and the card rendered \"max reward\n * | 0\" over a file that carried the gamed signal at full value. A wrong\n * certification is worse than the leak: it is the leak plus a document saying\n * there isn't one.\n */\n maxEmittedEvidence: EmittedEvidence | null\n /**\n * Rows this format wrote carrying a positive reward whose producer DECLARED\n * that no authenticity screen ever ran on it (`realness_screened: false`).\n *\n * Measured over EVERY emitted row, not just the gated ones: an unscreened\n * reward is by definition one the gate never had a verdict on, so it is not in\n * the gated set and a measurement scoped to that set would report 0 forever.\n * `assertMinted` already refuses these, which is exactly why the release still\n * measures them — the last door before a public dataset does not get to assume\n * the earlier doors held.\n */\n unscreenedPositiveRows: number\n /** Highest reward on such a row; `null` when there is none. */\n maxUnscreenedReward: number | null\n /**\n * The largest positive number found in an emitted gated row's UNDECLARED\n * per-step payload, and its path; `null` when there is none.\n *\n * The column exists because the gate read `outcome` and nothing else for\n * three rounds, so a gated line shipping `steps: [{kind, name, reward: 0.86}]`\n * certified clean — the release accounting agreed with the exporter that a\n * per-step reward was not a reward.\n */\n maxEmittedStepEvidence: EmittedEvidence | null\n}\n\nexport interface GateReport {\n /** Gated lines in the release input, after the split/proposer filters. */\n gatedLines: number\n byFormat: Partial<Record<ReleaseFormat, FormatGateCounts>>\n}\n\n/** Rollout ids of every gated line, the key the emitted rows are matched on. */\nexport function gatedRolloutIds(lines: readonly MintedRolloutLine[]): Set<string> {\n return new Set(lines.filter((line) => line.outcome.realness_gated).map((line) => line.rollout_id))\n}\n\n/**\n * Row refs per format. Written as one adapter per format so that the knowledge\n * of WHERE the id and reward live in each published shape sits next to the\n * assertion that uses it — an exporter that moves either field breaks here\n * rather than silently reporting zero gated rows.\n */\nexport const releaseRowRefs = {\n // An SFT row is `{messages, metadata}` and `metadata` holds ids plus the\n // scalar — no reward-derived payload beyond `reward` itself, and the gated\n // disposition is EXCLUDE anyway.\n sft: (rows: readonly SftRow[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.metadata.rollout_id,\n reward: row.metadata.reward,\n realness_screened: row.metadata.realness_screened,\n })),\n // `metrics` IS the per-rubric score dict in the Prime Intellect verifiers\n // format — the same numbers the reward was computed from. This is the leak\n // that shipped.\n verifiers: (rows: readonly VerifiersRolloutOutput[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.info.rollout_id,\n reward: row.reward,\n evidence: row.metrics,\n realness_screened: row.info.realness_screened,\n })),\n // RFT re-samples the completion, but the grader reads `item.reference.*`, so\n // the verbatim judge verdict is a reward-bearing field on the row.\n rft: (rows: readonly RftItem[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.reference.rollout_id,\n reward: row.reference.reward,\n evidence: row.reference.verdict,\n realness_screened: row.reference.realness_screened,\n })),\n raw: (lines: readonly MintedRolloutLine[]): ReleaseRowRef[] =>\n lines.map((line) => ({\n rollout_id: line.rollout_id,\n reward: line.outcome.reward,\n // `provenance.gated_evidence` is deliberately NOT walked: relocating the\n // diagnostics there is what the gate DOES, and the raw config is the\n // audit dump those diagnostics exist for.\n evidence: { metrics: line.outcome.metrics, verdict: line.outcome.verdict },\n // `raw` is the only config that writes the whole line, so it is the only\n // one whose rows can carry a per-step reward.\n stepEvidence: undeclaredStepPayload(line.steps),\n realness_screened: line.outcome.realness_screened ?? null,\n })),\n}\n\n/** Every positive finite number inside a row's reward-derived payload, with its path. */\nfunction positiveNumbersIn(value: unknown, path: string): EmittedEvidence[] {\n if (typeof value === 'number') {\n return Number.isFinite(value) && value > 0 ? [{ path, value }] : []\n }\n if (Array.isArray(value)) {\n return value.flatMap((item, i) => positiveNumbersIn(item, `${path}[${i}]`))\n }\n if (typeof value === 'object' && value !== null) {\n return Object.entries(value).flatMap(([key, child]) =>\n positiveNumbersIn(child, path === '' ? key : `${path}.${key}`),\n )\n }\n return []\n}\n\n/** Measure one format's gated rows from the refs of the rows about to be written. */\nexport function measureFormatGate(\n gated: ReadonlySet<string>,\n refs: readonly ReleaseRowRef[],\n): FormatGateCounts {\n const emitted = refs.filter((ref) => gated.has(ref.rollout_id))\n const rewards = emitted.map((ref) => ref.reward).filter((r): r is number => r !== null)\n const evidence = emitted.flatMap((ref) => positiveNumbersIn(ref.evidence, ''))\n const stepEvidence = emitted.flatMap((ref) => positiveNumbersIn(ref.stepEvidence, 'steps'))\n const unscreened = refs\n .filter((ref) => ref.realness_screened === false)\n .map((ref) => ref.reward)\n .filter((r): r is number => r !== null && r > 0)\n return {\n input: gated.size,\n emitted: emitted.length,\n excluded: gated.size - emitted.length,\n maxEmittedReward: rewards.length === 0 ? null : Math.max(...rewards),\n maxEmittedEvidence: evidence.reduce<EmittedEvidence | null>(\n (best, found) => (best === null || found.value > best.value ? found : best),\n null,\n ),\n unscreenedPositiveRows: unscreened.length,\n maxUnscreenedReward: unscreened.length === 0 ? null : Math.max(...unscreened),\n maxEmittedStepEvidence: stepEvidence.reduce<EmittedEvidence | null>(\n (best, found) => (best === null || found.value > best.value ? found : best),\n null,\n ),\n }\n}\n\n/**\n * The measured form of each canonical gate check, over the rows a release is\n * ABOUT TO WRITE. Returns the failure message, or `null` when the format is\n * clean on that check.\n *\n * TOTAL over `GateCheckId` — this map and `GATE_POLICIES.assertGateReport` are\n * the two things a new check breaks here, so the release certifier cannot be\n * left behind by a check added anywhere else in the package. That is the whole\n * point: for four rounds each guard composed its own subset by hand, and a\n * release certifying CLEAN while leaking is the most expensive version of that\n * mistake, because it is the leak plus a document saying there isn't one.\n */\nconst REPORT_MEASURES: {\n readonly [K in GateCheckId]: (format: ReleaseFormat, counts: FormatGateCounts) => string | null\n} = {\n 'reward-relationship': (format, counts) =>\n counts.maxEmittedReward === null || counts.maxEmittedReward <= 0\n ? null\n : `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `reward (max ${counts.maxEmittedReward}). A run flagged as gamed may not ship a ` +\n 'positive reward in any config.',\n 'gated-evidence': (format, counts) => {\n if (counts.maxEmittedEvidence === null) return null\n const { path, value } = counts.maxEmittedEvidence\n return (\n `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `reward-derived number (${path} = ${value}). Zeroing the scalar is not enough — the ` +\n 'per-layer scores and judge verdict a fabricated reward was computed FROM are the ' +\n 'same signal in component form, and in this format they are read as training input. ' +\n 'They belong in `provenance.gated_evidence` (see `gateGamedOutcome`), not on the row.'\n )\n },\n 'undeclared-step-payload': (format, counts) => {\n if (counts.maxEmittedStepEvidence === null) return null\n const { path, value } = counts.maxEmittedStepEvidence\n return (\n `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `per-step number under a field \\`tangle.rollout.v1\\` does not declare (${path} = ${value}). ` +\n 'A per-step reward is the same training signal as the scalar, in credit-assignment form, ' +\n 'and the exporters copy `steps` through verbatim — so the row ships it beside a `reward` ' +\n 'of 0. It belongs in `provenance.gated_evidence.steps` (see `gateGamedOutcome`).'\n )\n },\n 'unscreened-reward': (format, counts) =>\n counts.maxUnscreenedReward === null\n ? null\n : `release format \"${format}\": ${counts.unscreenedPositiveRows} row(s) carry a positive ` +\n `reward (max ${counts.maxUnscreenedReward}) whose producer declares that NO authenticity ` +\n 'screen ran on it (`realness_screened: false`). Nothing has established those successes ' +\n 'are real, and a published dataset may not present an unqualified verdict as a measured ' +\n 'one. Screen the runs, or publish them at `reward: null`.',\n}\n\n/**\n * Fail the build when the measurement disagrees with the declared policy.\n *\n * Throws, never filters: an emitted positive reward on a gated row means an\n * exporter upstream stopped applying the gate, and silently dropping the row\n * would hide the producer that made it — the producer is the actual defect.\n *\n * Certifies the whole emitted outcome, not `reward` alone. The earlier version\n * checked one field and therefore certified a release CLEAN while its\n * `verifiers/train.jsonl` shipped the gamed run's per-layer scores at 1.0 in\n * the top-level `metrics` dict — the card then rendered \"max reward | 0\" over\n * exactly that file. A certification that is wrong is worse than an\n * uncertified leak, so the checks it runs are no longer written down here at\n * all: it iterates `GATE_CHECK_IDS` under its own declared policy.\n */\nexport function assertGateReport(report: GateReport): void {\n for (const [format, counts] of Object.entries(report.byFormat) as Array<\n [ReleaseFormat, FormatGateCounts]\n >) {\n for (const id of GATE_CHECK_IDS) {\n if (GATE_POLICIES.assertGateReport[id].kind !== 'enforce') continue\n const failure = REPORT_MEASURES[id](format, counts)\n if (failure !== null) throw new Error(failure)\n }\n // Not a gate check: this one is the RELEASE POLICY (`FORMAT_GATE_DISPOSITION`)\n // rather than the anti-Goodhart invariant — it asks whether the format did\n // what it said it would with gated rows, not whether a row is poisoned.\n if (FORMAT_GATE_DISPOSITION[format] === 'exclude' && counts.emitted > 0) {\n throw new Error(\n `release format \"${format}\" declares gated lines EXCLUDED but wrote ${counts.emitted} ` +\n 'of them.',\n )\n }\n }\n}\n","/**\n * HuggingFace dataset-card (README.md) generation for a rollout-ledger release.\n *\n * The card is a pure function of the SCRUBBED lines plus the release options —\n * no timestamps, no environment reads — so rebuilding from the same ledger\n * yields byte-identical output. It documents the schema, provenance (run ids,\n * generations, the official judge), per-role reward semantics including the\n * inherited/contribution caveat, and a role × reward counts table.\n */\n\nimport { type MintedRolloutLine, ROLLOUT_ROLES, ROLLOUT_SCHEMA, type RolloutRole } from '../schema'\nimport { assertGateReport, FORMAT_GATE_DISPOSITION, type GateReport } from './gate-report'\nimport type { ScrubCounts } from './scrub'\n\nexport const RELEASE_FORMATS = ['sft', 'verifiers', 'rft', 'raw'] as const\nexport type ReleaseFormat = (typeof RELEASE_FORMATS)[number]\n\n/** Format → data file path inside the dataset dir (train split only). */\nexport const FORMAT_FILES: Record<ReleaseFormat, string> = {\n sft: 'sft/train.jsonl',\n verifiers: 'verifiers/train.jsonl',\n rft: 'rft/train.jsonl',\n raw: 'raw/train.jsonl',\n}\n\nconst FORMAT_DESCRIPTIONS: Record<ReleaseFormat, string> = {\n sft: 'Successful trainable-split transcripts (`reward >= 1`, never realness-gated) as `{messages, metadata}` chat JSONL.',\n verifiers:\n 'Prime Intellect verifiers `RolloutOutput`: prompt/completion split at the first assistant turn, plus reward, metrics, tool defs, and token usage.',\n rft: 'OpenAI RFT items: prompt turns plus `reference.*` verdict fields for a grader (completions are re-sampled during RFT).',\n raw: `Full \\`${ROLLOUT_SCHEMA}\\` ledger lines (scrubbed), one per agent invocation.`,\n}\n\nexport interface DatasetCardInputs {\n /** Scrubbed, release-filtered lines (what actually ships). */\n lines: MintedRolloutLine[]\n formats: ReleaseFormat[]\n includeProposers: boolean\n /** Source ledger basenames, for provenance. */\n sourceFiles: string[]\n scrubTotals: ScrubCounts\n excluded: { proposers: number; nonTrain: number }\n formatCounts: Partial<Record<ReleaseFormat, number>>\n /**\n * Per-format anti-Goodhart accounting MEASURED on the rows the build wrote.\n * Required, not optional: the card's only statement about the gate is a\n * render of these numbers, so a card cannot be produced without them and\n * cannot drift from the data files it ships beside.\n */\n gate: GateReport\n}\n\nfunction unique(values: Array<string | null>): string[] {\n return [...new Set(values.filter((v): v is string => v !== null))].sort()\n}\n\nfunction formatReward(reward: number | null): string {\n if (reward === null) return 'null'\n return Number.isInteger(reward) ? String(reward) : reward.toFixed(4)\n}\n\nfunction markdownTable(header: string[], rows: string[][]): string {\n return [\n `| ${header.join(' | ')} |`,\n `| ${header.map(() => '---').join(' | ')} |`,\n ...rows.map((row) => `| ${row.join(' | ')} |`),\n ].join('\\n')\n}\n\n/** Where the anti-Goodhart flag lives on each format's emitted row. */\nconst GATE_FLAG_FIELD: Record<ReleaseFormat, string> = {\n sft: '— (no gated row is written)',\n verifiers: '`info.realness_gated`',\n rft: '`reference.realness_gated`',\n raw: '`outcome.realness_gated`',\n}\n\nconst GATE_POLICY_LABEL: Record<ReleaseFormat, string> = {\n sft: 'EXCLUDED — an SFT row is an imitation target',\n verifiers: 'INCLUDED, reward forced to 0, flagged',\n rft: 'INCLUDED, reward forced to 0, flagged',\n raw: 'INCLUDED verbatim, flagged',\n}\n\nfunction gateSection(formats: ReleaseFormat[], gate: GateReport, totalLines: number): string {\n const rows = formats.map((format) => {\n const counts = gate.byFormat[format]\n return [\n format,\n GATE_POLICY_LABEL[format],\n String(counts?.emitted ?? 0),\n String(counts?.excluded ?? 0),\n counts?.maxEmittedReward === null || counts === undefined\n ? '—'\n : formatReward(counts.maxEmittedReward),\n counts?.maxEmittedEvidence == null\n ? '—'\n : `${counts.maxEmittedEvidence.path} = ${counts.maxEmittedEvidence.value}`,\n GATE_FLAG_FIELD[format],\n ]\n })\n const mixedExclusion = formats.some(\n (format) => FORMAT_GATE_DISPOSITION[format] === 'zero-and-flag',\n )\n return [\n `\\`outcome.realness_gated: true\\` marks a run whose success signal was faked (it satisfied the proxy without doing the work). **${gate.gatedLines} of ${totalLines} lines in this release are gated.**`,\n '',\n 'The gate is enforced, not asserted. A line pairing `realness_gated: true` with a reward above 0 is rejected by the schema validator, so it cannot be read out of a source ledger or written into `raw/train.jsonl` at all; on a gated line the numbers the reward was computed from (`outcome.metrics`, the verbatim judge `outcome.verdict`, and any per-step field the schema does not declare — a per-step reward is the same signal in credit-assignment form) are moved out of `outcome` and `steps[]` and into `provenance.gated_evidence`, where no config reads them as training input; the exporters re-check the same invariant on every line; and the release build measures the rows it is about to write and refuses to write ANY file if a gated row carries a positive reward — or any positive number derived from one — in ANY config.',\n '',\n 'The table below is **measured on the rows in this release**, not a description of intent — the build counts the emitted rows and this card renders those counts:',\n '',\n markdownTable(\n [\n 'config',\n 'policy',\n 'gated rows written',\n 'gated rows not written',\n 'max reward',\n 'max reward-derived number',\n 'flag',\n ],\n rows,\n ),\n '',\n 'Why gated rows are kept where they are kept: an SFT row is imitated verbatim, so a gamed trajectory must never appear in one at any weight. In `verifiers` the reward is a signed learning signal, and a gamed trajectory at reward 0 is a correct negative — dropping it would bias the negative population toward honest failures and leave a trainer no example of gaming being penalized. `rft` re-samples the completion, so only the prompt and the grader reference ship. `raw` is a faithful audit dump, where the gated row is the one an auditor most wants.',\n '',\n \"Reward 0 is never the only label: every included config carries the flag on the row itself, because zeroing alone makes a faked success indistinguishable from an honest failure. Filter on the flag to drop the gamed population, or select on it to mine it. The gated run's own measurements are not destroyed either — they are parked verbatim under `provenance.gated_evidence` in `raw/train.jsonl`, which is where an auditor can see what the run claimed and why it was flagged.\",\n mixedExclusion\n ? '\\n\"Gated rows not written\" is not all gate: `verifiers` also drops gap lines (empty transcript) and `rft` drops lines with no prompt turn, so that column can mix both causes.'\n : '',\n ]\n .join('\\n')\n .trimEnd()\n}\n\nfunction roleRewardRows(lines: MintedRolloutLine[]): string[][] {\n const counts = new Map<RolloutRole, Map<string, number>>()\n for (const line of lines) {\n const byReward = counts.get(line.role) ?? new Map<string, number>()\n const key = formatReward(line.outcome.reward)\n byReward.set(key, (byReward.get(key) ?? 0) + 1)\n counts.set(line.role, byReward)\n }\n const rows: string[][] = []\n for (const role of ROLLOUT_ROLES) {\n const byReward = counts.get(role)\n if (!byReward) continue\n const keys = [...byReward.keys()].sort((a, b) => {\n if (a === 'null') return 1\n if (b === 'null') return -1\n return Number(b) - Number(a)\n })\n for (const key of keys) rows.push([role, key, String(byReward.get(key))])\n }\n return rows\n}\n\nexport function buildDatasetCard(inputs: DatasetCardInputs): string {\n const {\n lines,\n formats,\n includeProposers,\n sourceFiles,\n scrubTotals,\n excluded,\n formatCounts,\n gate,\n } = inputs\n // The card is the artifact a buyer reads; it may not render a gate report\n // that violates the release policy even when called outside the build.\n assertGateReport(gate)\n\n const runIds = unique(lines.map((line) => line.run_id))\n const generations = [...new Set(lines.map((line) => line.generation))]\n .filter((g): g is number => g !== null)\n .sort((a, b) => a - b)\n const models = unique(lines.map((line) => line.policy.model))\n const harnesses = unique(lines.map((line) => line.policy.harness))\n const captures = unique(lines.map((line) => line.provenance.capture))\n const rewardSources = unique(lines.map((line) => line.outcome.reward_source))\n const gapLines = lines.filter((line) => line.messages.length === 0).length\n const gatedLines = lines.filter((line) => line.outcome.realness_gated).length\n if (gatedLines !== gate.gatedLines) {\n throw new Error(\n `dataset card: gate report claims ${gate.gatedLines} realness-gated line(s) but the lines ` +\n `it describes contain ${gatedLines} — the card and the build measured different data.`,\n )\n }\n\n const configs = formats\n .map((format) =>\n [\n ` - config_name: ${format}`,\n ' data_files:',\n ' - split: train',\n ` path: ${FORMAT_FILES[format]}`,\n ].join('\\n'),\n )\n .join('\\n')\n\n const frontmatter = [\n '---',\n 'license: unknown',\n 'pretty_name: Tangle rollout ledger — agent trajectories',\n 'configs:',\n configs,\n '---',\n ].join('\\n')\n\n const formatsTable = markdownTable(\n ['config', 'path', 'rows', 'contents'],\n formats.map((format) => [\n format,\n `\\`${FORMAT_FILES[format]}\\``,\n String(formatCounts[format] ?? 0),\n FORMAT_DESCRIPTIONS[format],\n ]),\n )\n\n const countsTable = markdownTable(['role', 'reward', 'lines'], roleRewardRows(lines))\n\n const scrubTable = markdownTable(\n ['rule', 'rewrites'],\n Object.entries(scrubTotals).map(([rule, count]) => [rule, String(count)]),\n )\n\n const proposerNote = includeProposers\n ? 'Proposer sessions are INCLUDED (`--include-proposers`); their transcripts contain improvement-loop harness source.'\n : `Proposer sessions are excluded by default (${excluded.proposers} lines dropped); they contain improvement-loop harness source. Rebuild with \\`--include-proposers\\` to keep them.`\n\n return `${frontmatter}\n\n# Tangle rollout ledger — agent trajectories\n\nOne line per agent invocation (supervisor episode, worker session, proposer shot, judge call, analyst pass) captured by the \\`${ROLLOUT_SCHEMA}\\` rollout ledger, labeled with improvement-loop coordinates and the official-judge reward, with the full message transcript inline.\n\nThis release contains the **trainable split only** (\\`search\\`). Holdout, dev, and canary splits are structurally excluded at build time, and the build additionally drops any non-trainable line as a fail-closed filter (${excluded.nonTrain} dropped here).\n\n## Formats\n\n${formatsTable}\n\n## Anti-Goodhart gate (\\`realness_gated\\`)\n\n${gateSection(formats, gate, lines.length)}\n\n## Schema (\\`${ROLLOUT_SCHEMA}\\`)\n\nEach raw line carries:\n\n- \\`rollout_id\\` / \\`parent_rollout_id\\` — invocation identity; workers point at their spawning supervisor episode.\n- \\`run_id\\`, \\`experiment_id\\`, \\`candidate_id\\` — run/experiment/candidate identity from the producing RunRecord, when present.\n- \\`generation\\`, \\`candidate_index\\` — improvement-loop coordinates (\\`-1\\` = baseline campaign; \\`null\\` = not an improvement loop).\n- \\`role\\` — one of ${ROLLOUT_ROLES.map((role) => `\\`${role}\\``).join(', ')}.\n- \\`task\\` — suite, instance id, split, seed, replicate index.\n- \\`policy\\` — harness, model, provider, profile commit, prompt/config hashes, sampling params.\n- \\`messages\\` / \\`tool_defs\\` — full transcript in canonical OpenAI chat-with-tools form (including \\`reasoning_content\\`). An empty \\`messages\\` array is a labeled gap line; \\`provenance.gap\\` says why the transcript could not be recovered (${gapLines} gap lines in this release).\n- \\`outcome\\` — \\`reward\\` (the single scalar), \\`reward_source\\`, the verbatim judge \\`verdict\\`, non-scalar \\`metrics\\`, and \\`realness_gated\\` (anti-Goodhart flag; see [Anti-Goodhart gate](#anti-goodhart-gate-realness_gated) for the per-config treatment and the measured counts).\n- \\`cost\\` — usd, token counts, wall time.\n- \\`artifacts\\` / \\`provenance\\` — patch/run-dir/transcript pointers (scrubbed) and capture metadata.\n\n## Provenance\n\n- Source ledgers: ${sourceFiles.map((file) => `\\`${file}\\``).join(', ')}\n- Run ids: ${runIds.map((id) => `\\`${id}\\``).join(', ')}\n- Generations: ${generations.join(', ')} (\\`-1\\` = baseline campaign)\n- Models: ${models.map((m) => `\\`${m}\\``).join(', ')}\n- Harnesses: ${harnesses.map((h) => `\\`${h}\\``).join(', ')}\n- Capture modes: ${captures.join(', ')}\n- Every reward traces to a named source (reward sources in this release: ${rewardSources.map((s) => `\\`${s}\\``).join(', ')}).\n\n${proposerNote}\n\n## Reward semantics per role\n\n- **agent** — the producing RunRecord's holdout/search score, with the realness gate forcing gamed successes to 0.\n- **supervisor** — the official-judge verdict on the episode's delivered artifact (1 = resolved, 0 = not).\n- **worker** — INHERITED from the parent supervisor episode (\\`…/inherited\\`). Caveat: reward 1 does not establish this worker's individual contribution (sibling workers in the same episode share the episode outcome), and reward 0 does not prove this worker failed.\n- **proposer** — the fraction of improvement-set instances the proposed candidate resolved (\\`…/candidate-resolved-fraction\\`); a scalar in [0, 1], not a binary verdict.\n- **judge / analyst** — carry the episode verdict where one applies; otherwise \\`reward: null\\` (a labeled gap, never 0).\n\n## Counts\n\n${countsTable}\n\nTotal lines: ${lines.length}\n\n## Scrubbing\n\nAbsolute home paths were rewritten to \\`$WORK\\`, credential-shaped strings were replaced with \\`[REDACTED:<kind>]\\` markers, internal hostnames were normalized to \\`*.internal.example\\`, and username-bearing incidentals (\\`ls -l\\` owner columns, per-user pytest tmpdirs) were normalized to \\`user\\` / \\`$USER\\`. Rewrite counts for this release (full per-file breakdown in \\`scrub-report.json\\`):\n\n${scrubTable}\n\n## License\n\n\\`license: unknown\\` is a placeholder — the releasing operator must set the real SPDX license id in the frontmatter above before publishing.\n\n## Citation\n\n\\`\\`\\`bibtex\n@misc{tangle_rollout_ledger,\n title = {Tangle rollout ledger — agent trajectories},\n author = {{Tangle Network}},\n howpublished = {HuggingFace Datasets},\n note = {Operator: fill in the repository URL, authors, and year before publishing}\n}\n\\`\\`\\`\n`\n}\n","/**\n * Deterministic scrubbing pass over rollout-ledger lines before public release.\n *\n * Every rule is a pure regex rewrite applied to every string value in a line\n * (messages, artifacts, run ids, tool arguments — everywhere), so the scrubbed\n * line is still a valid `tangle.rollout.v1` line. Rules are idempotent:\n * scrub(scrub(x)) === scrub(x), and a second pass counts zero hits — that is\n * the property the release pipeline relies on to prove nothing half-scrubbed\n * ships. Rule order matters: whole `KEY=value` env pairs are redacted before\n * the bare-key rule so one secret is never counted twice.\n */\n\nimport { assertMinted, type MintedRolloutLine } from '../schema'\n\nexport interface ScrubRule {\n name: string\n pattern: RegExp\n /** Rewrite for one match; `g1` is the first capture group when present. */\n rewrite: (match: string, g1?: string) => string\n}\n\nexport const SCRUB_RULES: readonly ScrubRule[] = [\n {\n // /home/<user> and /Users/<user> prefixes → $WORK ($HOME-derived paths).\n name: 'home-path',\n pattern: /\\/(?:home|Users)\\/[A-Za-z0-9._-]+/g,\n rewrite: () => '$WORK',\n },\n {\n // Harness stores encode cwd as a dashed path segment (-home-drew-…);\n // strip the leading -home-<user> so the username never ships.\n name: 'home-path-encoded',\n pattern: /(?<=\\/)-(?:home|Users)-[A-Za-z0-9_.]+/g,\n rewrite: () => '$WORK',\n },\n {\n // pytest names its tmpdir after the invoking user (/tmp/pytest-of-drew).\n name: 'tmp-user-dir',\n pattern: /\\/tmp\\/pytest-of-[A-Za-z0-9._-]+/g,\n rewrite: () => '/tmp/pytest-of-$USER',\n },\n {\n // `ls -l` owner/group columns leak the username in captured tool output.\n // The `(?!user user…)` guard keeps a second pass at zero rewrites.\n name: 'ls-owner',\n pattern:\n /([-bcdlps][-rwxsStT]{9}[.+@]?\\s+\\d+\\s+)(?!user user(?=\\s))[A-Za-z0-9._-]+\\s+[A-Za-z0-9._-]+(?=\\s)/g,\n rewrite: (_match, prefix) => `${prefix}user user`,\n },\n {\n // Env-var-shaped secrets: NAME=value where NAME looks credential-bearing.\n // The (?!\\[REDACTED:) guard keeps the rule idempotent on its own output.\n name: 'env-secret',\n pattern:\n /\\b([A-Z][A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CREDENTIALS?))=(?!\\[REDACTED:)(\"[^\"]*\"|'[^']*'|[^\\s\"']+)/g,\n rewrite: (_match, name) => `${name}=[REDACTED:env]`,\n },\n {\n name: 'bearer-token',\n pattern: /\\b(Bearer|Basic)\\s+(?!\\[REDACTED:)[A-Za-z0-9\\-._~+/=]{8,}/g,\n rewrite: (_match, scheme) => `${scheme} [REDACTED:bearer]`,\n },\n {\n // Bare provider-prefixed keys (OpenAI/Anthropic sk-, GitHub ghp_/gho_/…,\n // fine-grained PATs, HuggingFace hf_, Slack xox*, AWS AKIA).\n name: 'api-key',\n pattern:\n /\\b(?:sk-[A-Za-z0-9_-]{16,}|gh[pousr]_[A-Za-z0-9]{16,}|github_pat_[A-Za-z0-9_]{20,}|hf_[A-Za-z0-9]{16,}|xox[baprs]-[A-Za-z0-9-]{10,}|AKIA[0-9A-Z]{16})\\b/g,\n rewrite: () => '[REDACTED:api-key]',\n },\n {\n // Our infra hostnames → placeholder domain, subdomain preserved\n // (router.tangle.tools → router.internal.example).\n name: 'infra-host',\n pattern: /(?<![A-Za-z0-9.-])((?:[A-Za-z0-9-]+\\.)*)tangle\\.(?:tools|network)(?![A-Za-z0-9-])/g,\n rewrite: (_match, prefix) => `${prefix ?? ''}internal.example`,\n },\n {\n // Known workstation hostnames leak through email Message-IDs and fqdn\n // lookups inside captured test output; extend the list as machines join.\n name: 'machine-host',\n pattern: /\\b[A-Za-z0-9]+-GTR-Pro\\b/g,\n rewrite: () => 'workstation',\n },\n]\n\n/** Rule name → number of matches rewritten. Always carries every rule (0 is data). */\nexport type ScrubCounts = Record<string, number>\n\nexport function emptyScrubCounts(): ScrubCounts {\n return Object.fromEntries(SCRUB_RULES.map((rule) => [rule.name, 0]))\n}\n\nexport function addScrubCounts(into: ScrubCounts, from: ScrubCounts): ScrubCounts {\n for (const [name, count] of Object.entries(from)) into[name] = (into[name] ?? 0) + count\n return into\n}\n\nexport function scrubText(text: string, counts: ScrubCounts): string {\n let out = text\n for (const rule of SCRUB_RULES) {\n out = out.replace(rule.pattern, (match: string, ...rest: unknown[]) => {\n counts[rule.name] = (counts[rule.name] ?? 0) + 1\n return rule.rewrite(match, typeof rest[0] === 'string' ? rest[0] : undefined)\n })\n }\n return out\n}\n\nfunction scrubValue(value: unknown, counts: ScrubCounts): unknown {\n if (typeof value === 'string') return scrubText(value, counts)\n if (Array.isArray(value)) return value.map((item) => scrubValue(item, counts))\n if (value !== null && typeof value === 'object') {\n const out: Record<string, unknown> = {}\n for (const [key, item] of Object.entries(value)) out[key] = scrubValue(item, counts)\n return out\n }\n return value\n}\n\n/**\n * Scrub every string value in a line; structure and key order are preserved.\n *\n * `assertMinted` on the way out rather than a cast: scrubbing rebuilds the\n * object, so the brand has to be re-earned, and re-validating proves the rules\n * did not rewrite a field the schema constrains (`reward` is a number, not a\n * string, so no rule should ever touch it — this is what checks that).\n */\nexport function scrubRolloutLine(line: MintedRolloutLine, counts: ScrubCounts): MintedRolloutLine {\n return assertMinted(scrubValue(line, counts), `scrubbed rollout line ${line.rollout_id}`)\n}\n\nexport function scrubLines(lines: MintedRolloutLine[]): {\n lines: MintedRolloutLine[]\n counts: ScrubCounts\n} {\n const counts = emptyScrubCounts()\n return { lines: lines.map((line) => scrubRolloutLine(line, counts)), counts }\n}\n\n/**\n * A `RolloutScrubber` (text → text) applying the full rule set — the\n * default hook to pass to `mintRolloutRows({ scrub })` so lines are\n * scrubbed at mint time, before they ever reach a ledger file. Release\n * builds re-run `scrubLines` regardless (idempotent), so double-scrubbing\n * is safe and counted as zero.\n */\nexport function defaultRolloutScrubber(text: string): string {\n return scrubText(text, emptyScrubCounts())\n}\n","/**\n * One-command HuggingFace dataset release from rollout ledgers:\n *\n * agent-eval rollout-release <ledger.jsonl...> --out <dir> \\\n * [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]\n *\n * Pipeline per input ledger: read + validate → fail-closed filters\n * (trainable split only; proposer sessions dropped unless\n * --include-proposers, they contain improvement-loop harness source) →\n * deterministic scrub → export the requested formats + scrub-report.json +\n * auto-generated README.md card. Deterministic: same inputs and flags →\n * byte-identical output dir.\n *\n * --push uploads the built dir with `huggingface-cli upload` only when the\n * CLI exists on PATH and HF_TOKEN is present in the env; the token is\n * never printed. Everything else runs fully offline.\n */\n\nimport { spawnSync } from 'node:child_process'\nimport { mkdir, writeFile } from 'node:fs/promises'\nimport { basename, dirname, join } from 'node:path'\nimport { toJsonl, toRftItems, toSftRows, toVerifiersRolloutOutputs } from '../exporters'\nimport { readRolloutLedger, writeRolloutLedger } from '../ledger'\nimport { isTrainableSplit, type MintedRolloutLine } from '../schema'\nimport { buildDatasetCard, FORMAT_FILES, RELEASE_FORMATS, type ReleaseFormat } from './card'\nimport {\n assertGateReport,\n FORMAT_GATE_DISPOSITION,\n type GateReport,\n gatedRolloutIds,\n measureFormatGate,\n releaseRowRefs,\n} from './gate-report'\nimport { addScrubCounts, emptyScrubCounts, type ScrubCounts, scrubLines } from './scrub'\n\nexport interface BuildOptions {\n out: string\n formats: ReleaseFormat[]\n includeProposers: boolean\n}\n\nexport interface ScrubReport {\n /** Input ledger path → rule → rewrite count (only shipped lines are scrubbed). */\n files: Record<string, ScrubCounts>\n totals: ScrubCounts\n excluded: { proposers: number; nonTrain: number }\n}\n\nexport interface BuildSummary {\n inputs: string[]\n read: number\n kept: number\n scrub: ScrubReport\n formatCounts: Partial<Record<ReleaseFormat, number>>\n /** Per-format anti-Goodhart accounting, measured on the rows written. */\n gate: GateReport\n files: string[]\n}\n\nexport async function buildHfDataset(\n inputs: string[],\n options: BuildOptions,\n): Promise<BuildSummary> {\n if (inputs.length === 0) throw new Error('no input ledgers given')\n if (options.formats.length === 0) throw new Error('no formats selected')\n\n const report: ScrubReport = {\n files: {},\n totals: emptyScrubCounts(),\n excluded: { proposers: 0, nonTrain: 0 },\n }\n const kept: MintedRolloutLine[] = []\n let read = 0\n\n for (const input of inputs) {\n const lines = await readRolloutLedger(input)\n read += lines.length\n const shippable = lines.filter((line) => {\n if (!isTrainableSplit(line.task.split)) {\n report.excluded.nonTrain += 1\n return false\n }\n if (!options.includeProposers && line.role === 'proposer') {\n report.excluded.proposers += 1\n return false\n }\n return true\n })\n const scrubbed = scrubLines(shippable)\n report.files[input] = scrubbed.counts\n addScrubCounts(report.totals, scrubbed.counts)\n kept.push(...scrubbed.lines)\n }\n\n const formatCounts: Partial<Record<ReleaseFormat, number>> = {}\n const files: string[] = []\n const gated = gatedRolloutIds(kept)\n const gate: GateReport = { gatedLines: gated.size, byFormat: {} }\n\n // Every selected format's rows are exported and gate-measured BEFORE the\n // first byte is written. A build that would ship a gamed run at a positive\n // reward fails with nothing on disk, rather than leaving a poisoned config\n // behind for someone to `--push`.\n const pending: Array<{ path: string; write: () => Promise<void> }> = []\n\n for (const format of options.formats) {\n const path = join(options.out, FORMAT_FILES[format])\n if (format === 'raw') {\n // writeRolloutLedger re-validates every scrubbed line before it lands.\n gate.byFormat.raw = measureFormatGate(gated, releaseRowRefs.raw(kept))\n formatCounts.raw = kept.length\n pending.push({ path, write: () => writeRolloutLedger(path, kept) })\n } else if (format === 'sft') {\n const rows = toSftRows(kept)\n gate.byFormat.sft = measureFormatGate(gated, releaseRowRefs.sft(rows))\n formatCounts.sft = rows.length\n pending.push({ path, write: () => writeFile(path, toJsonl(rows)) })\n } else if (format === 'verifiers') {\n // The declared disposition drives the exporter: 'zero-and-flag' ships\n // gated lines and honest failures as labeled negatives at reward 0.\n const outputs = toVerifiersRolloutOutputs(kept, {\n gatedLines: FORMAT_GATE_DISPOSITION.verifiers,\n })\n gate.byFormat.verifiers = measureFormatGate(gated, releaseRowRefs.verifiers(outputs))\n formatCounts.verifiers = outputs.length\n pending.push({ path, write: () => writeFile(path, toJsonl(outputs)) })\n } else {\n const items = toRftItems(kept, { gatedLines: FORMAT_GATE_DISPOSITION.rft })\n gate.byFormat.rft = measureFormatGate(gated, releaseRowRefs.rft(items))\n formatCounts.rft = items.length\n pending.push({ path, write: () => writeFile(path, toJsonl(items)) })\n }\n }\n\n assertGateReport(gate)\n\n for (const { path, write } of pending) {\n await mkdir(dirname(path), { recursive: true })\n await write()\n files.push(path)\n }\n\n const reportPath = join(options.out, 'scrub-report.json')\n await writeFile(reportPath, `${JSON.stringify(report, null, 2)}\\n`)\n files.push(reportPath)\n\n const cardPath = join(options.out, 'README.md')\n await writeFile(\n cardPath,\n buildDatasetCard({\n lines: kept,\n formats: options.formats,\n includeProposers: options.includeProposers,\n sourceFiles: inputs.map((input) => basename(input)),\n scrubTotals: report.totals,\n excluded: report.excluded,\n formatCounts,\n gate,\n }),\n )\n files.push(cardPath)\n\n return { inputs, read, kept: kept.length, scrub: report, formatCounts, gate, files }\n}\n\nexport function planPushCommand(repo: string, outDir: string): string[] {\n return ['huggingface-cli', 'upload', repo, outDir, '.', '--repo-type', 'dataset']\n}\n\nexport function pushDataset(repo: string, outDir: string): void {\n const found = spawnSync('which', ['huggingface-cli'], { stdio: 'ignore' })\n if (found.status !== 0) {\n throw new Error(\n 'huggingface-cli not found on PATH — install huggingface_hub[cli] before --push',\n )\n }\n if (!process.env.HF_TOKEN) {\n throw new Error('HF_TOKEN not present in env — refusing to push')\n }\n const [command, ...args] = planPushCommand(repo, outDir) as [string, ...string[]]\n // Token stays in the inherited env; it is never echoed or interpolated.\n const run = spawnSync(command, args, { stdio: 'inherit' })\n if (run.status !== 0) throw new Error(`huggingface-cli upload exited ${String(run.status)}`)\n}\n\nexport interface RolloutReleaseCliArgs extends BuildOptions {\n inputs: string[]\n push: string | null\n}\n\nexport const ROLLOUT_RELEASE_USAGE =\n 'usage: agent-eval rollout-release <ledger.jsonl...> --out <dir> [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]'\n\nexport function parseRolloutReleaseArgs(argv: string[]): RolloutReleaseCliArgs {\n const args: RolloutReleaseCliArgs = {\n inputs: [],\n out: '',\n formats: [...RELEASE_FORMATS],\n includeProposers: false,\n push: null,\n }\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i]!\n if (arg === '--out') {\n args.out = argv[++i] ?? ''\n } else if (arg === '--formats') {\n const raw = (argv[++i] ?? '').split(',').filter(Boolean)\n for (const format of raw) {\n if (!RELEASE_FORMATS.includes(format as ReleaseFormat)) {\n throw new Error(\n `unknown format \"${format}\" — expected one of ${RELEASE_FORMATS.join(',')}`,\n )\n }\n }\n args.formats = raw as ReleaseFormat[]\n } else if (arg === '--include-proposers') {\n args.includeProposers = true\n } else if (arg === '--push') {\n args.push = argv[++i] ?? null\n } else if (arg.startsWith('--')) {\n throw new Error(`unknown flag \"${arg}\"`)\n } else {\n args.inputs.push(arg)\n }\n }\n if (args.inputs.length === 0 || !args.out) {\n throw new Error(ROLLOUT_RELEASE_USAGE)\n }\n if (args.push !== null && !/^[\\w.-]+\\/[\\w.-]+$/.test(args.push)) {\n throw new Error(`--push expects <org/name>, got \"${args.push}\"`)\n }\n return args\n}\n\n/** CLI driver for `agent-eval rollout-release`. Returns the process exit code. */\nexport async function runRolloutReleaseCli(argv: string[]): Promise<number> {\n let args: RolloutReleaseCliArgs\n try {\n args = parseRolloutReleaseArgs(argv)\n } catch (error) {\n process.stderr.write(`${error instanceof Error ? error.message : String(error)}\\n`)\n return 2\n }\n const summary = await buildHfDataset(args.inputs, args)\n process.stdout.write(\n `${JSON.stringify(\n {\n read: summary.read,\n kept: summary.kept,\n formatCounts: summary.formatCounts,\n gate: summary.gate,\n scrub: summary.scrub,\n },\n null,\n 2,\n )}\\n`,\n )\n process.stdout.write(`dataset → ${args.out} (${summary.files.length} files)\\n`)\n if (args.push !== null) {\n pushDataset(args.push, args.out)\n process.stdout.write(`pushed → ${args.push}\\n`)\n }\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,UAAU,OAA8B;CAC/C,KAAK,MAAM,CAAC,GAAG,SAAS,MAAM,QAAQ,GAAG,kBAAkB,MAAM,iBAAiB,EAAE,EAAE;CACtF,OAAO,MAAM,KAAK,SAAS,KAAK,UAAU,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,MAAM,SAAS,IAAI,OAAO;AAC3F;;AAGA,eAAsB,mBAAmB,MAAc,OAAqC;CAC1F,MAAM,UAAU,UAAU,KAAK;CAC/B,MAAM,MAAM,QAAQ,IAAI,GAAG,EAAE,WAAW,KAAK,CAAC;CAC9C,MAAM,UAAU,MAAM,OAAO;AAC/B;;AAGA,eAAsB,mBAAmB,MAAc,OAAqC;CAC1F,IAAI,MAAM,WAAW,GAAG;CACxB,MAAM,UAAU,UAAU,KAAK;CAC/B,MAAM,MAAM,QAAQ,IAAI,GAAG,EAAE,WAAW,KAAK,CAAC;CAC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,MAAM,UAAU,OAAO,KAAK,EAAE,GAAG;EAClF,OAAO;CACT;CACA,MAAM,UAAU,MAAM,eAAe,KAAK,QAAQ,IAAI;CACtD,QAAQ,OAAO,MACb,GAAG,KAAK,UACN;EACE,MAAM,QAAQ;EACd,MAAM,QAAQ;EACd,cAAc,QAAQ;EACtB,MAAM,QAAQ;EACd,OAAO,QAAQ;CACjB,GACA,MACA,CACF,EAAE,GACJ;CACA,QAAQ,OAAO,MAAM,aAAa,KAAK,IAAI,IAAI,QAAQ,MAAM,OAAO,UAAU;CAC9E,IAAI,KAAK,SAAS,MAAM;EACtB,YAAY,KAAK,MAAM,KAAK,GAAG;EAC/B,QAAQ,OAAO,MAAM,YAAY,KAAK,KAAK,GAAG;CAChD;CACA,OAAO;AACT"}
|
package/dist/hosted/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as MutableSurface } from "../types-
|
|
2
|
-
import { o as InsightReport } from "../insight-report-
|
|
3
|
-
import { _ as UnixNanoTimestamp, a as hostedTenantFromEnv, c as EvalRunGenerationSnapshot, d as HostedIngestHeaders, f as HostedWireVersion, g as TraceSpanEvent, h as IngestTracesRequest, i as hostedClientFromEnv, l as EvalRunStatus, m as IngestResponse, n as HostedTenant, o as EvalRunCellScore, p as IngestEvalRunsRequest, r as createHostedClient, s as EvalRunEvent, t as HostedClient, u as HOSTED_WIRE_VERSION } from "../client-
|
|
1
|
+
import { j as MutableSurface } from "../types-BBFNHxSK.js";
|
|
2
|
+
import { o as InsightReport } from "../insight-report-Bu5Wi9tG.js";
|
|
3
|
+
import { _ as UnixNanoTimestamp, a as hostedTenantFromEnv, c as EvalRunGenerationSnapshot, d as HostedIngestHeaders, f as HostedWireVersion, g as TraceSpanEvent, h as IngestTracesRequest, i as hostedClientFromEnv, l as EvalRunStatus, m as IngestResponse, n as HostedTenant, o as EvalRunCellScore, p as IngestEvalRunsRequest, r as createHostedClient, s as EvalRunEvent, t as HostedClient, u as HOSTED_WIRE_VERSION } from "../client-BohnDFBq.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/hosted/schemas.d.ts
|
|
6
6
|
declare const UnixNanoTimestampSchema: z.ZodType<UnixNanoTimestamp>;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { l as ValidationError, t as AgentEvalError } from "./errors-DkfjIDvD.js";
|
|
2
|
-
import { T as RunPaidCallInput, m as CostReceipt } from "./cost-ledger-
|
|
3
|
-
import { a as RunRecord, s as RunSplitTag } from "./run-record-
|
|
4
|
-
import { f as AnalystUsageReceipt, i as AnalystFinding, l as AnalystRunResult, x as TraceAnalysisStore } from "./types-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { E as RiskDifferenceResult, _ as McNemarResult, d as EProcessState, v as PairedBootstrapOptions, y as PairedBootstrapResult } from "./statistics-
|
|
9
|
-
import { A as PairedMcNemarEvidence, D as PairedDecisionMethod, j as PairedPromotionDecision, k as PairedDecisionStatistic } from "./summary-report-
|
|
10
|
-
import {
|
|
2
|
+
import { T as RunPaidCallInput, m as CostReceipt } from "./cost-ledger-DKgyIWRj.js";
|
|
3
|
+
import { a as RunRecord, s as RunSplitTag } from "./run-record-CztDMXVF.js";
|
|
4
|
+
import { f as AnalystUsageReceipt, i as AnalystFinding, l as AnalystRunResult, x as TraceAnalysisStore } from "./types-DoEYskCd.js";
|
|
5
|
+
import { n as CompletionVerdict, o as ProducedState, r as CorrectnessChecker, t as CompletionRequirement } from "./completion-verifier-IPoP4fQO.js";
|
|
6
|
+
import { _ as AnalystIssueExpectation, a as AnalystBenchmarkLabelState, t as AnalystBenchmarkCase } from "./benchmark-DDVdWcwA.js";
|
|
7
|
+
import { A as LabeledScenarioWrite, D as LabeledScenarioSampleArgs, E as LabeledScenarioRecord, O as LabeledScenarioSource, R as Scenario, S as JudgeConfig, T as LabelTrust, a as CampaignResult, b as GenerationRecord, d as DispatchContext, j as MutableSurface, k as LabeledScenarioStore, l as CodeSurface, p as Gate, u as ComponentSurface, w as JudgeScore } from "./types-BBFNHxSK.js";
|
|
8
|
+
import { E as RiskDifferenceResult, _ as McNemarResult, d as EProcessState, v as PairedBootstrapOptions, y as PairedBootstrapResult } from "./statistics-B5d0Zd-z.js";
|
|
9
|
+
import { A as PairedMcNemarEvidence, D as PairedDecisionMethod, j as PairedPromotionDecision, k as PairedDecisionStatistic } from "./summary-report-Cg7BifAM.js";
|
|
10
|
+
import { rn as PlanCampaignRunOptions, sn as CampaignStorage, tn as CampaignRunPlan } from "./skillopt-optimization-method-_s0Tub7Y.js";
|
|
11
11
|
import { D as LedgerHash, m as LedgerTrustedHeadRemoval, p as LedgerTrustedHead } from "./index-DEb46kc6.js";
|
|
12
12
|
import { AgentProfile, AgentProfile as AgentProfile$1, HarnessType, HarnessType as HarnessType$1 } from "@tangle-network/agent-interface";
|
|
13
13
|
//#region src/campaign/analyst-surface.d.ts
|
|
14
14
|
interface TraceAnalystScenario extends Scenario {
|
|
15
15
|
kind: 'trace-analyst';
|
|
16
16
|
traceStore: TraceAnalysisStore;
|
|
17
|
+
labelState: AnalystBenchmarkLabelState;
|
|
17
18
|
expectedIssues: readonly AnalystIssueExpectation[];
|
|
18
19
|
labeledEvidence?: AnalystBenchmarkCase['labeledEvidence'];
|
|
19
20
|
}
|
|
@@ -24,7 +25,7 @@ interface TraceAnalystArtifact {
|
|
|
24
25
|
}
|
|
25
26
|
interface BuildTraceAnalystSurfaceDispatchOptions {
|
|
26
27
|
analyze(input: {
|
|
27
|
-
|
|
28
|
+
instructions: string;
|
|
28
29
|
traceStore: TraceAnalysisStore;
|
|
29
30
|
runId: string;
|
|
30
31
|
signal: AbortSignal;
|
|
@@ -2137,4 +2138,4 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
|
|
|
2137
2138
|
declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
|
|
2138
2139
|
//#endregion
|
|
2139
2140
|
export { SearchPlannedEvent as $, EvalFixtureScenario as $n, pairRunRecords as $r, HarnessType$1 as $t, SearchAccountingAudit as A, SequentialDecideFn as An, CrossSurfaceInteractionTask as Ar, UserStory as At, SearchCostAccounting as B, SignedManifest as Bn, CrossSurfaceTaskRow as Br, RunProfileMatrixOptions as Bt, surfaceHash as C, HeldoutSignificance as Cn, CrossSurfaceEligibility as Cr, tangleTracesRoot as Ct, FileSearchLedger as D, dimensionRegressions as Dn, CrossSurfaceInteractionEffect as Dr, ScoreboardRenderOptions as Dt, acquireSingleRunLock as E, detectScale as En, CrossSurfaceInteractionAwareSelection as Er, PlaybackStep as Et, SearchCandidateRegisteredEvent as F, SequentialPairedGateOptions as Fn, CrossSurfacePairwiseEntry as Fr, scoreboardSummary as Ft, SearchLedgerEvent as G, signManifest as Gn, PairArmsResult as Gr, BackendIntegrityReport as Gt, SearchLedger as H, canonicalize as Hn, MatchedPair as Hr, ScenarioRollup as Ht, SearchCandidateSlot as I, sequentialDecide as In, CrossSurfaceRankedSingle as Ir, userStoryScoreboard as It, SearchLedgerTrustedHeadMode as J, neutralizationGate as Jn, PairedArmsComparison as Jr, summarizeAgentReceiptIntegrity as Jt, SearchLedgerHash as K, verifyManifest as Kn, PairRunRecordsResult as Kr, assertRealAgentReceipts as Kt, SearchCandidateSlotClosedEvent as L, sequentialPairedGate as Ln, CrossSurfaceRelativeCost as Lr, ProfileDispatchFn as Lt, SearchAttemptAccounting as M, SequentialDecision as Mn, CrossSurfacePairCompatibility as Mr, makePlaybackDispatch as Mt, SearchCandidateDecidedEvent as N, SequentialObservation as Nn, CrossSurfacePairEvidence as Nr, renderScoreboardMarkdown as Nt, OpenSearchLedgerOptions as O, heldoutSignificance as On, CrossSurfaceInteractionPath as Or, ScoreboardRow as Ot, SearchCandidateLineage as P, SequentialPairedGate as Pn, CrossSurfacePairIncompatibilityReason as Pr, scoreUserStory as Pt, SearchPlan as Q, EvalFixtureRunPlan as Qn, pairArms as Qr, HARNESS_NATIVE_MODEL as Qt, SearchCandidateSurface as R, HypothesisManifest as Rn, CrossSurfaceSelectionPolicy as Rr, ProfileMatrixError as Rt, surfaceContentHash as S, DimensionRegression as Sn, CrossSurfaceDistribution as Sr, resolveRunDir as St, SingleRunLockOptions as T, PairedHoldout as Tn, CrossSurfaceIneligibilityReason as Tr, PlaybackDriver as Tt, SearchLedgerAppendResult as U, evaluateHypothesis as Un, MatchedRunRecordPair as Ur, runProfileMatrix as Ut, SearchFailureReason as V, SignedManifestAlgo as Vn, ComparePairedArmsOptions as Vr, RunProfileMatrixResult as Vt, SearchLedgerEntry as W, hashJson as Wn, PairArmsOptions as Wr, BackendIntegrityError as Wt, SearchOperationKind as X, EvalFixtureFile as Xn, PairedMetricDelta as Xr, AgentProfile$1 as Xt, SearchModelIdentity as Y, EvalFixture as Yn, PairedCorrectness as Yr, summarizeBackendIntegrity as Yt, SearchOperationRecordedEvent as Z, EvalFixtureLoadOptions as Zn, comparePairedArms as Zr, CODING_HARNESSES as Zt, assertCodeSurfaceIdentity as _, RolloutCall as _n, CrossSurfaceCandidateOutcome as _r, compareRankKeys as _t, WorktreeAdapterError as a, harnessAxisOf as an, loadEvalFixtureScenarios as ar, SearchSurfaceKind as at, componentSurfaceIdentityMaterial as b, classifyUngroundedLiterals as bn, CrossSurfaceComponentEvidence as br, scoreDiscrimination as bt, verifyCodeSurface as c, RuntimeEventLike as cn, AnalyzeCrossSurfaceInteractionsInput as cr, SearchTokenAccounting as ct, PhoenixEvaluationResultLike as d, neutralizeText as dn, CrossSurfaceAttemptCompleteness as dr, SearchLedgerConflictError as dt, BuildTraceAnalystSurfaceDispatchOptions as ei, ProfileAxisSpec as en, EvalFixtureValidationMode as er, SearchPlannedOperation as et, PhoenixEvaluatorLike as f, FsLabeledScenarioStore as fn, CrossSurfaceBestSingleSelection as fr, SearchLedgerError as ft, isTransientTransportFailure as g, RolloutArgumentDiffOptions as gn, CrossSurfaceCandidateEvidence as gr, campaignMeanComposite as gt, TransientFailureOptions as h, RolloutArgumentDiff as hn, CrossSurfaceCandidateComparison as hr, campaignBreakdown as ht, WorktreeAdapter as i, traceAnalystQualityJudge as ii, expandProfileAxes as in, loadEvalFixture as ir, SearchSurfaceEvidence as it, SearchArtifactRef as j, SequentialDecideOptions as jn, CrossSurfaceNaiveStackSelection as jr, UserStoryVerdict as jt, SEARCH_LEDGER_SCHEMA as k, pairHoldout as kn, CrossSurfaceInteractionReport as kr, ScoreboardSummary as kt, AutoevalsScoreLike as l, ToolCallEventLike as ln, CrossSurfaceAdditionDecision as lr, openSearchLedger as lt, phoenixEvaluatorJudge as m, LabeledScenarioStoreError as mn, CrossSurfaceCandidate as mr, CampaignBreakdown as mt, GitWorktreeAdapterOptions as n, TraceAnalystScenario as ni, agentProfileId as nn, PlanEvalFixtureRunOptions as nr, SearchSourceRef as nt, gitWorktreeAdapter as o, ArtifactEventLike as on, planEvalFixtureRun as or, SearchTaskAttemptedEvent as ot, autoevalsScorerJudge as p, FsLabeledScenarioStoreOptions as pn, CrossSurfaceBootstrapPolicy as pr, SearchLedgerIntegrityError as pt, SearchLedgerReplay as q, NeutralizationGateOptions as qn, PairedArmRow as qr, assertRealBackend as qt, Worktree as r, buildTraceAnalystSurfaceDispatch as ri, agentProfileModelId as rn, discoverEvalFixtures as rr, SearchSurfaceEffect as rt, resolveWorktreePath as s, ProposalEventLike as sn, analyzeCrossSurfaceInteractions as sr, SearchTaskOutcome as st, CodeSurfaceVerification as t, TraceAnalystArtifact as ti, agentProfileHash as tn, LoadEvalFixtureScenariosOptions as tr, SearchPlannedTask as tt, AutoevalsScorerLike as u, extractProducedState as un, CrossSurfaceAdditionRejectionReason as ur, validateSearchLedgerEvent as ut, assertComponentSurface as v, ScoredRollout as vn, CrossSurfaceCandidateSummary as vr, DiscriminationScore as vt, SingleRunLock as w, HeldoutSignificanceOptions as wn, CrossSurfaceEvidenceBreakdown as wr, PlaybackContext as wt, renderSurfaceDiff as x, rolloutArgumentDiff as xn, CrossSurfaceCompositionStep as xr, selectDiscriminative as xt, codeSurfaceIdentityMaterial as y, UngroundedLiteralReport as yn, CrossSurfaceComponent as yr, ScenarioSignal as yt, SearchCompletedEvent as z, HypothesisResult as zn, CrossSurfaceSelections as zr, ProfileSummary as zt };
|
|
2140
|
-
//# sourceMappingURL=index-
|
|
2141
|
+
//# sourceMappingURL=index-BTm_P9aC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BTm_P9aC.d.ts","names":[],"sources":["../src/campaign/analyst-surface.ts","../src/paired-arms.ts","../src/campaign/cross-surface-types.ts","../src/campaign/cross-surface-interaction.ts","../src/campaign/fixtures.ts","../src/campaign/gates/neutralization-gate.ts","../src/pre-registration.ts","../src/campaign/gates/sequential.ts","../src/campaign/gates/statistical-heldout.ts","../src/campaign/grounded-reflection.ts","../src/campaign/labeled-store/fs-adapter.ts","../src/campaign/neutralize.ts","../src/produced-state.ts","../src/agent-profile.ts","../src/integrity/backend-integrity.ts","../src/campaign/presets/run-profile-matrix.ts","../src/campaign/presets/playback.ts","../src/campaign/run-dir.ts","../src/campaign/scenario-selection.ts","../src/campaign/score-utils.ts","../src/campaign/search-ledger-errors.ts","../src/campaign/search-ledger.ts","../src/campaign/single-run-lock.ts","../src/campaign/surface-identity.ts","../src/campaign/transient-failure.ts","../src/campaign/upstream-evaluators.ts","../src/campaign/worktree/index.ts"],"mappings":";;;;;;;;;;;;;UAWiB,6BAA6B;EAC5C;EACA,YAAY;EACZ,YAAY;EACZ,yBAAyB;EACzB,kBAAkB;;UAGH;EACf,mBAAmB;EACnB,QAAQ;EACR,MAAM;;UAGS;EACf,QAAQ;IACN;IACA,YAAY;IACZ;IACA,QAAQ;MACN,QAAQ;;iBAGE,iCACd,SAAS,2CAET,SAAS,gBACT,UAAU,sBACV,SAAS,oBACN,QAAQ;iBAgBG,4BAA4B,YAC1C,sBACA;;;;;UClBe;;;EAGf;;;;;EAKA;;EAEA;;EAEA;;EAEA,UAAU;;UAGK;;EAEf;;EAEA;;;UAIe;EACf;;;;EAIA;E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;IAAiB;MAAkB,QAAQ;;;EAG1D,SAAS,UAAU,UAAU,kBAAkB,QAAQ;;EAEvD,QAAQ,UAAU,WAAW;;;cAIlB,6BAA6B;WAG7B;EAFX,YACE,iBACS;;UAOI;;EAEf;;EAEA;;EAEA;;;;EAIA,MAAM;;UAobS;;EAEf;;EAEA;;EAEA;;;EAGA,YAAY;;;;;iBAoJE,mBAAmB,MAAM,4BAA4B;;;;iBA0FrD,kBACd,SAAS,aACT,uBACC;;;iBAOa,oBAAoB,SAAS,aAAa"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as RunRecord } from "./run-record-
|
|
1
|
+
import { a as RunRecord } from "./run-record-CztDMXVF.js";
|
|
2
2
|
import { s as TraceStore } from "./store-CT9YIIve.js";
|
|
3
3
|
import { a as GatedEvidence, b as RolloutSplit, g as RolloutOutcome, h as RolloutLine, n as ChatMessage, o as MintedRolloutLine, w as ToolDef, x as RolloutStep, y as RolloutRole } from "./schema-Cef2cFmb.js";
|
|
4
4
|
import { DatabaseSync } from "node:sqlite";
|
|
@@ -936,4 +936,4 @@ declare function parseRolloutReleaseArgs(argv: string[]): RolloutReleaseCliArgs;
|
|
|
936
936
|
declare function runRolloutReleaseCli(argv: string[]): Promise<number>;
|
|
937
937
|
//#endregion
|
|
938
938
|
export { ScoreOrigin as $, toSftRows as $t, ReleaseRowRef as A, GATE_CHECKS as At, readOpencodeSessionMessages as B, gatedEvidenceOf as Bt, scrubRolloutLine as C, HarborSubagentTrajectoryRef as Ct, FormatGateCounts as D, relabelImportedSplit as Dt, FORMAT_GATE_DISPOSITION as E, fromHarborTrajectory as Et, DEFAULT_OPENCODE_DB as F, GateCheckId as Ft, claudeProjectSlug as G, SftRow as Gt, ClaudeTranscriptRef as H, RewardRow as Ht, OpencodeSessionRow as I, GateCheckedOutcome as It, MintRolloutOptions as J, realnessLabels as Jt, findClaudeTranscripts as K, VerifiersRolloutOutput as Kt, findOpencodeSessionById as L, GateEntryPoint as Lt, gatedRolloutIds as M, GATE_POLICIES as Mt, measureFormatGate as N, GateCheck as Nt, GateDisposition as O, toHarborTrajectories as Ot, releaseRowRefs as P, GateCheckDisposition as Pt, unmintableReasons as Q, toRftItems as Qt, findOpencodeSessionsByDirectory as R, GatePolicy as Rt, scrubLines as S, HarborStepSource as St, EmittedEvidence as T, HarborTrajectory as Tt, ClaudeUsageTotals as U, RftItem as Ut, ClaudeTranscript as V, RealnessLabels as Vt, DEFAULT_CLAUDE_PROJECTS_DIR as W, SftExportOptions as Wt, RolloutScrubber as X, toRewardRows as Xt, MintRolloutResult as Y, toJsonl as Yt, mintRolloutRows as Z, toRftItem as Zt, ScrubCounts as _, HarborImageSource as _t, ScrubReport as a, trainingReward as at, defaultRolloutScrubber as b, HarborObservationResult as bt, planPushCommand as c, readRolloutJournal as ct, DatasetCardInputs as d, ATIF_SCHEMA_VERSION as dt, toVerifiersRolloutOutput as en, ScorePreference as et, FORMAT_FILES as f, FromHarborOptions as ft, SCRUB_RULES as g, HarborFinalMetrics as gt, buildDatasetCard as h, HarborContentPart as ht, RolloutReleaseCliArgs as i, scoreOrigin as it, assertGateReport as j, GATE_CHECK_IDS as jt, GateReport as k, toHarborTrajectory as kt, pushDataset as l, readRolloutLedger as lt, ReleaseFormat as m, HarborAgent as mt, BuildSummary as n, observedScore as nt, buildHfDataset as o, trainingScore as ot, RELEASE_FORMATS as p, HARBOR_IMPORT_GAP as pt, readClaudeTranscript as q, VerifiersTokenUsage as qt, ROLLOUT_RELEASE_USAGE as r, observedSplitScore as rt, parseRolloutReleaseArgs as s, appendRolloutLines as st, BuildOptions as t, toVerifiersRolloutOutputs as tn, isRealnessGated as tt, runRolloutReleaseCli as u, writeRolloutLedger as ut, ScrubRule as v, HarborMetrics as vt, scrubText as w, HarborToolCall as wt, emptyScrubCounts as x, HarborStep as xt, addScrubCounts as y, HarborObservation as yt, openOpencodeDb as z, gateErrors as zt };
|
|
939
|
-
//# sourceMappingURL=index-
|
|
939
|
+
//# sourceMappingURL=index-CWOPCJiw.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CWOPCJiw.d.ts","names":[],"sources":["../src/rollout/exporters.ts","../src/rollout/gate-checks.ts","../src/rollout/interchange/harbor.ts","../src/rollout/ledger.ts","../src/rollout/reward.ts","../src/rollout/mint.ts","../src/rollout/readers/claude-jsonl.ts","../src/rollout/readers/opencode-sqlite.ts","../src/rollout/release/gate-report.ts","../src/rollout/release/scrub.ts","../src/rollout/release/card.ts","../src/rollout/release/hf-dataset.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;UAiDiB;;EAEf;;;;;;EAMA;;iBAGc,eAAe,MAAM,oBAAoB;UAcxC;;EAEf;;EAEA;;;;;;;;;;;;;;;;;;;;;;KAuBU;UAEK,kCAAkC;;EAEjD,aAAa;;KAGH,mBAAmB;UAEd;EACf,UAAU;EACV;IACE;IACA;IACA;IACA;IACA;MACE;;;;;;;;;;;;;;;;;iBAkBU,UAAU,OAAO,qBAAqB,UAAS,mBAAwB;UAyBtE;;EAEf;EACA,OAAO;EACP;EACA;IACE;IACA;IACA;IACA;IACA,OAAO;MAUL;;;;;iBAMU,aACd,OAAO,qBACP,UAAS,wBACR;UAgCc;EACf;EACA;EACA;EACA;EACA;;UAGe;;EAEf,QAAQ;;EAER,YAAY;EACZ;EACA,SAAS;EACT,WAAW;EACX,aAAa;EACb;IACE,MAAM;IACN,QAAQ;IACR;IACA;IACA;IACA;IACA;IACA;IACA,MAAM;MACJ;;iBASU,yBAAyB,MAAM,oBAAoB;iBA+BnD,0BACd,OAAO,qBACP,UAAS,4BACR;UAoBc;;EAEf,UAAU;;EAEV;IACE;IACA;IACA;IACA;IACA;IACA,OAAO;IACP;MACE;;iBAGU,UAAU,MAAM,oBAAoB;;iBAmBpC,WACd,OAAO,qBACP,UAAS,4BACR;iBAkBa,QAAQ,MAAM;;;;;;;;;;cCpUjB;KAOD,sBAAsB;;;;;;;;;KA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7B,MAAM;EACN;;iBAGoB,eACpB,kBACA,SAAS,eACR,QAAQ;iBAuGK,gBAAgB,cAAc;iBAI9B,YAAY,cAAc;UAgBzB,8BAA8B;EAC7C;EACA;;cAGW;iBAGG,wBAAwB,iBAAiB;;iBA0CnC,qBAAqB,iBAAiB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as RunTokenUsage } from "./run-record-
|
|
2
|
-
import { _t as RawProviderSink, mt as ProviderRedactor } from "./types-
|
|
1
|
+
import { u as RunTokenUsage } from "./run-record-CztDMXVF.js";
|
|
2
|
+
import { _t as RawProviderSink, mt as ProviderRedactor } from "./types-uPrS6mD-.js";
|
|
3
3
|
//#region src/trace/extract-usage.d.ts
|
|
4
4
|
type ExtractedUsage = RunTokenUsage;
|
|
5
5
|
type SseUsageMode = 'cumulative' | 'delta';
|
|
@@ -65,4 +65,4 @@ interface CaptureFetchOptions {
|
|
|
65
65
|
declare function captureFetchToRawSink(fetch: typeof globalThis.fetch, sink: RawProviderSink, ctx: CaptureFetchContext, opts?: CaptureFetchOptions): typeof globalThis.fetch;
|
|
66
66
|
//#endregion
|
|
67
67
|
export { ExtractedUsage as a, extractUsageFromResponse as c, ExtractUsageFromSseOptions as i, extractUsageFromSse as l, CaptureFetchOptions as n, SseUsageMode as o, captureFetchToRawSink as r, extractUsage as s, CaptureFetchContext as t };
|
|
68
|
-
//# sourceMappingURL=index-
|
|
68
|
+
//# sourceMappingURL=index-CtR1xh4V.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CtR1xh4V.d.ts","names":[],"sources":["../src/trace/extract-usage.ts","../src/trace/capture-fetch.ts"],"mappings":";;;KAgBY,iBAAiB;KACjB;UAEK;;EAEf,OAAO;;;;;;;iBAuDO,aAAa,gBAAgB;;;;;;iBA6C7B,oBACd,cACA,UAAS,6BACR;;;;;;;iBA4DmB,yBACpB,UAAU,UACV,aAAa,6BACZ,QAAQ;;;UCrKM;;;EAGf;;EAEA;;;EAGA;;EAEA;;EAEA;;UAGe;;EAEf,WAAW;;;EAGX;;;EAGA;;;;;;;;EAQA,WAAW,OAAO,gBAAgB,KAAK;;EAEvC,eAAe;;iBAkDD,sBACd,cAAc,WAAW,OACzB,MAAM,iBACN,KAAK,qBACL,OAAM,6BACE,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-DEb46kc6.d.ts","names":[],"sources":["../src/ledger-core/atomic-file-lock.ts","../src/ledger-core/canonical.ts","../src/ledger-core/journal-file.ts","../src/ledger-core/trusted-head.ts","../src/ledger-core/journal.ts"],"mappings":";;;UAiBiB;WACN;WACA;WACA;;UAGM;WACN,OAAO;EAChB;;KAGU;WACG;WAA0B;WAAyB,QAAQ;;WAC3D;WAA0B;;KAE7B;WACG;WAAyB,MAAM;IAC1C;UAEa;WACN;WACA;;cAGE,4BAA4B;WACrB;;;iBASJ,oBACd,SAAS,wBACR;;;;;;;iBAea,yBACd,SAAS,wBACR;;;KCjDS;;cAGC,qBAAmB;;cAGnB,oCAAoC;;;;iBAKjC,gBAAgB;iBAQhB,cAAc,iBAAiB;;;;;
|
|
1
|
+
{"version":3,"file":"index-DEb46kc6.d.ts","names":[],"sources":["../src/ledger-core/atomic-file-lock.ts","../src/ledger-core/canonical.ts","../src/ledger-core/journal-file.ts","../src/ledger-core/trusted-head.ts","../src/ledger-core/journal.ts"],"mappings":";;;UAiBiB;WACN;WACA;WACA;;UAGM;WACN,OAAO;EAChB;;KAGU;WACG;WAA0B;WAAyB,QAAQ;;WAC3D;WAA0B;;KAE7B;WACG;WAAyB,MAAM;IAC1C;UAEa;WACN;WACA;;cAGE,4BAA4B;WACrB;;;iBASJ,oBACd,SAAS,wBACR;;;;;;;iBAea,yBACd,SAAS,wBACR;;;KCjDS;;cAGC,qBAAmB;;cAGnB,oCAAoC;;;;iBAKjC,gBAAgB;iBAQhB,cAAc,iBAAiB;;;;;UCtB9B;;EAEf;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ACzC,UAAS;EASL,UAAU,QAAQ,mBAAmB,cAAc,QAAQ,QAAQ;EAMnE,OACJ,OAAO,OACP,UAAS,sBACR,QAAQ,mBAAmB,cAAc,QAAQ,QAAQ;;EA8CtD,eAAe,QAAQ;;;;EAWvB,kBAAkB,QAAQ;;;;;;;;EA4B1B,oBAAoB,QAAQ;;;;;;;;;;;;;UAoB1B;UAiBA;UAUA;UAgBA;UAgDA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as RunSplitTag } from "./run-record-
|
|
2
|
-
import { R as Scenario, a as CampaignResult, d as DispatchContext } from "./types-
|
|
3
|
-
import { sn as CampaignStorage } from "./skillopt-optimization-method-
|
|
4
|
-
import "./index-
|
|
1
|
+
import { s as RunSplitTag } from "./run-record-CztDMXVF.js";
|
|
2
|
+
import { R as Scenario, a as CampaignResult, d as DispatchContext } from "./types-BBFNHxSK.js";
|
|
3
|
+
import { sn as CampaignStorage } from "./skillopt-optimization-method-_s0Tub7Y.js";
|
|
4
|
+
import "./index-BTm_P9aC.js";
|
|
5
5
|
//#region src/benchmarks/types.d.ts
|
|
6
6
|
type BenchmarkTaskKind = 'retrieval' | 'rag-answer' | 'hallucination' | 'kb-improvement' | 'routing' | 'custom';
|
|
7
7
|
type BenchmarkFamily = 'beir' | 'mteb-retrieval' | 'msmarco' | 'trec-dl' | 'miracl' | 'lotte' | 'bright' | 'crag' | 'hotpotqa' | 'kilt' | 'ragtruth' | 'faithbench' | 'first-party' | 'custom';
|
|
@@ -332,4 +332,4 @@ declare namespace index_d_exports {
|
|
|
332
332
|
}
|
|
333
333
|
//#endregion
|
|
334
334
|
export { BenchmarkMetricCalibrationOptions as A, BenchmarkSource as B, BenchmarkRunOptions as C, runBenchmarkAdapter as D, renderBenchmarkReportMarkdown as E, BenchmarkDatasetItem as F, deterministicSplit as H, BenchmarkEvaluation as I, BenchmarkFamily as L, calibrateBenchmarkMetric as M, BENCHMARK_SPLIT_SEED as N, summarizeBenchmarkCampaign as O, BenchmarkAdapter as P, BenchmarkResponder as R, BenchmarkReport as S, BenchmarkSliceSummary as T, BenchmarkTaskKind as V, parseJsonlRows as _, StandardRetrievalDocument as a, retrievalMetricsAtCutoff as b, StandardRetrievalQrel as c, buildStandardRetrievalItems as d, createRetrievalIdBenchmarkAdapter as f, parseBeirQueriesJsonl as g, parseBeirCorpusJsonl as h, StandardRetrievalArtifact as i, BenchmarkMetricCalibrationResult as j, index_d_exports$1 as k, StandardRetrievalQuery as l, normalizeRetrievedDocumentIds as m, BuildStandardRetrievalItemsOptions as n, StandardRetrievalEvaluationOptions as o, evaluateStandardRetrieval as p, RetrievalIdAdapterOptions as r, StandardRetrievalPayload as s, index_d_exports as t, StandardRetrievalResult as u, parseQrels as v, BenchmarkRunResult as w, BenchmarkDistribution as x, parseTsvRows as y, BenchmarkScenario as z };
|
|
335
|
-
//# sourceMappingURL=index-
|
|
335
|
+
//# sourceMappingURL=index-_66rVpwN.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-_66rVpwN.d.ts","names":[],"sources":["../src/benchmarks/types.ts","../src/benchmarks/calibration.ts","../src/benchmarks/routing/dataset.ts","../src/benchmarks/routing/index.ts","../src/benchmarks/runner.ts","../src/benchmarks/standard-formats.ts","../src/benchmarks/index.ts"],"mappings":";;;;;KASY;KAQA;UAgBK,qBAAqB;;;EAGpC;;EAEA,SAAS;;EAET,QAAQ;;EAER,SAAS;;EAET,WAAW;;EAEX;;EAEA,SAAS;EACT,WAAW;;UAGI;;;;EAIf;;EAEA;;EAEA,aAAa;;;EAGb,KAAK;EACL;;UAGe;EACf;EACA;EACA;EACA;EACA;;;UAQe,iBAAiB,kBAAkB,oBAAoB;;EAEtE;EACA,SAAS;EACT,WAAW;EACX;EACA,SAAS;EACT;;;;;EAKA,YAAY,OAAO,cAAc,QAAQ,qBAAqB;;EAE9D,SAAS,MAAM,qBAAqB,WAAW,UAAU,YAAY,QAAQ;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