@tangle-network/agent-eval 2.0.21 → 2.0.24
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 +61 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-CTneqKs4.d.ts → agent-profile-_A7aMA4F.d.ts} +4 -4
- package/dist/{agent-profile-CTneqKs4.d.ts.map → agent-profile-_A7aMA4F.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +10 -10
- package/dist/analyst/index.js +3 -3
- package/dist/{analyze-runs-ByEuSMUT.d.ts → analyze-runs-Izz_ZeWg.d.ts} +2 -2
- package/dist/{analyze-runs-ByEuSMUT.d.ts.map → analyze-runs-Izz_ZeWg.d.ts.map} +1 -1
- package/dist/app-grade/index.d.ts +3 -3
- package/dist/{benchmark-command-pmeFawvb.js → benchmark-command-Cad4mBro.js} +5 -5
- package/dist/{benchmark-command-pmeFawvb.js.map → benchmark-command-Cad4mBro.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +4 -4
- package/dist/benchmarks/index.js +2 -2
- package/dist/campaign/index.d.ts +7 -7
- package/dist/campaign/index.js +6 -6
- package/dist/{campaign-DPB35MjP.js → campaign-VRqINMNu.js} +313 -8
- package/dist/campaign-VRqINMNu.js.map +1 -0
- package/dist/{campaign-evidence-CSb3y1ob.d.ts → campaign-evidence-Biq06MQ9.d.ts} +3 -3
- package/dist/{campaign-evidence-CSb3y1ob.d.ts.map → campaign-evidence-Biq06MQ9.d.ts.map} +1 -1
- package/dist/{campaign-evidence-71uzJMVY.js → campaign-evidence-tY94JzUe.js} +45 -2
- package/dist/campaign-evidence-tY94JzUe.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/contract/index.d.ts +10 -10
- package/dist/contract/index.js +6 -6
- package/dist/{default-registry-CKAFLuJg.d.ts → default-registry-BKHpiYiW.d.ts} +6 -6
- package/dist/{default-registry-CKAFLuJg.d.ts.map → default-registry-BKHpiYiW.d.ts.map} +1 -1
- package/dist/{define-agent-eval-DyVma2pV.d.ts → define-agent-eval-BPg0IRdI.d.ts} +4 -4
- package/dist/{define-agent-eval-DyVma2pV.d.ts.map → define-agent-eval-BPg0IRdI.d.ts.map} +1 -1
- package/dist/{define-agent-eval-CBhYD7Gq.js → define-agent-eval-Dto1p8Pd.js} +3 -3
- package/dist/{define-agent-eval-CBhYD7Gq.js.map → define-agent-eval-Dto1p8Pd.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/{dspy-rlm-engine-DFgGrKzg.js → dspy-rlm-engine-DA4uW64o.js} +2 -2
- package/dist/{dspy-rlm-engine-DFgGrKzg.js.map → dspy-rlm-engine-DA4uW64o.js.map} +1 -1
- package/dist/{evaluation-BnRaBCKu.d.ts → evaluation-f-UIDwbL.d.ts} +4 -4
- package/dist/{evaluation-BnRaBCKu.d.ts.map → evaluation-f-UIDwbL.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/{exact-types-QwxMWchv.d.ts → exact-types-BIHqYBYf.d.ts} +2 -2
- package/dist/{exact-types-QwxMWchv.d.ts.map → exact-types-BIHqYBYf.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +1 -1
- package/dist/experiment/index.js +1 -1
- package/dist/{external-optimizer-process-DkOMkeHW.js → external-optimizer-process-BfRVOfBK.js} +2 -2
- package/dist/{external-optimizer-process-DkOMkeHW.js.map → external-optimizer-process-BfRVOfBK.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-CFIiwHSE.js → external-optimizer-subprocess-D2_gmU9_.js} +8 -3
- package/dist/external-optimizer-subprocess-D2_gmU9_.js.map +1 -0
- package/dist/{feedback-trajectory-BkWAgoY0.d.ts → feedback-trajectory-CoQPmSJV.d.ts} +3 -3
- package/dist/{feedback-trajectory-BkWAgoY0.d.ts.map → feedback-trajectory-CoQPmSJV.d.ts.map} +1 -1
- package/dist/{findings-store-DcBkRLDk.js → findings-store-Daqo7ksI.js} +2 -2
- package/dist/{findings-store-DcBkRLDk.js.map → findings-store-Daqo7ksI.js.map} +1 -1
- package/dist/{index-D4SWfwQe.d.ts → index-0GNQgbji.d.ts} +18 -18
- package/dist/{index-D4SWfwQe.d.ts.map → index-0GNQgbji.d.ts.map} +1 -1
- package/dist/{index-DmsDwlPe.d.ts → index-4khf0Q7g.d.ts} +5 -5
- package/dist/{index-DmsDwlPe.d.ts.map → index-4khf0Q7g.d.ts.map} +1 -1
- package/dist/{index-BrALSxZU.d.ts → index-AUyYKA-x.d.ts} +9 -9
- package/dist/{index-BrALSxZU.d.ts.map → index-AUyYKA-x.d.ts.map} +1 -1
- package/dist/{index-CUpIEvoN.d.ts → index-DH_Jxu9p.d.ts} +2 -2
- package/dist/{index-CUpIEvoN.d.ts.map → index-DH_Jxu9p.d.ts.map} +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +7 -7
- package/dist/{llm-judge-DRHTRT66.js → llm-judge-DyHMJrDb.js} +2 -2
- package/dist/{llm-judge-DRHTRT66.js.map → llm-judge-DyHMJrDb.js.map} +1 -1
- package/dist/{matrix-CHbTz1bP.d.ts → matrix-BtyN7jpb.d.ts} +2 -2
- package/dist/{matrix-CHbTz1bP.d.ts.map → matrix-BtyN7jpb.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +7 -7
- package/dist/multishot/index.js +3 -3
- package/dist/openapi.json +1 -1
- package/dist/{optimization-method-B-NFaHom.js → optimization-method-4F1Npdy5.js} +2 -2
- package/dist/{optimization-method-B-NFaHom.js.map → optimization-method-4F1Npdy5.js.map} +1 -1
- package/dist/{prime-protocol-46WvqIIt.d.ts → prime-protocol-BRMk6dGI.d.ts} +2 -2
- package/dist/{prime-protocol-46WvqIIt.d.ts.map → prime-protocol-BRMk6dGI.d.ts.map} +1 -1
- package/dist/{registry-Bh1M9hrf.d.ts → registry-BeInzotS.d.ts} +3 -3
- package/dist/{registry-Bh1M9hrf.d.ts.map → registry-BeInzotS.d.ts.map} +1 -1
- package/dist/rl.d.ts +3 -3
- package/dist/rollout/index.d.ts +2 -2
- package/dist/{run-improvement-loop-E4Uec3my.d.ts → run-improvement-loop-B9m24xsg.d.ts} +62 -9
- package/dist/run-improvement-loop-B9m24xsg.d.ts.map +1 -0
- package/dist/search/index.d.ts +23 -8
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +73 -31
- package/dist/search/index.js.map +1 -1
- package/dist/{search-kernel-By0lhdoJ.d.ts → search-kernel-C2XOJHvk.d.ts} +2 -2
- package/dist/{search-kernel-By0lhdoJ.d.ts.map → search-kernel-C2XOJHvk.d.ts.map} +1 -1
- package/dist/{self-improve-CpmIIb57.d.ts → self-improve-CcL0tRSr.d.ts} +6 -6
- package/dist/{self-improve-CpmIIb57.d.ts.map → self-improve-CcL0tRSr.d.ts.map} +1 -1
- package/dist/{self-improve-Dm9PvLF2.js → self-improve-e5hx2cCo.js} +3 -3
- package/dist/{self-improve-Dm9PvLF2.js.map → self-improve-e5hx2cCo.js.map} +1 -1
- package/dist/{skillopt-optimization-method-QZoNbg57.js → skillopt-optimization-method-Qx0HYCHY.js} +984 -907
- package/dist/skillopt-optimization-method-Qx0HYCHY.js.map +1 -0
- package/dist/{store-tool-spans-B9zc0I1r.d.ts → store-tool-spans-wH8y7InB.d.ts} +3 -3
- package/dist/{store-tool-spans-B9zc0I1r.d.ts.map → store-tool-spans-wH8y7InB.d.ts.map} +1 -1
- package/dist/{systemone-Co2Lv810.d.ts → systemone-CpW1U2Uy.d.ts} +6 -6
- package/dist/{systemone-Co2Lv810.d.ts.map → systemone-CpW1U2Uy.d.ts.map} +1 -1
- package/dist/{systemone-review-CRJ-Zdfo.d.ts → systemone-review-DpAXWDkL.d.ts} +3 -3
- package/dist/{systemone-review-CRJ-Zdfo.d.ts.map → systemone-review-DpAXWDkL.d.ts.map} +1 -1
- package/dist/systemone.d.ts +3 -3
- package/dist/{tool-groups-BHX9G_oE.d.ts → tool-groups-SlnoQNyT.d.ts} +2 -2
- package/dist/tool-groups-SlnoQNyT.d.ts.map +1 -0
- package/dist/{trace-questions-DfaIVysB.d.ts → trace-questions-ybyF0B6N.d.ts} +2 -2
- package/dist/{trace-questions-DfaIVysB.d.ts.map → trace-questions-ybyF0B6N.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/traces.d.ts +2 -2
- package/dist/{tree-DBvepwFt.js → tree-CK9h-xZF.js} +5 -4
- package/dist/tree-CK9h-xZF.js.map +1 -0
- package/dist/{types-CjrzKsOK.d.ts → types-B1W3v8dT.d.ts} +8 -8
- package/dist/{types-CjrzKsOK.d.ts.map → types-B1W3v8dT.d.ts.map} +1 -1
- package/dist/{types-CmHcpGl0.d.ts → types-BpIAnRCe.d.ts} +2 -2
- package/dist/{types-CmHcpGl0.d.ts.map → types-BpIAnRCe.d.ts.map} +1 -1
- package/dist/{types-Ci2r6el5.d.ts → types-DSU3qb_o.d.ts} +2 -2
- package/dist/{types-Ci2r6el5.d.ts.map → types-DSU3qb_o.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +1 -1
- package/docs/campaign-proposers.md +31 -0
- package/docs/public-api.md +5 -4
- package/docs/search-ledger.md +4 -3
- package/package.json +1 -1
- package/dist/campaign-DPB35MjP.js.map +0 -1
- package/dist/campaign-evidence-71uzJMVY.js.map +0 -1
- package/dist/external-optimizer-subprocess-CFIiwHSE.js.map +0 -1
- package/dist/run-improvement-loop-E4Uec3my.d.ts.map +0 -1
- package/dist/skillopt-optimization-method-QZoNbg57.js.map +0 -1
- package/dist/tool-groups-BHX9G_oE.d.ts.map +0 -1
- package/dist/tree-DBvepwFt.js.map +0 -1
package/dist/search/index.js
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import { a as hashCanonical } from "../canonical-DKgL_Wby.js";
|
|
2
2
|
import { a as MIN_OUTCOMES_FOR_WEIGHT, l as summarizeSamples, o as operatorYield, t as runSearch } from "../search-kernel-DezUrquk.js";
|
|
3
|
-
import { _ as vectorEmbedding, a as skillCalibration, b as editCreditText, c as META_SEARCH_SCORE_SOURCE, d as searchPolicyGenome, f as landscape, g as surfaceTextEdits, h as lineageEdits, i as nextUnitExtension, l as metaSearch, n as taskMatrix, o as skillManifold, p as draftOnPlateau, s as renderMetaSearchText, t as tree, u as metaSearchScore, v as front, y as editCredit } from "../tree-
|
|
3
|
+
import { _ as vectorEmbedding, a as skillCalibration, b as editCreditText, c as META_SEARCH_SCORE_SOURCE, d as searchPolicyGenome, f as landscape, g as surfaceTextEdits, h as lineageEdits, i as nextUnitExtension, l as metaSearch, n as taskMatrix, o as skillManifold, p as draftOnPlateau, s as renderMetaSearchText, t as tree, u as metaSearchScore, v as front, y as editCredit } from "../tree-CK9h-xZF.js";
|
|
4
4
|
// src/search/nested-search.ts
|
|
5
|
+
function validateResourceBudget(budget) {
|
|
6
|
+
for (const [name, value] of [
|
|
7
|
+
["maxCellAttempts", budget.maxCellAttempts],
|
|
8
|
+
["maxOperations", budget.maxOperations],
|
|
9
|
+
...budget.maxTokens === void 0 ? [] : [["maxTokens", budget.maxTokens]]
|
|
10
|
+
]) if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1) throw new Error(`runNestedSearch: resourceBudget.${name} must be a positive safe integer`);
|
|
11
|
+
}
|
|
12
|
+
/** The exact judge an outer ledger must name when all inner cells share fixed resources. */
|
|
13
|
+
function nestedSearchResourceJudge(budget) {
|
|
14
|
+
validateResourceBudget(budget);
|
|
15
|
+
return {
|
|
16
|
+
uri: "npm:@tangle-network/agent-eval/search#nestedSearchResourceJudge",
|
|
17
|
+
revision: hashCanonical({
|
|
18
|
+
claim: META_SEARCH_SCORE_SOURCE,
|
|
19
|
+
score: "verified held-out lift within complete recorded resource ceilings",
|
|
20
|
+
maxCellAttempts: budget.maxCellAttempts,
|
|
21
|
+
maxOperations: budget.maxOperations,
|
|
22
|
+
maxTokens: budget.maxTokens ?? null
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
}
|
|
5
26
|
/** The deterministic id of the inner search one outer cell attempt runs. */
|
|
6
27
|
function nestedSearchId(containment) {
|
|
7
28
|
const { searchId, cellId, attempt } = containment;
|
|
@@ -47,18 +68,20 @@ function searchConfigCodec() {
|
|
|
47
68
|
}
|
|
48
69
|
/**
|
|
49
70
|
* Run an outer search over search configurations to its close, or continue
|
|
50
|
-
* one from its ledger. The outer search must maximize
|
|
51
|
-
*
|
|
52
|
-
* `
|
|
71
|
+
* one from its ledger. The outer search must maximize, its nodes must be
|
|
72
|
+
* `runtime-config` artifacts, and its judge must be `META_SEARCH_SCORE_SOURCE`
|
|
73
|
+
* or `nestedSearchResourceJudge` of the supplied budget, respectively.
|
|
53
74
|
*/
|
|
54
75
|
async function runNestedSearch(options) {
|
|
55
76
|
const { recorder, lane, runInner, adoptInner } = options;
|
|
77
|
+
const resourceBudget = options.resourceBudget && Object.freeze({ ...options.resourceBudget });
|
|
78
|
+
const scoreSource = resourceBudget ? nestedSearchResourceJudge(resourceBudget) : META_SEARCH_SCORE_SOURCE;
|
|
56
79
|
const header = (await recorder.state()).header;
|
|
57
80
|
if (!header) throw new Error(`runNestedSearch: search ${recorder.searchId} has not been opened`);
|
|
58
|
-
if (header.objective.direction !== "maximize") throw new Error("runNestedSearch: an outer search scores held-out lift
|
|
81
|
+
if (header.objective.direction !== "maximize") throw new Error("runNestedSearch: an outer search scores held-out lift, so its objective must maximize");
|
|
59
82
|
if (header.artifactKind !== "runtime-config") throw new Error(`runNestedSearch: an outer search's nodes are configurations (runtime-config), not ${header.artifactKind}`);
|
|
60
83
|
const judge = header.objective.judge;
|
|
61
|
-
if (!("uri" in judge) || judge.uri !==
|
|
84
|
+
if (!("uri" in judge) || judge.uri !== scoreSource.uri || judge.revision !== scoreSource.revision) throw new Error(`runNestedSearch: an outer search's judge must be ${scoreSource.uri}@${scoreSource.revision}, which scores its cells`);
|
|
62
85
|
const input = (work) => {
|
|
63
86
|
const containment = {
|
|
64
87
|
searchId: work.searchId,
|
|
@@ -75,6 +98,7 @@ async function runNestedSearch(options) {
|
|
|
75
98
|
split: work.split,
|
|
76
99
|
rep: work.rep
|
|
77
100
|
},
|
|
101
|
+
...resourceBudget ? { resourceBudget } : {},
|
|
78
102
|
signal: work.signal
|
|
79
103
|
};
|
|
80
104
|
};
|
|
@@ -88,25 +112,25 @@ async function runNestedSearch(options) {
|
|
|
88
112
|
if (!adoptInner) return null;
|
|
89
113
|
const request = input(work);
|
|
90
114
|
const inner = await adoptInner(request);
|
|
91
|
-
return inner ? outerResult(recorder, request, inner, work.lane, null) : null;
|
|
115
|
+
return inner ? outerResult(recorder, request, inner, work.lane, null, resourceBudget) : null;
|
|
92
116
|
},
|
|
93
117
|
async run(work) {
|
|
94
118
|
const request = input(work);
|
|
95
119
|
const startedAt = Date.now();
|
|
96
120
|
const inner = await runInner(request);
|
|
97
|
-
return outerResult(recorder, request, inner, work.lane, Date.now() - startedAt);
|
|
121
|
+
return outerResult(recorder, request, inner, work.lane, Date.now() - startedAt, resourceBudget);
|
|
98
122
|
}
|
|
99
123
|
}
|
|
100
124
|
});
|
|
101
125
|
}
|
|
102
126
|
/** The outer cell's result from its closed inner search. */
|
|
103
|
-
function outerResult(recorder, request, inner, lane, wallMs) {
|
|
127
|
+
function outerResult(recorder, request, inner, lane, wallMs, resourceBudget) {
|
|
104
128
|
const header = inner.header;
|
|
105
129
|
const expected = request.containment;
|
|
106
130
|
const recorded = header?.containment ?? null;
|
|
107
131
|
if (!header || recorded === null || recorded.searchId !== expected.searchId || recorded.cellId !== expected.cellId || recorded.attempt !== expected.attempt) throw new Error(`runNestedSearch: inner search ${inner.searchId} does not record outer cell ${expected.cellId} attempt ${expected.attempt} of ${expected.searchId} as its containment`);
|
|
108
132
|
if (!inner.closed) throw new Error(`runNestedSearch: inner search ${inner.searchId} is open; runInner must return it closed`);
|
|
109
|
-
const score = metaSearchScore(inner);
|
|
133
|
+
const score = metaSearchScore(inner, { requireVerifiedClaim: resourceBudget !== void 0 });
|
|
110
134
|
const { spend, tokens } = inner.audit;
|
|
111
135
|
const metrics = {
|
|
112
136
|
knownUsd: spend.knownUsd,
|
|
@@ -118,25 +142,7 @@ function outerResult(recorder, request, inner, lane, wallMs) {
|
|
|
118
142
|
metrics.lift = score.lift;
|
|
119
143
|
metrics.testUnits = score.estimate.pairs;
|
|
120
144
|
}
|
|
121
|
-
const
|
|
122
|
-
const outcome = perUsd?.status === "known" ? {
|
|
123
|
-
status: "passed",
|
|
124
|
-
score: perUsd.value,
|
|
125
|
-
metrics
|
|
126
|
-
} : {
|
|
127
|
-
status: "errored",
|
|
128
|
-
metrics,
|
|
129
|
-
error: {
|
|
130
|
-
...score.status === "unscored" ? {
|
|
131
|
-
code: `inner-${score.reason}`,
|
|
132
|
-
message: score.detail
|
|
133
|
-
} : {
|
|
134
|
-
code: `inner-cost-${perUsd.status}`,
|
|
135
|
-
message: perUsd.reason
|
|
136
|
-
},
|
|
137
|
-
retryable: false
|
|
138
|
-
}
|
|
139
|
-
};
|
|
145
|
+
const outcome = nestedOutcome(score, inner, metrics, resourceBudget);
|
|
140
146
|
const unknownCost = spend.unknownCostCells + spend.unknownCostOperations;
|
|
141
147
|
const accounting = {
|
|
142
148
|
tokens: tokens.unknownTokenAttempts > 0 ? {
|
|
@@ -163,7 +169,8 @@ function outerResult(recorder, request, inner, lane, wallMs) {
|
|
|
163
169
|
searchId: inner.searchId,
|
|
164
170
|
containment: expected,
|
|
165
171
|
head: inner.head,
|
|
166
|
-
score
|
|
172
|
+
score,
|
|
173
|
+
...resourceBudget ? { resourceBudget } : {}
|
|
167
174
|
});
|
|
168
175
|
return {
|
|
169
176
|
outcome,
|
|
@@ -178,9 +185,44 @@ function outerResult(recorder, request, inner, lane, wallMs) {
|
|
|
178
185
|
artifacts: [nested]
|
|
179
186
|
};
|
|
180
187
|
}
|
|
188
|
+
function nestedOutcome(score, inner, metrics, budget) {
|
|
189
|
+
const unscored = (code, message) => ({
|
|
190
|
+
status: "errored",
|
|
191
|
+
metrics,
|
|
192
|
+
error: {
|
|
193
|
+
code,
|
|
194
|
+
message,
|
|
195
|
+
retryable: false
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
if (score.status === "unscored") return unscored(`inner-${score.reason}`, score.detail);
|
|
199
|
+
if (!budget) {
|
|
200
|
+
const perUsd = score.liftPerUsd;
|
|
201
|
+
return perUsd.status === "known" ? {
|
|
202
|
+
status: "passed",
|
|
203
|
+
score: perUsd.value,
|
|
204
|
+
metrics
|
|
205
|
+
} : unscored(`inner-cost-${perUsd.status}`, perUsd.reason);
|
|
206
|
+
}
|
|
207
|
+
const { attempts, operations, tokens } = inner.audit;
|
|
208
|
+
const knownTokens = tokens.inputTokens + tokens.outputTokens;
|
|
209
|
+
metrics.cellAttempts = attempts;
|
|
210
|
+
metrics.operations = operations.recorded;
|
|
211
|
+
if (tokens.unknownTokenAttempts === 0) metrics.tokens = knownTokens;
|
|
212
|
+
if (attempts > budget.maxCellAttempts || operations.recorded > budget.maxOperations) return unscored("inner-resource-budget-exceeded", "Inner search exceeded its attempt or operation cap");
|
|
213
|
+
if (budget.maxTokens !== void 0) {
|
|
214
|
+
if (knownTokens > budget.maxTokens) return unscored("inner-resource-budget-exceeded", "Inner search exceeded its token cap");
|
|
215
|
+
if (tokens.unknownTokenAttempts > 0) return unscored("inner-resource-unknown", "Inner search has unknown token usage against a token cap");
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
status: "passed",
|
|
219
|
+
score: score.lift,
|
|
220
|
+
metrics
|
|
221
|
+
};
|
|
222
|
+
}
|
|
181
223
|
function asRecord(value) {
|
|
182
224
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : { value };
|
|
183
225
|
}
|
|
184
|
-
export { META_SEARCH_SCORE_SOURCE, MIN_OUTCOMES_FOR_WEIGHT, draftOnPlateau, editCredit, editCreditText, front, landscape, lineageEdits, metaSearch, metaSearchScore, nestedSearchId, nextUnitExtension, operatorYield, renderMetaSearchText, runNestedSearch, searchConfigCodec, searchPolicyGenome, skillCalibration, skillManifold, summarizeSamples, surfaceTextEdits, taskMatrix, tree, vectorEmbedding };
|
|
226
|
+
export { META_SEARCH_SCORE_SOURCE, MIN_OUTCOMES_FOR_WEIGHT, draftOnPlateau, editCredit, editCreditText, front, landscape, lineageEdits, metaSearch, metaSearchScore, nestedSearchId, nestedSearchResourceJudge, nextUnitExtension, operatorYield, renderMetaSearchText, runNestedSearch, searchConfigCodec, searchPolicyGenome, skillCalibration, skillManifold, summarizeSamples, surfaceTextEdits, taskMatrix, tree, vectorEmbedding };
|
|
185
227
|
|
|
186
228
|
//# sourceMappingURL=index.js.map
|
package/dist/search/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/search/nested-search.ts"],"sourcesContent":["/**\n * An outer search whose cells are inner searches (search-tree-design §2.6 and\n * §12, `metaSearch`).\n *\n * `runNestedSearch` runs the one kernel, `runSearch`, over search\n * configurations. Each outer node is a configuration; each outer task names a\n * problem; each outer cell runs one inner search with its node's configuration\n * on its task's problem. The inner search records the cell attempt as its\n * `containment`, so its ledger names the outer execution it belongs to, and\n * the outer cell binds the inner search's head hash, which commits to its\n * whole chain.\n *\n * An outer cell scores `metaSearchScore` of its closed inner search: the held-\n * out lift the inner claim measured per known dollar, the `metaSearch` lens's\n * own score, so the outer climb optimizes exactly what the lens shows. An inner\n * search without such a score (open, no claim, `test-cannot-resolve`, a lift on\n * fewer than 2 test units, a claim its ledger contradicts) or with only a spend\n * floor settles its outer cell `errored`, not retryable, with the reason: the\n * score is unknown, not 0, and a node with such a cell cannot lead. The outer\n * cell costs what the inner search spent.\n *\n * The outer search keeps every rule of the kernel: its policy ranks\n * configurations on the selection problems, and with a test split it claims\n * once, on held-out problems, whether a configuration beats the root\n * configuration.\n */\n\nimport type {\n RunSearchOptions,\n SearchArtifactCodec,\n SearchCellResult,\n SearchCellWork,\n SearchLane,\n SearchRunResult,\n} from '../campaign/search-kernel'\nimport { runSearch } from '../campaign/search-kernel'\nimport type { SearchRecorder } from '../campaign/search-ledger-recording'\nimport type {\n SearchAttemptAccounting,\n SearchOpenedEvent,\n SearchSplit,\n SearchTaskOutcome,\n} from '../campaign/search-ledger-types'\nimport type { SearchStateView } from '../campaign/search-state'\nimport { hashCanonical } from '../ledger-core/canonical'\nimport { META_SEARCH_SCORE_SOURCE, metaSearchScore } from './lenses/meta-search'\n\n/** The outer cell attempt an inner search runs as. */\nexport type NestedSearchContainment = NonNullable<SearchOpenedEvent['containment']>\n\n/** One inner search to run: a configuration on one outer task. */\nexport interface NestedSearchRunInput<TConfig> {\n config: TConfig\n /** Record this as the inner search's `containment`. */\n containment: NestedSearchContainment\n /** The inner search's id, a digest of `containment`: rerunning the same\n * attempt opens the same ledger, so an inner search resumes rather than\n * starting again. */\n searchId: string\n task: { taskId: string; unitId: string; split: SearchSplit; rep: number }\n signal: AbortSignal\n}\n\nexport interface RunNestedSearchOptions<TConfig>\n extends Omit<RunSearchOptions<TConfig>, 'codec' | 'executor'> {\n /** How configurations are stored as nodes. Default `searchConfigCodec()`,\n * for plain JSON configurations. */\n codec?: SearchArtifactCodec<TConfig>\n /** How many inner searches run at once, and what one is expected to cost:\n * `cellUsd` is the admission rule's prior for one inner search. */\n lane: SearchLane\n /** Run the inner search for one outer cell attempt to its close, recording\n * `containment` in its header, and return its closed state. */\n runInner(input: NestedSearchRunInput<TConfig>): Promise<SearchStateView>\n /** The closed inner search of an attempt an earlier outer process started,\n * or null to run it through `runInner`. Default null. */\n adoptInner?(input: NestedSearchRunInput<TConfig>): Promise<SearchStateView | null>\n}\n\n/** The deterministic id of the inner search one outer cell attempt runs. */\nexport function nestedSearchId(containment: NestedSearchContainment): string {\n const { searchId, cellId, attempt } = containment\n return `nested_${hashCanonical({ searchId, cellId, attempt }).slice('sha256:'.length, 'sha256:'.length + 32)}`\n}\n\n/**\n * The codec for a plain JSON configuration: the node is the configuration's\n * canonical JSON, and the diff names each top-level key whose value changed.\n */\nexport function searchConfigCodec<TConfig>(): SearchArtifactCodec<TConfig> {\n return {\n node: (recorder, config) => {\n const artifact = recorder.blob('search-config', config)\n return {\n artifactDigest: hashCanonical(config),\n artifact,\n surfaces: [{ surfaceId: 'search-config', kind: 'runtime-config', artifact }],\n }\n },\n diff: (recorder, parent, child) => {\n const before = asRecord(parent)\n const after = asRecord(child)\n const keys = [...new Set([...Object.keys(before), ...Object.keys(after)])].sort()\n const changes = keys\n .filter((key) => hashCanonical(before[key] ?? null) !== hashCanonical(after[key] ?? null))\n .map((key) => ({ key, from: before[key] ?? null, to: after[key] ?? null }))\n return recorder.blob('diff', { kind: 'search-config-diff', changes })\n },\n load: (recorder, node) => recorder.readBlob(node.artifact) as TConfig,\n }\n}\n\n/**\n * Run an outer search over search configurations to its close, or continue\n * one from its ledger. The outer search must maximize (its score is lift per\n * dollar), its nodes must be `runtime-config` artifacts, and its judge must be\n * `META_SEARCH_SCORE_SOURCE`.\n */\nexport async function runNestedSearch<TConfig>(\n options: RunNestedSearchOptions<TConfig>,\n): Promise<SearchRunResult> {\n const { recorder, lane, runInner, adoptInner } = options\n const header = (await recorder.state()).header\n if (!header) throw new Error(`runNestedSearch: search ${recorder.searchId} has not been opened`)\n if (header.objective.direction !== 'maximize') {\n throw new Error(\n 'runNestedSearch: an outer search scores held-out lift per dollar, so its objective must maximize',\n )\n }\n if (header.artifactKind !== 'runtime-config') {\n throw new Error(\n `runNestedSearch: an outer search's nodes are configurations (runtime-config), not ${header.artifactKind}`,\n )\n }\n // The cells are scored by metaSearchScore, so the header must name it as the\n // judge: a ledger that declared another judge would misstate its own scores.\n const judge = header.objective.judge\n if (\n !('uri' in judge) ||\n judge.uri !== META_SEARCH_SCORE_SOURCE.uri ||\n judge.revision !== META_SEARCH_SCORE_SOURCE.revision\n ) {\n throw new Error(\n `runNestedSearch: an outer search's judge must be META_SEARCH_SCORE_SOURCE (${META_SEARCH_SCORE_SOURCE.uri}@${META_SEARCH_SCORE_SOURCE.revision}), which scores its cells`,\n )\n }\n const input = (work: SearchCellWork<TConfig>): NestedSearchRunInput<TConfig> => {\n const containment = { searchId: work.searchId, cellId: work.cellId, attempt: work.attempt }\n return {\n config: work.artifact,\n containment,\n searchId: nestedSearchId(containment),\n task: { taskId: work.taskId, unitId: work.unitId, split: work.split, rep: work.rep },\n signal: work.signal,\n }\n }\n return runSearch({\n ...options,\n codec: options.codec ?? searchConfigCodec<TConfig>(),\n executor: {\n lanes: () => [lane],\n place: () => lane.name,\n async adopt(work) {\n if (!adoptInner) return null\n const request = input(work)\n const inner = await adoptInner(request)\n return inner ? outerResult(recorder, request, inner, work.lane, null) : null\n },\n async run(work) {\n const request = input(work)\n const startedAt = Date.now()\n const inner = await runInner(request)\n return outerResult(recorder, request, inner, work.lane, Date.now() - startedAt)\n },\n },\n })\n}\n\n/** The outer cell's result from its closed inner search. */\nfunction outerResult<TConfig>(\n recorder: SearchRecorder,\n request: NestedSearchRunInput<TConfig>,\n inner: SearchStateView,\n lane: string,\n wallMs: number | null,\n): SearchCellResult {\n const header = inner.header\n const expected = request.containment\n const recorded = header?.containment ?? null\n if (\n !header ||\n recorded === null ||\n recorded.searchId !== expected.searchId ||\n recorded.cellId !== expected.cellId ||\n recorded.attempt !== expected.attempt\n ) {\n throw new Error(\n `runNestedSearch: inner search ${inner.searchId} does not record outer cell ${expected.cellId} attempt ${expected.attempt} of ${expected.searchId} as its containment`,\n )\n }\n if (!inner.closed) {\n throw new Error(\n `runNestedSearch: inner search ${inner.searchId} is open; runInner must return it closed`,\n )\n }\n const score = metaSearchScore(inner)\n const { spend, tokens } = inner.audit\n const metrics: Record<string, number> = {\n knownUsd: spend.knownUsd,\n floorUsd: spend.floorUsd,\n nodes: inner.audit.nodes,\n cells: inner.audit.cells.settled,\n }\n if (score.status === 'scored') {\n metrics.lift = score.lift\n metrics.testUnits = score.estimate.pairs\n }\n const perUsd = score.status === 'scored' ? score.liftPerUsd : null\n const outcome: SearchTaskOutcome =\n perUsd?.status === 'known'\n ? { status: 'passed', score: perUsd.value, metrics }\n : {\n status: 'errored',\n metrics,\n error: {\n ...(score.status === 'unscored'\n ? { code: `inner-${score.reason}`, message: score.detail }\n : { code: `inner-cost-${perUsd!.status}`, message: perUsd!.reason }),\n retryable: false,\n },\n }\n const unknownCost = spend.unknownCostCells + spend.unknownCostOperations\n const accounting: SearchAttemptAccounting = {\n tokens:\n tokens.unknownTokenAttempts > 0\n ? {\n status: 'unknown',\n reason: `${tokens.unknownTokenAttempts} attempt(s) of inner search ${inner.searchId} recorded no token usage`,\n }\n : {\n status: 'known',\n inputTokens: tokens.inputTokens,\n outputTokens: tokens.outputTokens,\n cachedTokens: tokens.cachedTokens,\n },\n // The sum of the inner search's recorded costs, each already priced by the\n // inner ledger's own accounting.\n cost:\n unknownCost > 0\n ? {\n status: 'unknown',\n knownLowerBoundUsd: spend.committedUsd,\n reason: `${unknownCost} cost(s) of inner search ${inner.searchId} are known only as a floor`,\n }\n : { status: 'known', usd: spend.knownUsd, source: 'pricing-table' },\n }\n const nested = recorder.blob('nested-search', {\n kind: 'nested-search',\n searchId: inner.searchId,\n containment: expected,\n head: inner.head,\n score,\n })\n return {\n outcome,\n accounting,\n identity: header.identity,\n wallMs,\n placement: { lane, boxId: null },\n traceRef: {\n unknown: `the cell ran inner search ${inner.searchId}; its ledger records the execution`,\n },\n artifacts: [nested],\n }\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : { value }\n}\n"],"mappings":";;;;;AAgFA,SAAgB,eAAe,aAA8C;CAC3E,MAAM,EAAE,UAAU,QAAQ,YAAY;CACtC,OAAO,UAAU,cAAc;EAAE;EAAU;EAAQ;CAAQ,CAAC,CAAC,CAAC,MAAM,GAAkB,EAAqB;AAC7G;;;;;AAMA,SAAgB,oBAA2D;CACzE,OAAO;EACL,OAAO,UAAU,WAAW;GAC1B,MAAM,WAAW,SAAS,KAAK,iBAAiB,MAAM;GACtD,OAAO;IACL,gBA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D,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IACrE,QACD,EAAE,MAAM;AACd"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/search/nested-search.ts"],"sourcesContent":["/**\n * An outer search whose cells are inner searches (search-tree-design §2.6 and\n * §12, `metaSearch`).\n *\n * `runNestedSearch` runs the one kernel, `runSearch`, over search\n * configurations. Each outer node is a configuration; each outer task names a\n * problem; each outer cell runs one inner search with its node's configuration\n * on its task's problem. The inner search records the cell attempt as its\n * `containment`, so its ledger names the outer execution it belongs to, and\n * the outer cell binds the inner search's head hash, which commits to its\n * whole chain.\n *\n * An outer cell scores `metaSearchScore` of its closed inner search: the held-\n * out lift the inner claim measured per known dollar by default. With a fixed\n * resource budget, it scores the lift itself after checking the inner ledger's\n * recorded resource use, including zero-incremental-cost searches. An inner\n * search without such a score (open, no claim, `test-cannot-resolve`, a lift on\n * fewer than 2 test units, a claim its ledger contradicts) or with only a spend\n * floor settles its outer cell `errored`, not retryable, with the reason: the\n * score is unknown, not 0, and a node with such a cell cannot lead. The outer\n * cell costs what the inner search spent.\n *\n * The outer search keeps every rule of the kernel: its policy ranks\n * configurations on the selection problems, and with a test split it claims\n * once, on held-out problems, whether a configuration beats the root\n * configuration.\n */\n\nimport type {\n RunSearchOptions,\n SearchArtifactCodec,\n SearchCellResult,\n SearchCellWork,\n SearchLane,\n SearchRunResult,\n} from '../campaign/search-kernel'\nimport { runSearch } from '../campaign/search-kernel'\nimport type { SearchRecorder } from '../campaign/search-ledger-recording'\nimport type {\n SearchAttemptAccounting,\n SearchOpenedEvent,\n SearchSourceRef,\n SearchSplit,\n SearchTaskOutcome,\n} from '../campaign/search-ledger-types'\nimport type { SearchStateView } from '../campaign/search-state'\nimport { hashCanonical } from '../ledger-core/canonical'\nimport {\n META_SEARCH_SCORE_SOURCE,\n type MetaSearchScore,\n metaSearchScore,\n} from './lenses/meta-search'\n\n/** The outer cell attempt an inner search runs as. */\nexport type NestedSearchContainment = NonNullable<SearchOpenedEvent['containment']>\n\n/** Shared ceilings for each inner search, including retries, proposals and assessment. */\nexport interface NestedSearchResourceBudget {\n readonly maxCellAttempts: number\n readonly maxOperations: number\n /** Sum of input and output tokens. Unknown usage cannot qualify under a token cap. */\n readonly maxTokens?: number\n}\n\n/** One inner search to run: a configuration on one outer task. */\nexport interface NestedSearchRunInput<TConfig> {\n config: TConfig\n /** Record this as the inner search's `containment`. */\n containment: NestedSearchContainment\n /** The inner search's id, a digest of `containment`: rerunning the same\n * attempt opens the same ledger, so an inner search resumes rather than\n * starting again. */\n searchId: string\n task: { taskId: string; unitId: string; split: SearchSplit; rep: number }\n /** Enforce this allowance while running the inner search, before any spend. */\n readonly resourceBudget?: NestedSearchResourceBudget\n signal: AbortSignal\n}\n\nexport interface RunNestedSearchOptions<TConfig>\n extends Omit<RunSearchOptions<TConfig>, 'codec' | 'executor'> {\n /** How configurations are stored as nodes. Default `searchConfigCodec()`,\n * for plain JSON configurations. */\n codec?: SearchArtifactCodec<TConfig>\n /** How many inner searches run at once, and what one is expected to cost:\n * `cellUsd` is the admission rule's prior for one inner search. */\n lane: SearchLane\n /** Compare held-out lift under these same ceilings. Default lift per known dollar. */\n resourceBudget?: NestedSearchResourceBudget\n /** Run the inner search for one outer cell attempt to its close, recording\n * `containment` in its header, and return its closed state. */\n runInner(input: NestedSearchRunInput<TConfig>): Promise<SearchStateView>\n /** The closed inner search of an attempt an earlier outer process started,\n * or null to run it through `runInner`. Default null. */\n adoptInner?(input: NestedSearchRunInput<TConfig>): Promise<SearchStateView | null>\n}\n\nfunction validateResourceBudget(budget: NestedSearchResourceBudget): void {\n for (const [name, value] of [\n ['maxCellAttempts', budget.maxCellAttempts],\n ['maxOperations', budget.maxOperations],\n ...(budget.maxTokens === undefined ? [] : [['maxTokens', budget.maxTokens]]),\n ] as const) {\n if (typeof value !== 'number' || !Number.isSafeInteger(value) || value < 1) {\n throw new Error(`runNestedSearch: resourceBudget.${name} must be a positive safe integer`)\n }\n }\n}\n\n/** The exact judge an outer ledger must name when all inner cells share fixed resources. */\nexport function nestedSearchResourceJudge(budget: NestedSearchResourceBudget): SearchSourceRef {\n validateResourceBudget(budget)\n return {\n uri: 'npm:@tangle-network/agent-eval/search#nestedSearchResourceJudge',\n revision: hashCanonical({\n claim: META_SEARCH_SCORE_SOURCE,\n score: 'verified held-out lift within complete recorded resource ceilings',\n maxCellAttempts: budget.maxCellAttempts,\n maxOperations: budget.maxOperations,\n maxTokens: budget.maxTokens ?? null,\n }),\n }\n}\n\n/** The deterministic id of the inner search one outer cell attempt runs. */\nexport function nestedSearchId(containment: NestedSearchContainment): string {\n const { searchId, cellId, attempt } = containment\n return `nested_${hashCanonical({ searchId, cellId, attempt }).slice('sha256:'.length, 'sha256:'.length + 32)}`\n}\n\n/**\n * The codec for a plain JSON configuration: the node is the configuration's\n * canonical JSON, and the diff names each top-level key whose value changed.\n */\nexport function searchConfigCodec<TConfig>(): SearchArtifactCodec<TConfig> {\n return {\n node: (recorder, config) => {\n const artifact = recorder.blob('search-config', config)\n return {\n artifactDigest: hashCanonical(config),\n artifact,\n surfaces: [{ surfaceId: 'search-config', kind: 'runtime-config', artifact }],\n }\n },\n diff: (recorder, parent, child) => {\n const before = asRecord(parent)\n const after = asRecord(child)\n const keys = [...new Set([...Object.keys(before), ...Object.keys(after)])].sort()\n const changes = keys\n .filter((key) => hashCanonical(before[key] ?? null) !== hashCanonical(after[key] ?? null))\n .map((key) => ({ key, from: before[key] ?? null, to: after[key] ?? null }))\n return recorder.blob('diff', { kind: 'search-config-diff', changes })\n },\n load: (recorder, node) => recorder.readBlob(node.artifact) as TConfig,\n }\n}\n\n/**\n * Run an outer search over search configurations to its close, or continue\n * one from its ledger. The outer search must maximize, its nodes must be\n * `runtime-config` artifacts, and its judge must be `META_SEARCH_SCORE_SOURCE`\n * or `nestedSearchResourceJudge` of the supplied budget, respectively.\n */\nexport async function runNestedSearch<TConfig>(\n options: RunNestedSearchOptions<TConfig>,\n): Promise<SearchRunResult> {\n const { recorder, lane, runInner, adoptInner } = options\n const resourceBudget = options.resourceBudget && Object.freeze({ ...options.resourceBudget })\n const scoreSource = resourceBudget\n ? nestedSearchResourceJudge(resourceBudget)\n : META_SEARCH_SCORE_SOURCE\n const header = (await recorder.state()).header\n if (!header) throw new Error(`runNestedSearch: search ${recorder.searchId} has not been opened`)\n if (header.objective.direction !== 'maximize') {\n throw new Error(\n 'runNestedSearch: an outer search scores held-out lift, so its objective must maximize',\n )\n }\n if (header.artifactKind !== 'runtime-config') {\n throw new Error(\n `runNestedSearch: an outer search's nodes are configurations (runtime-config), not ${header.artifactKind}`,\n )\n }\n // The header pins the score and any caps before the first inner search runs.\n const judge = header.objective.judge\n if (\n !('uri' in judge) ||\n judge.uri !== scoreSource.uri ||\n judge.revision !== scoreSource.revision\n ) {\n throw new Error(\n `runNestedSearch: an outer search's judge must be ${scoreSource.uri}@${scoreSource.revision}, which scores its cells`,\n )\n }\n const input = (work: SearchCellWork<TConfig>): NestedSearchRunInput<TConfig> => {\n const containment = { searchId: work.searchId, cellId: work.cellId, attempt: work.attempt }\n return {\n config: work.artifact,\n containment,\n searchId: nestedSearchId(containment),\n task: { taskId: work.taskId, unitId: work.unitId, split: work.split, rep: work.rep },\n ...(resourceBudget ? { resourceBudget } : {}),\n signal: work.signal,\n }\n }\n return runSearch({\n ...options,\n codec: options.codec ?? searchConfigCodec<TConfig>(),\n executor: {\n lanes: () => [lane],\n place: () => lane.name,\n async adopt(work) {\n if (!adoptInner) return null\n const request = input(work)\n const inner = await adoptInner(request)\n return inner ? outerResult(recorder, request, inner, work.lane, null, resourceBudget) : null\n },\n async run(work) {\n const request = input(work)\n const startedAt = Date.now()\n const inner = await runInner(request)\n return outerResult(\n recorder,\n request,\n inner,\n work.lane,\n Date.now() - startedAt,\n resourceBudget,\n )\n },\n },\n })\n}\n\n/** The outer cell's result from its closed inner search. */\nfunction outerResult<TConfig>(\n recorder: SearchRecorder,\n request: NestedSearchRunInput<TConfig>,\n inner: SearchStateView,\n lane: string,\n wallMs: number | null,\n resourceBudget: NestedSearchResourceBudget | undefined,\n): SearchCellResult {\n const header = inner.header\n const expected = request.containment\n const recorded = header?.containment ?? null\n if (\n !header ||\n recorded === null ||\n recorded.searchId !== expected.searchId ||\n recorded.cellId !== expected.cellId ||\n recorded.attempt !== expected.attempt\n ) {\n throw new Error(\n `runNestedSearch: inner search ${inner.searchId} does not record outer cell ${expected.cellId} attempt ${expected.attempt} of ${expected.searchId} as its containment`,\n )\n }\n if (!inner.closed) {\n throw new Error(\n `runNestedSearch: inner search ${inner.searchId} is open; runInner must return it closed`,\n )\n }\n const score = metaSearchScore(inner, { requireVerifiedClaim: resourceBudget !== undefined })\n const { spend, tokens } = inner.audit\n const metrics: Record<string, number> = {\n knownUsd: spend.knownUsd,\n floorUsd: spend.floorUsd,\n nodes: inner.audit.nodes,\n cells: inner.audit.cells.settled,\n }\n if (score.status === 'scored') {\n metrics.lift = score.lift\n metrics.testUnits = score.estimate.pairs\n }\n const outcome = nestedOutcome(score, inner, metrics, resourceBudget)\n const unknownCost = spend.unknownCostCells + spend.unknownCostOperations\n const accounting: SearchAttemptAccounting = {\n tokens:\n tokens.unknownTokenAttempts > 0\n ? {\n status: 'unknown',\n reason: `${tokens.unknownTokenAttempts} attempt(s) of inner search ${inner.searchId} recorded no token usage`,\n }\n : {\n status: 'known',\n inputTokens: tokens.inputTokens,\n outputTokens: tokens.outputTokens,\n cachedTokens: tokens.cachedTokens,\n },\n // The sum of the inner search's recorded costs, each already priced by the\n // inner ledger's own accounting.\n cost:\n unknownCost > 0\n ? {\n status: 'unknown',\n knownLowerBoundUsd: spend.committedUsd,\n reason: `${unknownCost} cost(s) of inner search ${inner.searchId} are known only as a floor`,\n }\n : { status: 'known', usd: spend.knownUsd, source: 'pricing-table' },\n }\n const nested = recorder.blob('nested-search', {\n kind: 'nested-search',\n searchId: inner.searchId,\n containment: expected,\n head: inner.head,\n score,\n ...(resourceBudget ? { resourceBudget } : {}),\n })\n return {\n outcome,\n accounting,\n identity: header.identity,\n wallMs,\n placement: { lane, boxId: null },\n traceRef: {\n unknown: `the cell ran inner search ${inner.searchId}; its ledger records the execution`,\n },\n artifacts: [nested],\n }\n}\n\nfunction nestedOutcome(\n score: MetaSearchScore,\n inner: SearchStateView,\n metrics: Record<string, number>,\n budget?: NestedSearchResourceBudget,\n): SearchTaskOutcome {\n const unscored = (code: string, message: string): SearchTaskOutcome => ({\n status: 'errored',\n metrics,\n error: { code, message, retryable: false },\n })\n if (score.status === 'unscored') return unscored(`inner-${score.reason}`, score.detail)\n if (!budget) {\n const perUsd = score.liftPerUsd\n return perUsd.status === 'known'\n ? { status: 'passed', score: perUsd.value, metrics }\n : unscored(`inner-cost-${perUsd.status}`, perUsd.reason)\n }\n const { attempts, operations, tokens } = inner.audit\n const knownTokens = tokens.inputTokens + tokens.outputTokens\n metrics.cellAttempts = attempts\n metrics.operations = operations.recorded\n if (tokens.unknownTokenAttempts === 0) metrics.tokens = knownTokens\n if (attempts > budget.maxCellAttempts || operations.recorded > budget.maxOperations) {\n return unscored(\n 'inner-resource-budget-exceeded',\n 'Inner search exceeded its attempt or operation cap',\n )\n }\n if (budget.maxTokens !== undefined) {\n if (knownTokens > budget.maxTokens) {\n return unscored('inner-resource-budget-exceeded', 'Inner search exceeded its token cap')\n }\n if (tokens.unknownTokenAttempts > 0) {\n return unscored(\n 'inner-resource-unknown',\n 'Inner search has unknown token usage against a token cap',\n )\n }\n }\n return { status: 'passed', score: score.lift, metrics }\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : { value }\n}\n"],"mappings":";;;;AAiGA,SAAS,uBAAuB,QAA0C;CACxE,KAAK,MAAM,CAAC,MAAM,UAAU;EAC1B,CAAC,mBAAmB,OAAO,eAAe;EAC1C,CAAC,iBAAiB,OAAO,aAAa;EACtC,GAAI,OAAO,cAAc,KAAA,I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,OAAO,SACL,kCACA,oDACF;CAEF,IAAI,OAAO,cAAc,KAAA,GAAW;EAClC,IAAI,cAAc,OAAO,WACvB,OAAO,SAAS,kCAAkC,qCAAqC;EAEzF,IAAI,OAAO,uBAAuB,GAChC,OAAO,SACL,0BACA,0DACF;CAEJ;CACA,OAAO;EAAE,QAAQ;EAAU,OAAO,MAAM;EAAM;CAAQ;AACxD;AAEA,SAAS,SAAS,OAAyC;CACzD,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IACrE,QACD,EAAE,MAAM;AACd"}
|
|
@@ -2,7 +2,7 @@ import { t as CostLedger } from "./cost-ledger-CSP-OfFe.js";
|
|
|
2
2
|
import { a as RunRecord } from "./run-record-kuOr3BCF.js";
|
|
3
3
|
import { A as SearchLedgerHash, C as SearchEdgeOperator, E as SearchExecutionIdentity, G as SearchSplit, H as SearchProposerKind, I as SearchNodeStatus, L as SearchOpenedEvent, N as SearchNodeDecision, O as SearchLedgerEntry, P as SearchNodeRef, Q as SearchTaskOutcome, R as SearchOperationKind, S as SearchEdgeAttribution, T as SearchEstimateMethod, U as SearchReservation, V as SearchProposer, W as SearchSourceRef, Y as SearchSurfaceEvidence, Z as SearchTask, _ as SearchClaimPower, a as SearchAttemptAccounting, i as SearchArtifactRef, it as EvaluationClaim, j as SearchModelIdentity, k as SearchLedgerEvent, l as SearchCandidateSurface, m as SearchClaim, nt as SearchTraceRef, o as SearchAudit, p as SearchCellStage, rt as SearchUnknown, t as NodeEstimate, y as SearchCloseReason, z as SearchOperationRecordedEvent } from "./search-ledger-types-DF-f031V.js";
|
|
4
4
|
import { C as LedgerTrustedHead, v as LedgerLineContext, w as LedgerTrustedHeadRemoval, x as LedgerTextStore } from "./index-qy6buL6y.js";
|
|
5
|
-
import { X as SearchStateView, dt as SearchUnitScore, j as MutableSurface, lt as SearchScoredCell, st as SearchNode } from "./types-
|
|
5
|
+
import { X as SearchStateView, dt as SearchUnitScore, j as MutableSurface, lt as SearchScoredCell, st as SearchNode } from "./types-BpIAnRCe.js";
|
|
6
6
|
import { a as PairedPromotionDecision } from "./paired-promotion-decision-DJlI4z_k.js";
|
|
7
7
|
/** One cell an allocator wants for a node. */
|
|
8
8
|
interface SearchCellPlan {
|
|
@@ -1177,4 +1177,4 @@ declare function searchDivergence(state: SearchStateView, nodeId: string): {
|
|
|
1177
1177
|
/** Run a search to its close, or continue one from its ledger. */
|
|
1178
1178
|
declare function runSearch<TArtifact>(options: RunSearchOptions<TArtifact>): Promise<SearchRunResult>;
|
|
1179
1179
|
export { SearchRecorderOptions as $, estimateNode as A, PlanSearchClaimInput as At, OperatorYieldRow as B, AshaOptions as Bt, crowdedFrontierParent as C, SearchLedger as Ct, NodePosterior as D, parseSearchLedgerLine as Dt, EstimateNodeCellsInput as E, openSearchLedger as Et, ExpansionOperator as F, decideSearchClaim as Ft, LensSignal as G, SearchUnitExtension as Gt, operatorYield as H, SearchAllocator as Ht, MIN_OUTCOMES_FOR_WEIGHT as I, planSearchClaim as It, RecordSearchEdgeInput as J, summarizeSamples as K, asha as Kt, OperatorOutcomeCounts as L, searchClaimDecision as Lt, searchCellSetDigest as M, SearchClaimDecision as Mt, searchEstimateMethod as N, SearchClaimPlan as Nt, SEARCH_ESTIMATOR as O, replaySearchLedgerText as Ot, searchPosterior as P, SearchClaimVerification as Pt, SearchRecorder as Q, OperatorYieldData as R, searchClaimReserveUsd as Rt, beam as S, OpenSearchLedgerOptions as St, incumbentWithOperatorBandit as T, SearchLedgerTrustedHeadMode as Tt, LensResult as U, SearchCellPlan as Ut, OperatorYieldSignal as V, SearchAllocationView as Vt, LensSampleSummary as W, SearchRungDecision as Wt, SearchLedgerBinding as X, RegisterSearchNodeInput as Y, SearchOpening as Z, SearchExpansion as _, CampaignStorage as _t, SearchArtifactCodec as a, surfaceNode as at, SearchPolicyView as b, inMemoryCampaignStorage as bt, SearchExecutor as c, SearchHistoryAuditSummary as ct, SearchProposalRequest as d, SearchHistoryPolicy as dt, SearchRunIdentity as et, SearchProposalResult as f, SearchHistoryReceipt as ft, AideOptions as g, verifySearchHistoryReceipt as gt, SearchRunResult as h, verifySearchHistoryArtifact as ht, RunSearchOptions as i, surfaceDiff as it, estimateNodeFromCells as j, SEARCH_CLAIM_RULE as jt, SearchPosterior as k, validateSearchLedgerEvent as kt, SearchLane as l, SearchHistoryCoverage as lt, SearchProposerPort as m, createSearchHistoryReceipt as mt, searchDivergence as n, developmentClaim as nt, SearchCellResult as o, CreateSearchHistoryReceiptInput as ot, SearchProposedChild as p, assertSearchHistoryMatchesState as pt, AllocateSearchCellInput as q, uniform as qt, searchPolicyView as r, searchEdgeId as rt, SearchCellWork as s, SearchHistoryAdmissionOptions as st, runSearch as t, SettleSearchCellInput as tt, SearchProposalBlob as u, SearchHistoryCoverageRow as ut, SearchPolicy as v, createRunCostLedger as vt, incumbent as w, SearchLedgerAppendResult as wt, aide as x, FileSearchLedger as xt, SearchPolicyNode as y, fsCampaignStorage as yt, OperatorYieldOptions as z, verifySearchClaim as zt };
|
|
1180
|
-
//# sourceMappingURL=search-kernel-
|
|
1180
|
+
//# sourceMappingURL=search-kernel-C2XOJHvk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-kernel-
|
|
1
|
+
{"version":3,"file":"search-kernel-C2XOJHvk.d.ts","names":[],"sources":["../src/campaign/allocation.ts","../src/campaign/search-claim.ts","../src/campaign/search-ledger.ts","../src/campaign/storage.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/search-kernel-contract.ts","../src/campaign/search-kernel-policy-view.ts","../src/campaign/search-kernel.ts"],"mappings":";;;;;;;UA0BiB;EACf;EACA,OAAO;EACP;EACA,OAAO;;;UAIQ;WACN,OAAO;;;EAGhB,KAAK;;;UAIU;EACf;EACA;IAAY;IAAoB;;IAAmB;;;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AU,mBAAmB;EAC7B,UAAU,eAAe;;;EAGzB,SAAS,UAAU;;EAEnB;;EAEA;;;;EAIA,SAAS;;;;EAIT,eAAe;IACb;IACA,OAAO;IACP,MAAM,SAAS;;IAEf,2BAA2B;IAC3B,gBAAgB;QACZ;;EAEN;;UAGe;;EAEf,OAAO;;;EAGP;EACA,QAAQ;;EAER,OAAO;;;;EAIP,mBAAmB;;;UAIJ;EACf;EACA,UAAU;EACV;EACA;IAAa;IAAc,UAAU;;EACrC,UAAU;IACR,MAAM;IACN,OAAO,MAAM,oBAAoB;IACjC;IACA;IACA,aAAa,SAAS;IACtB;;;;;;;;;;;iBC9OY,iBACd,OAAO,iBACP;EACE;EACA;EACA;EACA;IAED;;;;;;;;iBA4Fa,iBACd,OAAO,iBACP;EACG,OAAO;EAAc;;;iBCnEJ,UAAU,WAC9B,SAAS,iBAAiB,aACzB,QAAQ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { d as CostReceipt, l as CostLedgerSummary, o as CostLedgerHandle } from "./cost-ledger-CSP-OfFe.js";
|
|
2
|
-
import { v as ProposalFinding } from "./types-
|
|
2
|
+
import { v as ProposalFinding } from "./types-B1W3v8dT.js";
|
|
3
3
|
import { it as EvaluationClaim } from "./search-ledger-types-DF-f031V.js";
|
|
4
|
-
import {
|
|
5
|
-
import { H as SurfaceProposer, R as Scenario, S as JudgeConfig, _ as GateDecision, a as CampaignResult, d as DispatchContext, g as GateContribution, j as MutableSurface, k as LabeledScenarioStore, p as Gate } from "./types-
|
|
6
|
-
import { rt as PowerPreflight, s as EvidenceReceipt, t as CampaignEvidenceContext } from "./campaign-evidence-
|
|
7
|
-
import { _t as CampaignStorage, ft as SearchHistoryReceipt, st as SearchHistoryAdmissionOptions, ut as SearchHistoryCoverageRow } from "./search-kernel-
|
|
4
|
+
import { Gr as DescribeArtifact, Jr as ComparisonCost, Lr as OptimizationMethodProvenance, Pr as OptimizationMethod, Rr as OptimizationMethodResult, Ur as CampaignComparisonUnits, _a as FinalEvidenceUse, a as RunOptimizationOptions, aa as RunCampaignOptions, ea as openAutoPr, ga as FinalEvidencePolicy, i as PremeasuredOptimizationBaseline, ia as CampaignCellRetryPolicy, n as RunImprovementLoopResult, rt as LoopProvenanceRecord } from "./run-improvement-loop-B9m24xsg.js";
|
|
5
|
+
import { H as SurfaceProposer, R as Scenario, S as JudgeConfig, _ as GateDecision, a as CampaignResult, d as DispatchContext, g as GateContribution, j as MutableSurface, k as LabeledScenarioStore, p as Gate } from "./types-BpIAnRCe.js";
|
|
6
|
+
import { rt as PowerPreflight, s as EvidenceReceipt, t as CampaignEvidenceContext } from "./campaign-evidence-Biq06MQ9.js";
|
|
7
|
+
import { _t as CampaignStorage, ft as SearchHistoryReceipt, st as SearchHistoryAdmissionOptions, ut as SearchHistoryCoverageRow } from "./search-kernel-C2XOJHvk.js";
|
|
8
8
|
import { n as ModelTreatment, t as ModelComparison } from "./model-comparison-BHNL8Qrn.js";
|
|
9
9
|
import { n as HostedTenant } from "./client-B_9qUZi5.js";
|
|
10
10
|
import { o as InsightReport } from "./insight-report-DYofCMLx.js";
|
|
@@ -478,4 +478,4 @@ declare function selfImprove<TScenario extends Scenario, TArtifact>(opts: SelfIm
|
|
|
478
478
|
declare function selfImprove<TScenario extends Scenario, TArtifact>(opts: SelfImproveProposerOptions<TScenario, TArtifact>): Promise<SelfImproveProposerResult<TScenario, TArtifact>>;
|
|
479
479
|
declare function selfImprove<TScenario extends Scenario, TArtifact>(opts: SelfImproveOptions<TScenario, TArtifact>): Promise<SelfImproveResult<TScenario, TArtifact>>;
|
|
480
480
|
export { SelfImproveProposerOptions as a, SelfImproveRunError as c, SelfImproveMethodResult as d, SelfImproveProgressEvent as i, selfImprove as l, SelfImproveMethodOptions as n, SelfImproveProposerResult as o, SelfImproveOptions as r, SelfImproveResult as s, SelfImproveBudget as t, SelfImproveMethodProvenance as u };
|
|
481
|
-
//# sourceMappingURL=self-improve-
|
|
481
|
+
//# sourceMappingURL=self-improve-CcL0tRSr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"self-improve-
|
|
1
|
+
{"version":3,"file":"self-improve-CcL0tRSr.d.ts","names":["_$__0.GateContribution","_$__0.GateDecision","_$__0.ModelComparison","_$__0.FinalEvidenceUse"],"sources":["../src/campaign/presets/run-final-comparison.ts","../src/contract/self-improve-method.ts","../src/contract/self-improve.ts"],"mappings":";;;;;;;;;;UAmBU,uBAAuB,kBAAkB,UAAU,mBACnD,KAAK,mBAAmB,WAAW;EAC3C,iBAAiB;EACjB,eAAe;EACf,sBACE,SAAS,gBACT,UAAU,WACV,KAAK,WAAW,mBAAmB,WAAW,+BAC3C,QAAQ;EACb,MAAM,KAAK,WAAW;EACtB,QAAQ;EACR,gBAAgB;EAChB;EACA,iBAAiB;EACjB;EACA;EACA;EACA,cAAc,QAAQ,gBAAgB,UAAU,mBAAmB;;iBAqB/C,mBAAmB,kBAAkB,UAAU,WACnE,MAAM,uBAAuB,WAAW,aAAU;;I,mBAA5CA;;;;;;;;;;;;;;;;;;;;;;;;;UCnBS;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBAAoB,YAAY,0BAA0B;EAC1D,QAAQ;EACR;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA,sBAAsB;;EAExB,MAAM,QAAQ,kBAAkB;EAChC;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;;UAGe,wBAAwB,kBAAkB,UAAU,mBAC3D,KACN,0BAA0B,WAAW;EAWvC;IAAa,UAAU;IAAiB,QAAQ;;EAChD,uBAAuB;EACvB;;EAEA,UAAU,0BAA0B,WAAW;EAC/C,QAAQ,KAAK,0BAA0B,WAAW;IAChD;;EAEF,YAAY;EACZ,cAAc,YAAY,0BAA0B,WAAW;;EAE/D,MAAM;;EAEN,YAAY;EACZ,UAAU,0BAA0B,WAAW;EAC/C,KAAK,QAAQ,kBAAkB,mBAAmB,WAAW;IAC3D;IACA,iBAAiB,0BAA0B,WAAW;I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EACA,QAAQ;EACR,gBAAgB;;;;EAIhB;IACE;IACA,aAAa;;;;;EAKf;IACE;IACA,aAAa;IACb,SAAS;;;IAGT;;;;IAIA;;;;;;EAMF;;;EAGA;;;;EAIA,YAAY;;EAEZ;;;EAGA;;EAEA;;EAEA;;EAEA,MAAM;;;EAGN,UAAU;;;EAGV,gBAAgB;;EAEhB;IACE;IACA,MAAM;IACN;IACA,aAAa;;;;;;;;EAQf,SAAS;;;;EAIT,QAAQ;;;;;;EAMR,KAAK,yBAAyB,WAAW;;KAG/B,kBAAkB,kBAAkB,UAAU,aACtD,0BAA0B,WAAW,aACrC,wBAAwB,WAAW;KAE3B,yBAAyB,kBAAkB,UAAU,aAAa,KAC5E,mBAAmB,WAAW;EAG9B,QAAQ,mBAAmB,WAAW;EACtC;EACA,gBAAgB,QAAQ;;KAGd,2BAA2B,kBAAkB,UAAU,aAAa,KAC9E,mBAAmB,WAAW;EAG9B;EACA,gBAAgB,QAAQ;;;cAIb,4BAA4B;WAC9B,MAAM;WACN,UAAU;EAEP,YAAA,gBAAgB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmNtB,YAAY,kBAAkB,UAAU,WACtD,MAAM,yBAAyB,WAAW,aACzC,QAAQ,wBAAwB,WAAW;iBAC9B,YAAY,kBAAkB,UAAU,WACtD,MAAM,2BAA2B,WAAW,aAC3C,QAAQ,0BAA0B,WAAW;iBAChC,YAAY,kBAAkB,UAAU,WACtD,MAAM,mBAAmB,WAAW,aACnC,QAAQ,kBAAkB,WAAW"}
|
|
@@ -2,9 +2,9 @@ import { s as ValidationError } from "./errors-DeEEV9Vx.js";
|
|
|
2
2
|
import { i as modelHasSnapshot } from "./run-record-CqUft6Yf.js";
|
|
3
3
|
import { t as captureModelTreatment } from "./model-comparison-CgnVh4Ph.js";
|
|
4
4
|
import { t as analyzeRuns } from "./analyze-runs-xhH2Qxoc.js";
|
|
5
|
-
import { F as runFinalComparison, G as assertIndependentEvaluationSplit, I as openAutoPr, K as captureFinalEvidencePolicy, L as captureJudge, N as finalComparisonCampaigns, R as defaultProductionGate, X as reserveFinalEvidence, a as combineComparisonCosts, c as runImprovementLoop, et as resolveRunDir, it as withUncapturedAgentSpend, n as executeOptimizationMethod, o as costFromLedgerSummary, q as evaluationUnitMap, t as assertArtifactDescriptionSetOnce, tt as cellReceiptModels, x as assertSearchHistoryAdmissionOptions } from "./optimization-method-
|
|
5
|
+
import { F as runFinalComparison, G as assertIndependentEvaluationSplit, I as openAutoPr, K as captureFinalEvidencePolicy, L as captureJudge, N as finalComparisonCampaigns, R as defaultProductionGate, X as reserveFinalEvidence, a as combineComparisonCosts, c as runImprovementLoop, et as resolveRunDir, it as withUncapturedAgentSpend, n as executeOptimizationMethod, o as costFromLedgerSummary, q as evaluationUnitMap, t as assertArtifactDescriptionSetOnce, tt as cellReceiptModels, x as assertSearchHistoryAdmissionOptions } from "./optimization-method-4F1Npdy5.js";
|
|
6
6
|
import { n as campaignCellToRunRecord } from "./run-record-CuO8ErrI.js";
|
|
7
|
-
import {
|
|
7
|
+
import { F as campaignSplitDigest, S as powerPreflight, _ as pairedCampaignComposites, c as campaignMeasurementDigest, d as loopProvenanceArgsFromResult, l as canonicalDigest, t as createCampaignEvidenceReceipt, u as emitLoopProvenance } from "./campaign-evidence-tY94JzUe.js";
|
|
8
8
|
import { f as createRunCostLedger, m as inMemoryCampaignStorage, p as fsCampaignStorage } from "./finding-scope-BVQVcjz7.js";
|
|
9
9
|
import { l as surfaceHash, s as surfaceContentHash } from "./json-recovery-BRUCeQxo.js";
|
|
10
10
|
import { t as defineEvaluationClaim } from "./claim-BWEXwwBk.js";
|
|
@@ -716,4 +716,4 @@ async function runSelfImprove(opts, costLedger, startedAt, runDir, storage) {
|
|
|
716
716
|
}
|
|
717
717
|
export { selfImprove as n, SelfImproveRunError as t };
|
|
718
718
|
|
|
719
|
-
//# sourceMappingURL=self-improve-
|
|
719
|
+
//# sourceMappingURL=self-improve-e5hx2cCo.js.map
|