@tangle-network/agent-eval 0.207.4 → 0.208.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/adapters/http.d.ts +1 -1
  3. package/dist/analyst/index.d.ts +1 -1
  4. package/dist/analyst/index.js +3 -3
  5. package/dist/{benchmark-command-DiFof9bz.js → benchmark-command-BC265T1r.js} +5 -5
  6. package/dist/{benchmark-command-DiFof9bz.js.map → benchmark-command-BC265T1r.js.map} +1 -1
  7. package/dist/benchmarks/index.d.ts +2 -2
  8. package/dist/benchmarks/index.js +3 -3
  9. package/dist/campaign/index.d.ts +3 -3
  10. package/dist/campaign/index.js +7 -7
  11. package/dist/{campaign-B8MqboM0.js → campaign-C5pjR-Qn.js} +8 -8
  12. package/dist/{campaign-B8MqboM0.js.map → campaign-C5pjR-Qn.js.map} +1 -1
  13. package/dist/cli.js +4 -4
  14. package/dist/contract/index.d.ts +4 -4
  15. package/dist/contract/index.js +4 -4
  16. package/dist/{define-agent-eval-BpRdb_Oa.js → define-agent-eval-BjKXcDQp.js} +3 -3
  17. package/dist/{define-agent-eval-BpRdb_Oa.js.map → define-agent-eval-BjKXcDQp.js.map} +1 -1
  18. package/dist/{define-agent-eval-Bmc4AYiB.d.ts → define-agent-eval-C8zBSbsc.d.ts} +3 -3
  19. package/dist/{define-agent-eval-Bmc4AYiB.d.ts.map → define-agent-eval-C8zBSbsc.d.ts.map} +1 -1
  20. package/dist/{dspy-rlm-engine-AJqjFUUr.js → dspy-rlm-engine-sHwdSxK3.js} +2 -2
  21. package/dist/{dspy-rlm-engine-AJqjFUUr.js.map → dspy-rlm-engine-sHwdSxK3.js.map} +1 -1
  22. package/dist/{external-optimizer-process-Bemjoy8y.js → external-optimizer-process-D2Txd-7D.js} +2 -2
  23. package/dist/{external-optimizer-process-Bemjoy8y.js.map → external-optimizer-process-D2Txd-7D.js.map} +1 -1
  24. package/dist/{external-optimizer-subprocess-d_EQrcTS.js → external-optimizer-subprocess-C0EsxEbI.js} +11 -3
  25. package/dist/{external-optimizer-subprocess-d_EQrcTS.js.map → external-optimizer-subprocess-C0EsxEbI.js.map} +1 -1
  26. package/dist/{index-B9mXrS0W.d.ts → index-Bzto04CY.d.ts} +2 -2
  27. package/dist/{index-B9mXrS0W.d.ts.map → index-Bzto04CY.d.ts.map} +1 -1
  28. package/dist/{index-LAFht3x_.d.ts → index-nwNoS582.d.ts} +3 -3
  29. package/dist/{index-LAFht3x_.d.ts.map → index-nwNoS582.d.ts.map} +1 -1
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.js +6 -6
  32. package/dist/{llm-judge-DBrxRG2D.js → llm-judge-HLWASwUJ.js} +4 -4
  33. package/dist/{llm-judge-DBrxRG2D.js.map → llm-judge-HLWASwUJ.js.map} +1 -1
  34. package/dist/openapi.json +1 -1
  35. package/dist/{produced-state-DyTuvglz.js → produced-state-Bzlh09oj.js} +2 -2
  36. package/dist/{produced-state-DyTuvglz.js.map → produced-state-Bzlh09oj.js.map} +1 -1
  37. package/dist/search/index.d.ts +1 -1
  38. package/dist/search/index.js +2 -2
  39. package/dist/{search-kernel-mzeNuzr8.js → search-kernel-CIie6xig.js} +44 -2
  40. package/dist/search-kernel-CIie6xig.js.map +1 -0
  41. package/dist/{search-kernel-CzTWtv5d.d.ts → search-kernel-uKdPVRAe.d.ts} +17 -2
  42. package/dist/search-kernel-uKdPVRAe.d.ts.map +1 -0
  43. package/dist/{search-summary-CDURlgZR.js → search-summary-BV5uehLd.js} +2 -2
  44. package/dist/{search-summary-CDURlgZR.js.map → search-summary-BV5uehLd.js.map} +1 -1
  45. package/dist/{semantic-concept-judge-DDxUiWIz.js → semantic-concept-judge-D1wH-YKc.js} +2 -2
  46. package/dist/{semantic-concept-judge-DDxUiWIz.js.map → semantic-concept-judge-D1wH-YKc.js.map} +1 -1
  47. package/dist/{skillopt-optimization-method-D0-bMRGu.js → skillopt-optimization-method-Dcnh5Pvr.js} +4 -4
  48. package/dist/{skillopt-optimization-method-D0-bMRGu.js.map → skillopt-optimization-method-Dcnh5Pvr.js.map} +1 -1
  49. package/dist/{tree-CN8mlzUO.js → tree-CJOXbVcv.js} +2 -2
  50. package/dist/{tree-CN8mlzUO.js.map → tree-CJOXbVcv.js.map} +1 -1
  51. package/docs/quickstart-external.md +268 -0
  52. package/docs/search-ledger.md +4 -1
  53. package/package.json +1 -1
  54. package/dist/search-kernel-CzTWtv5d.d.ts.map +0 -1
  55. package/dist/search-kernel-mzeNuzr8.js.map +0 -1
