@tangle-network/agent-bench 0.4.8 → 0.4.9
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
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-bench",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Benchmark adapters and execution for agent-runtime across coding, tool-use, RAG, memory, browser, and terminal tasks.",
|
|
6
6
|
"repository": {
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tangle-network/agent-eval": "0.135.
|
|
28
|
+
"@tangle-network/agent-eval": "0.135.2",
|
|
29
29
|
"@tangle-network/agent-interface": "0.36.0",
|
|
30
|
-
"@tangle-network/agent-knowledge": "6.1.
|
|
30
|
+
"@tangle-network/agent-knowledge": "6.1.11",
|
|
31
31
|
"@tangle-network/sandbox": "0.15.2",
|
|
32
|
-
"@tangle-network/agent-runtime": "0.109.
|
|
32
|
+
"@tangle-network/agent-runtime": "0.109.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@arethetypeswrong/cli": "0.18.5",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { execFile } from 'node:child_process'
|
|
2
|
-
import { mkdtemp, mkdir, readFile, readdir, rm, writeFile } from 'node:fs/promises'
|
|
2
|
+
import { access, mkdtemp, mkdir, readFile, readdir, rm, writeFile } from 'node:fs/promises'
|
|
3
3
|
import { tmpdir } from 'node:os'
|
|
4
4
|
import path from 'node:path'
|
|
5
5
|
import { fileURLToPath } from 'node:url'
|
|
@@ -9,9 +9,10 @@ const execFileAsync = promisify(execFile)
|
|
|
9
9
|
const benchDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
|
|
10
10
|
const repoRoot = path.resolve(benchDir, '..')
|
|
11
11
|
const scratch = await mkdtemp(path.join(tmpdir(), 'agent-bench-consumer-'))
|
|
12
|
-
const args =
|
|
13
|
-
const useLocalRuntime = args
|
|
14
|
-
|
|
12
|
+
const args = process.argv.slice(2)
|
|
13
|
+
const useLocalRuntime = removeFlag(args, '--local-runtime')
|
|
14
|
+
const suppliedTarball = removeOption(args, '--tarball')
|
|
15
|
+
if (args.length > 0) throw new Error(`unknown arguments: ${args.join(', ')}`)
|
|
15
16
|
|
|
16
17
|
const TYPESCRIPT_5 = '5.9.3'
|
|
17
18
|
const TYPESCRIPT_6 = '6.0.3'
|
|
@@ -105,18 +106,24 @@ writeFileSync(
|
|
|
105
106
|
{ mode: 0o755 },
|
|
106
107
|
)
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
let tarball
|
|
110
|
+
if (suppliedTarball) {
|
|
111
|
+
tarball = path.resolve(suppliedTarball)
|
|
112
|
+
await access(tarball)
|
|
113
|
+
} else {
|
|
114
|
+
// Build explicitly so verification cannot inherit a machine-level
|
|
115
|
+
// ignore-scripts setting and accidentally pack stale or missing output.
|
|
116
|
+
await run('pnpm', ['build'], benchDir)
|
|
117
|
+
await run('pnpm', ['pack', '--pack-destination', packDir], benchDir, {
|
|
118
|
+
...process.env,
|
|
119
|
+
npm_config_ignore_scripts: 'true',
|
|
120
|
+
})
|
|
121
|
+
const packedFiles = (await readdir(packDir)).filter((name) => name.endsWith('.tgz'))
|
|
122
|
+
if (packedFiles.length !== 1) {
|
|
123
|
+
throw new Error(`expected one packed agent-bench tarball, found ${packedFiles.length}`)
|
|
124
|
+
}
|
|
125
|
+
tarball = path.join(packDir, packedFiles[0])
|
|
118
126
|
}
|
|
119
|
-
const tarball = path.join(packDir, packedFiles[0])
|
|
120
127
|
await run('tar', ['-xzf', tarball, '-C', unpackDir], benchDir)
|
|
121
128
|
const runtimePackage = await resolveRuntimePackage(runtimePackDir)
|
|
122
129
|
const packedManifest = JSON.parse(
|
|
@@ -300,3 +307,19 @@ function requiredPackedDevelopmentDependency(packageJson, name) {
|
|
|
300
307
|
}
|
|
301
308
|
return version
|
|
302
309
|
}
|
|
310
|
+
|
|
311
|
+
function removeFlag(args, flag) {
|
|
312
|
+
const index = args.indexOf(flag)
|
|
313
|
+
if (index === -1) return false
|
|
314
|
+
args.splice(index, 1)
|
|
315
|
+
return true
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function removeOption(args, option) {
|
|
319
|
+
const index = args.indexOf(option)
|
|
320
|
+
if (index === -1) return undefined
|
|
321
|
+
const value = args[index + 1]
|
|
322
|
+
if (!value || value.startsWith('--')) throw new Error(`${option} requires a value`)
|
|
323
|
+
args.splice(index, 2)
|
|
324
|
+
return value
|
|
325
|
+
}
|
|
@@ -10,8 +10,8 @@ test('collects required published Tangle dependencies from a packed manifest', (
|
|
|
10
10
|
const dependencies = collectRequiredTangleDependencies({
|
|
11
11
|
name: '@tangle-network/agent-bench',
|
|
12
12
|
dependencies: {
|
|
13
|
-
'@tangle-network/agent-runtime': '0.109.
|
|
14
|
-
'@tangle-network/agent-eval': '0.135.
|
|
13
|
+
'@tangle-network/agent-runtime': '0.109.2',
|
|
14
|
+
'@tangle-network/agent-eval': '0.135.2',
|
|
15
15
|
undici: '^7.0.0',
|
|
16
16
|
},
|
|
17
17
|
peerDependencies: {
|
|
@@ -27,9 +27,9 @@ test('collects required published Tangle dependencies from a packed manifest', (
|
|
|
27
27
|
})
|
|
28
28
|
|
|
29
29
|
assert.deepEqual(dependencies, [
|
|
30
|
-
{ name: '@tangle-network/agent-eval', spec: '0.135.
|
|
30
|
+
{ name: '@tangle-network/agent-eval', spec: '0.135.2' },
|
|
31
31
|
{ name: '@tangle-network/agent-interface', spec: '>=0.36.0 <0.37.0' },
|
|
32
|
-
{ name: '@tangle-network/agent-runtime', spec: '0.109.
|
|
32
|
+
{ name: '@tangle-network/agent-runtime', spec: '0.109.2' },
|
|
33
33
|
])
|
|
34
34
|
})
|
|
35
35
|
|