Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

## 7.2.1

### Changed

- Updated the required Eval peer and exact development pin to `0.144.11` so consumers install one current shared cohort.

## 7.2.0

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Supply application callbacks for those decisions, or use `@tangle-network/agent-
## Install

```bash
pnpm add @tangle-network/agent-knowledge@7.2.0 @tangle-network/agent-eval@0.144.10 @tangle-network/agent-interface@0.46.1
pnpm add @tangle-network/agent-knowledge@7.2.1 @tangle-network/agent-eval@0.144.11 @tangle-network/agent-interface@0.46.1
```

Requires Node.js 20.19 or later.
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tangle-network/agent-knowledge",
"version": "7.2.0",
"version": "7.2.1",
"description": "Build, search, evaluate, and improve source-backed knowledge bases.",
"homepage": "https://github.com/tangle-network/agent-knowledge#readme",
"repository": {
Expand Down Expand Up @@ -79,14 +79,14 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.144.10 <0.145.0",
"@tangle-network/agent-eval": ">=0.144.11 <0.145.0",
"@tangle-network/agent-interface": ">=0.46.1 <0.47.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.5",
"@biomejs/biome": "^2.5.5",
"@neo4j-labs/agent-memory": "0.4.1",
"@tangle-network/agent-eval": "0.144.10",
"@tangle-network/agent-eval": "0.144.11",
"@tangle-network/agent-interface": "0.46.1",
"@types/node": "^26.1.1",
"@types/proper-lockfile": "4.1.4",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions tests/official-optimizer-resume.contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function fakeOfficialOptimizerRunner(optimizer: 'gepa' | 'skillopt') {
'totalEvaluations: 0,',
'recipeKind: input.recipe.kind,',
'proposerCostAccounting: "unavailable",',
'candidatePopulation,',
]
: [
'bestCandidate: input.seedCandidate,',
Expand All @@ -183,6 +184,8 @@ function fakeOfficialOptimizerRunner(optimizer: 'gepa' | 'skillopt') {
]
const source = [
"const fs = require('node:fs')",
"const crypto = require('node:crypto')",
"const path = require('node:path')",
"const inputPath = process.argv[process.argv.indexOf('--input') + 1]",
"const outputPath = process.argv[process.argv.indexOf('--output') + 1]",
'const input = JSON.parse(fs.readFileSync(inputPath, "utf8"))',
Expand All @@ -191,6 +194,41 @@ function fakeOfficialOptimizerRunner(optimizer: 'gepa' | 'skillopt') {
' fs.writeFileSync(outputPath, JSON.stringify({ runtime }))',
' process.exit(0)',
'}',
...(optimizer === 'gepa'
? [
'const populationPath = path.join(input.outputDir, "candidate-population.json")',
'const scenarioIds = (input.selectionSet.length ? input.selectionSet : input.trainSet).map(({ id }) => id)',
'const populationContents = JSON.stringify({',
' schemaVersion: 1,',
' scope: "gepa-candidate-population",',
' runId: input.runId,',
' bestIndex: 0,',
' candidates: [{',
' index: 0,',
' candidate: input.seedCandidate,',
' parentIndices: [null],',
' aggregateScore: null,',
' selectionScores: [],',
' discoveryEvaluationCount: 0,',
' }],',
'})',
'fs.mkdirSync(input.outputDir, { recursive: true })',
'fs.writeFileSync(populationPath, populationContents)',
'const candidatePopulation = {',
' scope: "gepa-candidate-population",',
' path: populationPath,',
' sha256: "sha256:" + crypto.createHash("sha256").update(populationContents).digest("hex"),',
' bytes: Buffer.byteLength(populationContents),',
' runId: input.runId,',
' candidates: 1,',
' bestIndex: 0,',
' maxCandidates: input.maxPopulationCandidates,',
' maxCandidateChars: input.maxCandidateChars,',
' scenarioIds,',
' surfaceKind: typeof input.seedCandidate === "string" ? "text" : "components",',
'}',
]
: []),
'fs.writeFileSync(outputPath, JSON.stringify({',
...optimizeResult,
'upstream: runtime.optimizer,',
Expand Down