@@ -0,0 +1,268 @@
1
+ # External agent quickstart
2
+
3
+ Run an evaluation and an improvement loop in your own Node.js process.
4
+ No Tangle account, sandbox, runtime, or framework migration is required.
5
+ The first run is an offline wiring exercise; `--openai` explicitly opts into paid model calls.
6
+
7
+ Use `defineAgentEval()` from the [main README](../README.md#quickstart) for the higher-level API.
8
+ This guide exposes `dispatch`, `runCampaign()`, and `runImprovementLoop()` when you want to own the wiring.
9
+
10
+ ## Install
11
+
12
+ With Node.js 20.19 or newer, start in an empty directory:
13
+
14
+ ```sh
15
+ npm init -y
16
+ npm install @tangle-network/agent-eval
17
+ npm install --save-dev tsx
18
+ ```
19
+
20
+ ## Run a campaign and an improvement loop
21
+
22
+ Save this entire block as `eval.mts`. It includes a deterministic agent, a rubric,
23
+ a candidate proposer, and a reference adapter for the raw OpenAI-compatible chat API.
24
+ The adapter reuses the package's maintained transport and receipt helpers rather than introducing another SDK or runtime.
25
+
26
+ <!-- external-quickstart:program -->
27
+ ```ts
28
+ import { randomUUID } from 'node:crypto'
29
+ import { join, resolve } from 'node:path'
30
+ import {
31
+ costReceiptFromLlm,
32
+ costReceiptFromLlmError,
33
+ maximumChargeForLlmRequest,
34
+ } from '@tangle-network/agent-eval'
35
+ import {
36
+ createChatClient,
37
+ defaultProductionGate,
38
+ type DispatchContext,
39
+ inMemoryCampaignStorage,
40
+ type JudgeConfig,
41
+ type MutableSurface,
42
+ type Scenario,
43
+ type SurfaceProposer,
44
+ } from '@tangle-network/agent-eval/contract'
45
+ import { runCampaign, runImprovementLoop } from '@tangle-network/agent-eval/campaign'
46
+ import { type DeploymentOutcome, InMemoryOutcomeStore } from '@tangle-network/agent-eval/rl'
47
+
48
+ interface SupportCase extends Scenario { ticket: string }
49
+ interface SupportAnswer { text: string }
50
+
51
+ // Replace this function with the SAME agent call your application uses.
52
+ // Its input/output need not know anything about agent-eval.
53
+ async function existingAgent(input: {
54
+ instructions: string
55
+ ticket: string
56
+ signal: AbortSignal
57
+ }) {
58
+ input.signal.throwIfAborted()
59
+ return {
60
+ message: input.instructions.includes('cite the ticket id')
61
+ ? `Ticket ${input.ticket}: on it.`
62
+ : 'On it.',
63
+ }
64
+ }
65
+
66
+ function requiredEnv(name: string): string {
67
+ const value = process.env[name]?.trim()
68
+ if (!value) throw new Error(`Set ${name} before using --openai`)
69
+ return value
70
+ }
71
+
72
+ function tokenRate(name: string): number {
73
+ const value = Number(requiredEnv(name))
74
+ if (!Number.isFinite(value) || value < 0) throw new Error(`${name} must be a nonnegative rate`)
75
+ return value
76
+ }
77
+
78
+ // Reference adapter: raw OpenAI-compatible API, no Tangle execution service.
79
+ function openAiDispatch() {
80
+ const model = requiredEnv('LLM_MODEL')
81
+ const pricing = {
82
+ inputUsdPerMillion: tokenRate('LLM_INPUT_USD_PER_MILLION'),
83
+ outputUsdPerMillion: tokenRate('LLM_OUTPUT_USD_PER_MILLION'),
84
+ }
85
+ const chat = createChatClient({
86
+ transport: 'openai-compatible',
87
+ baseUrl: requiredEnv('LLM_BASE_URL'),
88
+ apiKey: requiredEnv('LLM_API_KEY'),
89
+ defaultModel: model,
90
+ })
91
+ return async (
92
+ surface: MutableSurface,
93
+ scenario: SupportCase,
94
+ ctx: DispatchContext,
95
+ ): Promise<SupportAnswer> => {
96
+ const request = {
97
+ model,
98
+ messages: [
99
+ { role: 'system' as const, content: String(surface) },
100
+ { role: 'user' as const, content: `Please acknowledge ticket ${scenario.ticket}.` },
101
+ ],
102
+ maxTokens: 256,
103
+ }
104
+ const paid = await ctx.cost.runPaidCall({
105
+ actor: 'external-support-agent',
106
+ model,
107
+ maximumCharge: maximumChargeForLlmRequest(request, {
108
+ customTokenPricing: pricing,
109
+ maximumAttempts: chat.maximumAttempts,
110
+ }),
111
+ execute: (signal, callId) => chat.chat(request, { signal, idempotencyKey: callId }),
112
+ receipt: (result) => costReceiptFromLlm(result, pricing),
113
+ receiptFromError: (error) => costReceiptFromLlmError(error, pricing),
114
+ })
115
+ if (!paid.succeeded) throw paid.error
116
+ if (!paid.value.content.trim()) throw new Error('The agent returned an empty answer')
117
+ return { text: paid.value.content }
118
+ }
119
+ }
120
+
121
+ const useOpenAi = process.argv.includes('--openai')
122
+ const dispatchWithSurface = useOpenAi
123
+ ? openAiDispatch()
124
+ : async (surface: MutableSurface, scenario: SupportCase, ctx: DispatchContext) => {
125
+ const result = await existingAgent({
126
+ instructions: String(surface),
127
+ ticket: scenario.ticket,
128
+ signal: ctx.signal,
129
+ })
130
+ return { text: result.message }
131
+ }
132
+
133
+ // A deterministic rubric is a judge. Use llmJudge() for semantic criteria.
134
+ const judge: JudgeConfig<SupportAnswer, SupportCase> = {
135
+ name: 'ticket-id',
136
+ judgeVersion: 'ticket-id-v1',
137
+ dimensions: [{ key: 'present', description: 'The answer cites the supplied ticket id' }],
138
+ score: ({ artifact, scenario }) => {
139
+ const present = artifact.text.includes(scenario.ticket) ? 1 : 0
140
+ return { dimensions: { present }, composite: present, notes: '' }
141
+ },
142
+ }
143
+ const scenarios: SupportCase[] = ['refund', 'shipping'].map((ticket) => ({
144
+ id: `train-${ticket}`, kind: 'support', ticket,
145
+ }))
146
+ const holdoutScenarios: SupportCase[] = ['cancel', 'billing'].map((ticket) => ({
147
+ id: `holdout-${ticket}`, kind: 'support', ticket,
148
+ }))
149
+ const baselineSurface = 'Answer politely.'
150
+ const proposer: SurfaceProposer = {
151
+ kind: 'cite-ticket',
152
+ async propose({ currentSurface }) {
153
+ return [{
154
+ surface: `${String(currentSurface)} Always cite the ticket id.`,
155
+ label: 'cite-ticket',
156
+ rationale: 'The rubric requires the supplied ticket id in the answer.',
157
+ }]
158
+ },
159
+ }
160
+ const runRoot = resolve('eval-quickstart', randomUUID())
161
+ const common = {
162
+ judges: [judge],
163
+ storage: inMemoryCampaignStorage(),
164
+ seed: 7,
165
+ reps: 1,
166
+ maxConcurrency: 2,
167
+ dispatchTimeoutMs: 30_000,
168
+ abortOnCellError: true,
169
+ expectUsage: useOpenAi ? 'assert' as const : 'off' as const,
170
+ // Each top-level call has its own $1 ceiling; the loop shares its ceiling
171
+ // across search and holdout. The script has $2 of total ledger budget at the declared rates.
172
+ costCeiling: useOpenAi ? 1 : undefined,
173
+ }
174
+ const baseline = await runCampaign({
175
+ ...common,
176
+ scenarios,
177
+ dispatch: async function dispatch(scenario, ctx) {
178
+ return dispatchWithSurface(baselineSurface, scenario, ctx)
179
+ },
180
+ dispatchRef: useOpenAi ? 'external-openai-baseline-v1' : 'external-fixture-baseline-v1',
181
+ runDir: join(runRoot, 'baseline'),
182
+ })
183
+ const improvement = await runImprovementLoop({
184
+ ...common,
185
+ scenarios,
186
+ holdoutScenarios,
187
+ baselineSurface,
188
+ dispatchWithSurface,
189
+ dispatchRef: useOpenAi ? 'external-openai-v1' : 'external-fixture-v1',
190
+ proposer,
191
+ populationSize: 1,
192
+ maxGenerations: 1,
193
+ gate: defaultProductionGate<SupportAnswer, SupportCase>({ holdoutScenarios, deltaThreshold: 0 }),
194
+ autoOnPromote: 'none',
195
+ runDir: join(runRoot, 'improvement'),
196
+ })
197
+
198
+ // Synthetic storage example, NOT a measured production outcome or judge score.
199
+ const outcomes = new InMemoryOutcomeStore()
200
+ const observation: DeploymentOutcome = {
201
+ runId: 'synthetic-deployment-run',
202
+ capturedAt: Date.now(),
203
+ metrics: { resolved: 1 },
204
+ source: 'quickstart-fixture',
205
+ }
206
+ await outcomes.append(observation)
207
+ console.log('baseline:', baseline.aggregates.byJudge['ticket-id']?.mean)
208
+ console.log('candidate on holdout:', improvement.winnerOnHoldout.aggregates.byJudge['ticket-id']?.mean)
209
+ console.log('decision:', improvement.gateResult.decision)
210
+ console.log('outcome rows:', (await outcomes.forRun(observation.runId)).length)
211
+ ```
212
+
213
+ ```sh
214
+ npx tsx eval.mts
215
+ ```
216
+
217
+ The offline fixture is constructed to score zero for the baseline and one for the candidate.
218
+ It uses only two holdout cases, so a higher score is not sufficient evidence to ship.
219
+ Inspect `improvement.gateResult`, not just the candidate's mean.
220
+ The candidate generator makes one known edit; this demonstrates the loop, not learned optimization or general agent quality.
221
+ `autoOnPromote: 'none'` reports the decision without changing your agent or opening a PR.
222
+
223
+ ## Connect a real agent
224
+
225
+ Replace `existingAgent()` with your production SDK call, graph invocation, service, or local model.
226
+ Keep the adaptation in `dispatchWithSurface`: translate the surface and scenario into the agent's input,
227
+ forward cancellation, and return the artifact your judge scores.
228
+ Do not pass hidden answer keys or grading instructions into the agent request.
229
+ Keep execution failures as thrown errors rather than successful empty strings or task-score zeroes.
230
+
231
+ For the included OpenAI-compatible adapter, explicitly configure your endpoint, credentials,
232
+ a currently deployed model id, and its current per-million-token rates. For OpenAI directly,
233
+ the base URL is `https://api.openai.com/v1`. Then opt in:
234
+
235
+ ```sh
236
+ # Set LLM_BASE_URL, LLM_API_KEY, LLM_MODEL,
237
+ # LLM_INPUT_USD_PER_MILLION and LLM_OUTPUT_USD_PER_MILLION in your shell.
238
+ npx tsx eval.mts --openai
239
+ ```
240
+
241
+ This mode makes paid calls. It does not fall back to the fixture when a provider fails.
242
+ The maintained transport reports model identity, usage, retries, and failure receipts;
243
+ `ctx.cost.runPaidCall()` reserves for bounded output and the declared maximum attempts before dispatch.
244
+ Unknown usage is not invented, and `expectUsage: 'assert'` rejects missing dispatch evidence.
245
+ Set rates for your actual endpoint; local estimates are not provider invoices. Add cache-read/write
246
+ rates to `pricing` when applicable. Increase `maxTokens` and the explicit budget together when your model needs more output headroom.
247
+
248
+ For an existing multi-call agent, meter every paid call at the point where its receipt is available.
249
+ Do not set `expectUsage: 'off'` merely to make an uninstrumented paid agent appear to work.
250
+ For semantic scoring, use `llmJudge()` from `/contract` with a separate `ChatClient`;
251
+ see [judge verdicts](./verdicts.md). Judge failures must remain failures, not low task scores.
252
+
253
+ ## Keep the useful boundaries
254
+
255
+ The same production execution function should serve your application and evaluation.
256
+ Candidate generation may use training cases, but final comparisons need separate cases;
257
+ real deployments also need representative data, calibrated judges, sufficient independent observations,
258
+ and an explicit approval policy. The tiny fixture is not release evidence.
259
+
260
+ `inMemoryCampaignStorage()` keeps campaign data in this process, and `InMemoryOutcomeStore` does the same
261
+ for downstream observations. Use `fsCampaignStorage()` and `FileSystemOutcomeStore` from the public barrels
262
+ when evidence must survive a restart. With durable campaign storage, include model, prompt, tools, and
263
+ configuration revisions in `dispatchRef` so different execution behavior cannot reuse a stale cache.
264
+
265
+ For real deployment feedback, use the actual production `RunRecord.runId` in `DeploymentOutcome.runId`
266
+ and record independently observed metrics. Do not relabel an evaluation score as a deployment outcome.
267
+ See [outcome validity](./outcome-validity.md), [campaign controls](./eval-surface-map.md), and
268
+ [evaluation integrity](./evaluation-integrity.md) for the next stage.
@@ -477,6 +477,9 @@ The finalists are the nodes decided `finalist`, in decision order; whether the b
477
477
  It returns `verified`, `mismatch` with the differences, or `unknown` for a claim another rule revision made.
478
478
  The projector checks the claim's structure (every finalist named, the Bonferroni confidence of each test, a ship's held-out units and pinned judge) but not its numbers, so a store keeps what `verifySearchClaim` derives, never the producer's claim as written.
479
479
  `runSearch` runs it on every close and on every rerun of a closed ledger, throws on `mismatch`, and returns it as `SearchRunResult.claimVerification`.
480
+ `searchClaimDecision(state, nodeId)` returns the `PairedPromotionDecision` the claim made for one tested finalist, made again from the closed ledger: the root as control, the improvement as `delta`, at the finalist's Bonferroni confidence, with the claim's estimator, resamples and seed.
481
+ It throws unless the result reproduces the claim's recorded test for that finalist, and returns null for a node the claim did not test.
482
+ A consumer that promotes the selected finalist cites this decision with the claim, rather than deciding again from the same cells at another confidence or seed.
480
483
  A judge change is a changed `search-opened` header, which `SearchRecorder.open` refuses; it starts a derived search instead of mixing verdicts.
481
484
 
482
485
  `compareOptimizationMethods` keeps its own held-out comparison for black-box methods such as GEPA, which return one winner and never see the test split.
@@ -555,7 +558,7 @@ Those claims need the sealed test split, the claim's power check, and held-out e
555
558
  - `src/search/lenses/edit-credit.ts`: `editCredit` and `editCreditText`.
556
559
  - `src/campaign/search-ledger-recording.ts`: `SearchRecorder` and the surface helpers.
557
560
  - `src/campaign/search-kernel.ts`: `runSearch`, the executor, proposer and codec ports, `searchPolicyView` and `searchDivergence`.
558
- - `src/campaign/search-claim.ts`: `planSearchClaim`, `decideSearchClaim`, `verifySearchClaim` and `searchClaimReserveUsd`.
561
+ - `src/campaign/search-claim.ts`: `planSearchClaim`, `decideSearchClaim`, `verifySearchClaim`, `searchClaimDecision` and `searchClaimReserveUsd`.
559
562
  - `src/search/lenses/landscape.ts`, `plateau.ts` and `skill-manifold.ts`: the geometry lenses, the plateau score and the unit extension.
560
563
  - `src/campaign/search-policy.ts`: `SearchPolicy`, `incumbent`, `incumbentWithOperatorBandit`, `crowdedFrontierParent`, `aide` and `beam`.
561
564
  - `src/campaign/allocation.ts`: `SearchAllocator`, `uniform` and `asha`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-eval",
3
- "version": "0.207.4",
3
+ "version": "0.208.2",
4
4
  "description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
5
5
  "homepage": "https://github.com/tangle-network/agent-eval#readme",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-kernel-CzTWtv5d.d.ts","names":[],"sources":["../src/campaign/storage.ts","../src/campaign/search-ledger.ts","../src/campaign/search-history-receipt.ts","../src/campaign/search-ledger-recording.ts","../src/search/lenses/shared.ts","../src/search/lenses/operator-yield.ts","../src/campaign/estimate-node.ts","../src/campaign/search-policy.ts","../src/campaign/allocation.ts","../src/campaign/search-claim.ts","../src/campaign/search-kernel.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;UAoBiB;;;;WAIN;;EAET,UAAU;;EAEV,OAAO;;EAEP,KAAK;;EAEL,MAAM,cAAc,kBAAkB;;;EAGtC,OAAO,cAAc,iBAAiB;;;;;;;;;iBAUxB,qBAAqB;;;;iBA2CrB,2BAA2B;;iBAoC3B,oBAAoB;EAClC,SAAS;EACT;EACA;;EAEA;IACE;;;;;iBC2ZY,0BAA0B,iBAAiB;;;;;;;;;;;;;;KAqB/C;UAEK;EACf;EACA;EACA,cAAc;;;;;;;EAOd,QAAQ;;UAGO;EACf,OAAO;;EAEP;EACA,OAAO;;UAGQ;WACN;WACA;;WAEA;EACT,OAAO,OAAO,oBAAoB,QAAQ;;EAE1C,SAAS,QAAQ;;EAEjB,eAAe,QAAQ;;EAEvB,kBAAkB,QAAQ;;;EAG1B,oBAAoB,QAAQ;;;;iBAKd,iBAAiB,SAAS,0BAA0B;;;iBAOpD,uBACd,cACA,kBACA,iBACC;;;;;;;;iBAWa,sBACd,cACA,kBACA,SAAS,oBACR;;cAwDU,4BAA4B;WAC9B;WACA;WACA;mBACQ;mBACA;EAMjB,YAAY,cAAc,kBAAkB,cAAa;EAcnD,SAAS,QAAQ;EAIjB,OAAO,OAAO,oBAAoB,QAAQ;EAU1C,eAAe,QAAQ;EAIvB,kBAAkB,QAAQ;EAI1B,oBAAoB,QAAQ;;;;cCptB9B;cACA;;UAGW;WACN;WACA,UAAU;WACV,QAAQ;WACR,aAAa;WACb;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;;;;;;;;UAaM;WACN,sBAAsB;WACtB;WACA,wBAAwB;WACxB,eAAe;;WAEf;;WAEA;;WAEA,QAAQ;;WAER,aAAa;WACb,SAAS;WACT;WACA;;UAGM;WACN;WACA;WACA;aAAmB;aAAuB;;WAC1C,UAAU,KAAK;;KAGd;UAEK;;;EA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