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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,27 +60,35 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,25 +128,34 @@ jobs:
- name: Verify packed package exports
run: pnpm run verify:package

- name: Check out exact Interface release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- name: Check out exact Eval release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- name: Check out exact Knowledge release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
63 changes: 51 additions & 12 deletions bench/src/swe-arena/run-supervisor.test.mts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,11 +3,25 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, describe, expect, it } from 'vitest'
import { runSupervisorShim, supervisorDriverKillGraceMs } from './arms.ts'
import { run, TIMEOUT_RC } from './proc.ts'
import { ABORT_RC, run } from './proc.ts'

const dirs: string[] = []
const workerPids: number[] = []

async function waitForFile(path: string, timeoutMs = 10_000): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
await access(path)
return
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error
}
await new Promise((resolve) => setTimeout(resolve, 10))
}
throw new Error(`timed out waiting for ${path}`)
}

afterAll(async () => {
for (const pid of workerPids) {
try {
Expand DownExpand Up@@ -122,6 +136,7 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
writeFileSync(join(ctx.cwd, 'outer-driver-ready.txt'), 'ready')
return text('spawned supervisor ' + id)
},
})
Expand All@@ -140,10 +155,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 1_500
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -154,9 +170,19 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'outer-driver-ready.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'outer-cancel-settled.txt'), 'utf8')).toBe('settled')
expect(JSON.parse(await readFile(join(workspace, '.loops', 'supervisor', 'sup-2-fake34', 'state.json'), 'utf8')))
.toMatchObject({ status: 'cancelled' })
Expand All@@ -170,10 +196,10 @@ export default function fakeExtension(pi) {
const extension = join(dir, 'fake-extension.mjs')
await mkdir(workspace)
await writeFile(params, '{}')
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); setInterval(()=>{},1000)`
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; const ready=process.argv[2]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); fs.writeFileSync(ready,'ready'); setInterval(()=>{},1000)`
await writeFile(extension, `
import { spawn } from 'node:child_process'
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const id = 'sup-3-signal56'
Expand All@@ -188,11 +214,13 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt')], {
const readyPath = join(ctx.cwd, 'signal-worker-ready.txt')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt'), readyPath], {
detached: true,
stdio: 'ignore',
})
writeFileSync(join(ctx.cwd, 'signal-worker.pid'), String(child.pid))
while (!existsSync(readyPath)) await new Promise((resolve) => setTimeout(resolve, 5))
writeFileSync(join(ctx.cwd, 'spawn-entered.txt'), 'entered')
await new Promise((resolve) => setTimeout(resolve, 30_000))
return text('spawned supervisor ' + id)
Expand All@@ -214,10 +242,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 2_000
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -228,11 +257,21 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'spawn-entered.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise
const workerPid = Number(await readFile(join(workspace, 'signal-worker.pid'), 'utf8'))
workerPids.push(workerPid)

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'spawn-entered.txt'), 'utf8')).toBe('entered')
expect(await readFile(join(workspace, 'signal-worker-cleaned.txt'), 'utf8')).toBe('clean')
expect(await readFile(join(workspace, 'signal-cancel-settled.txt'), 'utf8')).toBe('settled')
Expand Down
2 changes: 1 addition & 1 deletion docs/api/primitive-catalog.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Primitive catalog — the never-stale anti-reinvention inventory

> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.1` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.
> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.2` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.

## 1. agent-runtime — own public surface

Expand Down
2 changes: 1 addition & 1 deletion docs/canonical-api.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Run pnpm docs:freshness after editing this file. -->

> **Version 0.107.3.**
> [`docs/api/primitive-catalog.md`](./api/primitive-catalog.md) lists every export and import path.
> `agent-eval` must satisfy `>=0.133.1 <0.134.0`.
> `agent-eval` must satisfy `>=0.133.2 <0.134.0`.
> `sandbox` must satisfy `>=0.15.0 <0.16.0`.
> Portable profile and tool-part types come from `@tangle-network/agent-interface` `>=0.36.0 <0.37.0`.
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@
"license": "MIT",
"packageManager": "pnpm@11.17.0",
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.133.1 <0.134.0",
"@tangle-network/agent-eval": ">=0.133.2 <0.134.0",
"@tangle-network/agent-interface": ">=0.36.0 <0.37.0",
"@tangle-network/sandbox": ">=0.15.0 <0.16.0",
"playwright": "^1.40.0"
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@ allowBuilds:
catalog:
'@arethetypeswrong/cli': 0.18.5
'@types/node': 26.1.1
'@tangle-network/agent-eval': 0.133.1
'@tangle-network/agent-eval': 0.133.2
'@tangle-network/agent-interface': 0.36.0
'@tangle-network/agent-knowledge': 6.1.3
'@tangle-network/agent-knowledge': 6.1.4
'@tangle-network/agent-profile-materialize': 0.9.0
'@tangle-network/sandbox': 0.15.1
publint: 0.3.22
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
fix(release): pack exact Interface in package cohort by drewstone · Pull Request #635 · tangle-network/agent-runtime · GitHub
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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,27 +60,35 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,25 +128,34 @@ jobs:
- name: Verify packed package exports
run: pnpm run verify:package

- name: Check out exact Interface release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- name: Check out exact Eval release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- name: Check out exact Knowledge release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
63 changes: 51 additions & 12 deletions bench/src/swe-arena/run-supervisor.test.mts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,11 +3,25 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, describe, expect, it } from 'vitest'
import { runSupervisorShim, supervisorDriverKillGraceMs } from './arms.ts'
import { run, TIMEOUT_RC } from './proc.ts'
import { ABORT_RC, run } from './proc.ts'

const dirs: string[] = []
const workerPids: number[] = []

async function waitForFile(path: string, timeoutMs = 10_000): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
await access(path)
return
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error
}
await new Promise((resolve) => setTimeout(resolve, 10))
}
throw new Error(`timed out waiting for ${path}`)
}

afterAll(async () => {
for (const pid of workerPids) {
try {
Expand DownExpand Up@@ -122,6 +136,7 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
writeFileSync(join(ctx.cwd, 'outer-driver-ready.txt'), 'ready')
return text('spawned supervisor ' + id)
},
})
Expand All@@ -140,10 +155,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 1_500
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -154,9 +170,19 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'outer-driver-ready.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'outer-cancel-settled.txt'), 'utf8')).toBe('settled')
expect(JSON.parse(await readFile(join(workspace, '.loops', 'supervisor', 'sup-2-fake34', 'state.json'), 'utf8')))
.toMatchObject({ status: 'cancelled' })
Expand All@@ -170,10 +196,10 @@ export default function fakeExtension(pi) {
const extension = join(dir, 'fake-extension.mjs')
await mkdir(workspace)
await writeFile(params, '{}')
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); setInterval(()=>{},1000)`
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; const ready=process.argv[2]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); fs.writeFileSync(ready,'ready'); setInterval(()=>{},1000)`
await writeFile(extension, `
import { spawn } from 'node:child_process'
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const id = 'sup-3-signal56'
Expand All@@ -188,11 +214,13 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt')], {
const readyPath = join(ctx.cwd, 'signal-worker-ready.txt')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt'), readyPath], {
detached: true,
stdio: 'ignore',
})
writeFileSync(join(ctx.cwd, 'signal-worker.pid'), String(child.pid))
while (!existsSync(readyPath)) await new Promise((resolve) => setTimeout(resolve, 5))
writeFileSync(join(ctx.cwd, 'spawn-entered.txt'), 'entered')
await new Promise((resolve) => setTimeout(resolve, 30_000))
return text('spawned supervisor ' + id)
Expand All@@ -214,10 +242,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 2_000
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -228,11 +257,21 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'spawn-entered.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise
const workerPid = Number(await readFile(join(workspace, 'signal-worker.pid'), 'utf8'))
workerPids.push(workerPid)

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'spawn-entered.txt'), 'utf8')).toBe('entered')
expect(await readFile(join(workspace, 'signal-worker-cleaned.txt'), 'utf8')).toBe('clean')
expect(await readFile(join(workspace, 'signal-cancel-settled.txt'), 'utf8')).toBe('settled')
Expand Down
2 changes: 1 addition & 1 deletion docs/api/primitive-catalog.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Primitive catalog — the never-stale anti-reinvention inventory

> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.1` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.
> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.2` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.

## 1. agent-runtime — own public surface

Expand Down
2 changes: 1 addition & 1 deletion docs/canonical-api.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Run pnpm docs:freshness after editing this file. -->

> **Version 0.107.3.**
> [`docs/api/primitive-catalog.md`](./api/primitive-catalog.md) lists every export and import path.
> `agent-eval` must satisfy `>=0.133.1 <0.134.0`.
> `agent-eval` must satisfy `>=0.133.2 <0.134.0`.
> `sandbox` must satisfy `>=0.15.0 <0.16.0`.
> Portable profile and tool-part types come from `@tangle-network/agent-interface` `>=0.36.0 <0.37.0`.
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@
"license": "MIT",
"packageManager": "pnpm@11.17.0",
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.133.1 <0.134.0",
"@tangle-network/agent-eval": ">=0.133.2 <0.134.0",
"@tangle-network/agent-interface": ">=0.36.0 <0.37.0",
"@tangle-network/sandbox": ">=0.15.0 <0.16.0",
"playwright": "^1.40.0"
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@ allowBuilds:
catalog:
'@arethetypeswrong/cli': 0.18.5
'@types/node': 26.1.1
'@tangle-network/agent-eval': 0.133.1
'@tangle-network/agent-eval': 0.133.2
'@tangle-network/agent-interface': 0.36.0
'@tangle-network/agent-knowledge': 6.1.3
'@tangle-network/agent-knowledge': 6.1.4
'@tangle-network/agent-profile-materialize': 0.9.0
'@tangle-network/sandbox': 0.15.1
publint: 0.3.22
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(release): pack exact Interface in package cohort by drewstone · Pull Request #635 · tangle-network/agent-runtime · GitHub
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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,27 +60,35 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,25 +128,34 @@ jobs:
- name: Verify packed package exports
run: pnpm run verify:package

- name: Check out exact Interface release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- name: Check out exact Eval release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- name: Check out exact Knowledge release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
63 changes: 51 additions & 12 deletions bench/src/swe-arena/run-supervisor.test.mts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,11 +3,25 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, describe, expect, it } from 'vitest'
import { runSupervisorShim, supervisorDriverKillGraceMs } from './arms.ts'
import { run, TIMEOUT_RC } from './proc.ts'
import { ABORT_RC, run } from './proc.ts'

const dirs: string[] = []
const workerPids: number[] = []

async function waitForFile(path: string, timeoutMs = 10_000): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
await access(path)
return
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error
}
await new Promise((resolve) => setTimeout(resolve, 10))
}
throw new Error(`timed out waiting for ${path}`)
}

afterAll(async () => {
for (const pid of workerPids) {
try {
Expand DownExpand Up@@ -122,6 +136,7 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
writeFileSync(join(ctx.cwd, 'outer-driver-ready.txt'), 'ready')
return text('spawned supervisor ' + id)
},
})
Expand All@@ -140,10 +155,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 1_500
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -154,9 +170,19 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'outer-driver-ready.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'outer-cancel-settled.txt'), 'utf8')).toBe('settled')
expect(JSON.parse(await readFile(join(workspace, '.loops', 'supervisor', 'sup-2-fake34', 'state.json'), 'utf8')))
.toMatchObject({ status: 'cancelled' })
Expand All@@ -170,10 +196,10 @@ export default function fakeExtension(pi) {
const extension = join(dir, 'fake-extension.mjs')
await mkdir(workspace)
await writeFile(params, '{}')
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); setInterval(()=>{},1000)`
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; const ready=process.argv[2]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); fs.writeFileSync(ready,'ready'); setInterval(()=>{},1000)`
await writeFile(extension, `
import { spawn } from 'node:child_process'
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const id = 'sup-3-signal56'
Expand All@@ -188,11 +214,13 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt')], {
const readyPath = join(ctx.cwd, 'signal-worker-ready.txt')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt'), readyPath], {
detached: true,
stdio: 'ignore',
})
writeFileSync(join(ctx.cwd, 'signal-worker.pid'), String(child.pid))
while (!existsSync(readyPath)) await new Promise((resolve) => setTimeout(resolve, 5))
writeFileSync(join(ctx.cwd, 'spawn-entered.txt'), 'entered')
await new Promise((resolve) => setTimeout(resolve, 30_000))
return text('spawned supervisor ' + id)
Expand All@@ -214,10 +242,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 2_000
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -228,11 +257,21 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'spawn-entered.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise
const workerPid = Number(await readFile(join(workspace, 'signal-worker.pid'), 'utf8'))
workerPids.push(workerPid)

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'spawn-entered.txt'), 'utf8')).toBe('entered')
expect(await readFile(join(workspace, 'signal-worker-cleaned.txt'), 'utf8')).toBe('clean')
expect(await readFile(join(workspace, 'signal-cancel-settled.txt'), 'utf8')).toBe('settled')
Expand Down
2 changes: 1 addition & 1 deletion docs/api/primitive-catalog.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Primitive catalog — the never-stale anti-reinvention inventory

> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.1` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.
> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.2` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.

## 1. agent-runtime — own public surface

Expand Down
2 changes: 1 addition & 1 deletion docs/canonical-api.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Run pnpm docs:freshness after editing this file. -->

> **Version 0.107.3.**
> [`docs/api/primitive-catalog.md`](./api/primitive-catalog.md) lists every export and import path.
> `agent-eval` must satisfy `>=0.133.1 <0.134.0`.
> `agent-eval` must satisfy `>=0.133.2 <0.134.0`.
> `sandbox` must satisfy `>=0.15.0 <0.16.0`.
> Portable profile and tool-part types come from `@tangle-network/agent-interface` `>=0.36.0 <0.37.0`.
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@
"license": "MIT",
"packageManager": "pnpm@11.17.0",
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.133.1 <0.134.0",
"@tangle-network/agent-eval": ">=0.133.2 <0.134.0",
"@tangle-network/agent-interface": ">=0.36.0 <0.37.0",
"@tangle-network/sandbox": ">=0.15.0 <0.16.0",
"playwright": "^1.40.0"
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@ allowBuilds:
catalog:
'@arethetypeswrong/cli': 0.18.5
'@types/node': 26.1.1
'@tangle-network/agent-eval': 0.133.1
'@tangle-network/agent-eval': 0.133.2
'@tangle-network/agent-interface': 0.36.0
'@tangle-network/agent-knowledge': 6.1.3
'@tangle-network/agent-knowledge': 6.1.4
'@tangle-network/agent-profile-materialize': 0.9.0
'@tangle-network/sandbox': 0.15.1
publint: 0.3.22
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(release): pack exact Interface in package cohort by drewstone · Pull Request #635 · tangle-network/agent-runtime · GitHub
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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,27 +60,35 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,25 +128,34 @@ jobs:
- name: Verify packed package exports
run: pnpm run verify:package

- name: Check out exact Interface release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- name: Check out exact Eval release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- name: Check out exact Knowledge release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
63 changes: 51 additions & 12 deletions bench/src/swe-arena/run-supervisor.test.mts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,11 +3,25 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, describe, expect, it } from 'vitest'
import { runSupervisorShim, supervisorDriverKillGraceMs } from './arms.ts'
import { run, TIMEOUT_RC } from './proc.ts'
import { ABORT_RC, run } from './proc.ts'

const dirs: string[] = []
const workerPids: number[] = []

async function waitForFile(path: string, timeoutMs = 10_000): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
await access(path)
return
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error
}
await new Promise((resolve) => setTimeout(resolve, 10))
}
throw new Error(`timed out waiting for ${path}`)
}

afterAll(async () => {
for (const pid of workerPids) {
try {
Expand DownExpand Up@@ -122,6 +136,7 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
writeFileSync(join(ctx.cwd, 'outer-driver-ready.txt'), 'ready')
return text('spawned supervisor ' + id)
},
})
Expand All@@ -140,10 +155,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 1_500
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -154,9 +170,19 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'outer-driver-ready.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'outer-cancel-settled.txt'), 'utf8')).toBe('settled')
expect(JSON.parse(await readFile(join(workspace, '.loops', 'supervisor', 'sup-2-fake34', 'state.json'), 'utf8')))
.toMatchObject({ status: 'cancelled' })
Expand All@@ -170,10 +196,10 @@ export default function fakeExtension(pi) {
const extension = join(dir, 'fake-extension.mjs')
await mkdir(workspace)
await writeFile(params, '{}')
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); setInterval(()=>{},1000)`
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; const ready=process.argv[2]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); fs.writeFileSync(ready,'ready'); setInterval(()=>{},1000)`
await writeFile(extension, `
import { spawn } from 'node:child_process'
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const id = 'sup-3-signal56'
Expand All@@ -188,11 +214,13 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt')], {
const readyPath = join(ctx.cwd, 'signal-worker-ready.txt')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt'), readyPath], {
detached: true,
stdio: 'ignore',
})
writeFileSync(join(ctx.cwd, 'signal-worker.pid'), String(child.pid))
while (!existsSync(readyPath)) await new Promise((resolve) => setTimeout(resolve, 5))
writeFileSync(join(ctx.cwd, 'spawn-entered.txt'), 'entered')
await new Promise((resolve) => setTimeout(resolve, 30_000))
return text('spawned supervisor ' + id)
Expand All@@ -214,10 +242,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 2_000
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -228,11 +257,21 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'spawn-entered.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise
const workerPid = Number(await readFile(join(workspace, 'signal-worker.pid'), 'utf8'))
workerPids.push(workerPid)

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'spawn-entered.txt'), 'utf8')).toBe('entered')
expect(await readFile(join(workspace, 'signal-worker-cleaned.txt'), 'utf8')).toBe('clean')
expect(await readFile(join(workspace, 'signal-cancel-settled.txt'), 'utf8')).toBe('settled')
Expand Down
2 changes: 1 addition & 1 deletion docs/api/primitive-catalog.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Primitive catalog — the never-stale anti-reinvention inventory

> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.1` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.
> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.2` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.

## 1. agent-runtime — own public surface

Expand Down
2 changes: 1 addition & 1 deletion docs/canonical-api.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Run pnpm docs:freshness after editing this file. -->

> **Version 0.107.3.**
> [`docs/api/primitive-catalog.md`](./api/primitive-catalog.md) lists every export and import path.
> `agent-eval` must satisfy `>=0.133.1 <0.134.0`.
> `agent-eval` must satisfy `>=0.133.2 <0.134.0`.
> `sandbox` must satisfy `>=0.15.0 <0.16.0`.
> Portable profile and tool-part types come from `@tangle-network/agent-interface` `>=0.36.0 <0.37.0`.
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@
"license": "MIT",
"packageManager": "pnpm@11.17.0",
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.133.1 <0.134.0",
"@tangle-network/agent-eval": ">=0.133.2 <0.134.0",
"@tangle-network/agent-interface": ">=0.36.0 <0.37.0",
"@tangle-network/sandbox": ">=0.15.0 <0.16.0",
"playwright": "^1.40.0"
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@ allowBuilds:
catalog:
'@arethetypeswrong/cli': 0.18.5
'@types/node': 26.1.1
'@tangle-network/agent-eval': 0.133.1
'@tangle-network/agent-eval': 0.133.2
'@tangle-network/agent-interface': 0.36.0
'@tangle-network/agent-knowledge': 6.1.3
'@tangle-network/agent-knowledge': 6.1.4
'@tangle-network/agent-profile-materialize': 0.9.0
'@tangle-network/sandbox': 0.15.1
publint: 0.3.22
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' fix(release): pack exact Interface in package cohort by drewstone · Pull Request #635 · tangle-network/agent-runtime · GitHub
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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,27 +60,35 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,25 +128,34 @@ jobs:
- name: Verify packed package exports
run: pnpm run verify:package

- name: Check out exact Interface release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- name: Check out exact Eval release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- name: Check out exact Knowledge release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
63 changes: 51 additions & 12 deletions bench/src/swe-arena/run-supervisor.test.mts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,11 +3,25 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, describe, expect, it } from 'vitest'
import { runSupervisorShim, supervisorDriverKillGraceMs } from './arms.ts'
import { run, TIMEOUT_RC } from './proc.ts'
import { ABORT_RC, run } from './proc.ts'

const dirs: string[] = []
const workerPids: number[] = []

async function waitForFile(path: string, timeoutMs = 10_000): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
await access(path)
return
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error
}
await new Promise((resolve) => setTimeout(resolve, 10))
}
throw new Error(`timed out waiting for ${path}`)
}

afterAll(async () => {
for (const pid of workerPids) {
try {
Expand DownExpand Up@@ -122,6 +136,7 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
writeFileSync(join(ctx.cwd, 'outer-driver-ready.txt'), 'ready')
return text('spawned supervisor ' + id)
},
})
Expand All@@ -140,10 +155,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 1_500
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -154,9 +170,19 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'outer-driver-ready.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'outer-cancel-settled.txt'), 'utf8')).toBe('settled')
expect(JSON.parse(await readFile(join(workspace, '.loops', 'supervisor', 'sup-2-fake34', 'state.json'), 'utf8')))
.toMatchObject({ status: 'cancelled' })
Expand All@@ -170,10 +196,10 @@ export default function fakeExtension(pi) {
const extension = join(dir, 'fake-extension.mjs')
await mkdir(workspace)
await writeFile(params, '{}')
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); setInterval(()=>{},1000)`
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; const ready=process.argv[2]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); fs.writeFileSync(ready,'ready'); setInterval(()=>{},1000)`
await writeFile(extension, `
import { spawn } from 'node:child_process'
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const id = 'sup-3-signal56'
Expand All@@ -188,11 +214,13 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt')], {
const readyPath = join(ctx.cwd, 'signal-worker-ready.txt')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt'), readyPath], {
detached: true,
stdio: 'ignore',
})
writeFileSync(join(ctx.cwd, 'signal-worker.pid'), String(child.pid))
while (!existsSync(readyPath)) await new Promise((resolve) => setTimeout(resolve, 5))
writeFileSync(join(ctx.cwd, 'spawn-entered.txt'), 'entered')
await new Promise((resolve) => setTimeout(resolve, 30_000))
return text('spawned supervisor ' + id)
Expand All@@ -214,10 +242,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 2_000
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -228,11 +257,21 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'spawn-entered.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise
const workerPid = Number(await readFile(join(workspace, 'signal-worker.pid'), 'utf8'))
workerPids.push(workerPid)

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'spawn-entered.txt'), 'utf8')).toBe('entered')
expect(await readFile(join(workspace, 'signal-worker-cleaned.txt'), 'utf8')).toBe('clean')
expect(await readFile(join(workspace, 'signal-cancel-settled.txt'), 'utf8')).toBe('settled')
Expand Down
2 changes: 1 addition & 1 deletion docs/api/primitive-catalog.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Primitive catalog — the never-stale anti-reinvention inventory

> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.1` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.
> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.2` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.

## 1. agent-runtime — own public surface

Expand Down
2 changes: 1 addition & 1 deletion docs/canonical-api.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Run pnpm docs:freshness after editing this file. -->

> **Version 0.107.3.**
> [`docs/api/primitive-catalog.md`](./api/primitive-catalog.md) lists every export and import path.
> `agent-eval` must satisfy `>=0.133.1 <0.134.0`.
> `agent-eval` must satisfy `>=0.133.2 <0.134.0`.
> `sandbox` must satisfy `>=0.15.0 <0.16.0`.
> Portable profile and tool-part types come from `@tangle-network/agent-interface` `>=0.36.0 <0.37.0`.
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@
"license": "MIT",
"packageManager": "pnpm@11.17.0",
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.133.1 <0.134.0",
"@tangle-network/agent-eval": ">=0.133.2 <0.134.0",
"@tangle-network/agent-interface": ">=0.36.0 <0.37.0",
"@tangle-network/sandbox": ">=0.15.0 <0.16.0",
"playwright": "^1.40.0"
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@ allowBuilds:
catalog:
'@arethetypeswrong/cli': 0.18.5
'@types/node': 26.1.1
'@tangle-network/agent-eval': 0.133.1
'@tangle-network/agent-eval': 0.133.2
'@tangle-network/agent-interface': 0.36.0
'@tangle-network/agent-knowledge': 6.1.3
'@tangle-network/agent-knowledge': 6.1.4
'@tangle-network/agent-profile-materialize': 0.9.0
'@tangle-network/sandbox': 0.15.1
publint: 0.3.22
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(release): pack exact Interface in package cohort by drewstone · Pull Request #635 · tangle-network/agent-runtime · GitHub
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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,27 +60,35 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,25 +128,34 @@ jobs:
- name: Verify packed package exports
run: pnpm run verify:package

- name: Check out exact Interface release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- name: Check out exact Eval release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- name: Check out exact Knowledge release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
63 changes: 51 additions & 12 deletions bench/src/swe-arena/run-supervisor.test.mts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,11 +3,25 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, describe, expect, it } from 'vitest'
import { runSupervisorShim, supervisorDriverKillGraceMs } from './arms.ts'
import { run, TIMEOUT_RC } from './proc.ts'
import { ABORT_RC, run } from './proc.ts'

const dirs: string[] = []
const workerPids: number[] = []

async function waitForFile(path: string, timeoutMs = 10_000): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
await access(path)
return
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error
}
await new Promise((resolve) => setTimeout(resolve, 10))
}
throw new Error(`timed out waiting for ${path}`)
}

afterAll(async () => {
for (const pid of workerPids) {
try {
Expand DownExpand Up@@ -122,6 +136,7 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
writeFileSync(join(ctx.cwd, 'outer-driver-ready.txt'), 'ready')
return text('spawned supervisor ' + id)
},
})
Expand All@@ -140,10 +155,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 1_500
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -154,9 +170,19 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'outer-driver-ready.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'outer-cancel-settled.txt'), 'utf8')).toBe('settled')
expect(JSON.parse(await readFile(join(workspace, '.loops', 'supervisor', 'sup-2-fake34', 'state.json'), 'utf8')))
.toMatchObject({ status: 'cancelled' })
Expand All@@ -170,10 +196,10 @@ export default function fakeExtension(pi) {
const extension = join(dir, 'fake-extension.mjs')
await mkdir(workspace)
await writeFile(params, '{}')
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); setInterval(()=>{},1000)`
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; const ready=process.argv[2]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); fs.writeFileSync(ready,'ready'); setInterval(()=>{},1000)`
await writeFile(extension, `
import { spawn } from 'node:child_process'
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const id = 'sup-3-signal56'
Expand All@@ -188,11 +214,13 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt')], {
const readyPath = join(ctx.cwd, 'signal-worker-ready.txt')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt'), readyPath], {
detached: true,
stdio: 'ignore',
})
writeFileSync(join(ctx.cwd, 'signal-worker.pid'), String(child.pid))
while (!existsSync(readyPath)) await new Promise((resolve) => setTimeout(resolve, 5))
writeFileSync(join(ctx.cwd, 'spawn-entered.txt'), 'entered')
await new Promise((resolve) => setTimeout(resolve, 30_000))
return text('spawned supervisor ' + id)
Expand All@@ -214,10 +242,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 2_000
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -228,11 +257,21 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'spawn-entered.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise
const workerPid = Number(await readFile(join(workspace, 'signal-worker.pid'), 'utf8'))
workerPids.push(workerPid)

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'spawn-entered.txt'), 'utf8')).toBe('entered')
expect(await readFile(join(workspace, 'signal-worker-cleaned.txt'), 'utf8')).toBe('clean')
expect(await readFile(join(workspace, 'signal-cancel-settled.txt'), 'utf8')).toBe('settled')
Expand Down
2 changes: 1 addition & 1 deletion docs/api/primitive-catalog.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Primitive catalog — the never-stale anti-reinvention inventory

> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.1` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.
> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.2` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.

## 1. agent-runtime — own public surface

Expand Down
2 changes: 1 addition & 1 deletion docs/canonical-api.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Run pnpm docs:freshness after editing this file. -->

> **Version 0.107.3.**
> [`docs/api/primitive-catalog.md`](./api/primitive-catalog.md) lists every export and import path.
> `agent-eval` must satisfy `>=0.133.1 <0.134.0`.
> `agent-eval` must satisfy `>=0.133.2 <0.134.0`.
> `sandbox` must satisfy `>=0.15.0 <0.16.0`.
> Portable profile and tool-part types come from `@tangle-network/agent-interface` `>=0.36.0 <0.37.0`.
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@
"license": "MIT",
"packageManager": "pnpm@11.17.0",
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.133.1 <0.134.0",
"@tangle-network/agent-eval": ">=0.133.2 <0.134.0",
"@tangle-network/agent-interface": ">=0.36.0 <0.37.0",
"@tangle-network/sandbox": ">=0.15.0 <0.16.0",
"playwright": "^1.40.0"
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@ allowBuilds:
catalog:
'@arethetypeswrong/cli': 0.18.5
'@types/node': 26.1.1
'@tangle-network/agent-eval': 0.133.1
'@tangle-network/agent-eval': 0.133.2
'@tangle-network/agent-interface': 0.36.0
'@tangle-network/agent-knowledge': 6.1.3
'@tangle-network/agent-knowledge': 6.1.4
'@tangle-network/agent-profile-materialize': 0.9.0
'@tangle-network/sandbox': 0.15.1
publint: 0.3.22
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(release): pack exact Interface in package cohort by drewstone · Pull Request #635 · tangle-network/agent-runtime · GitHub
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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,27 +60,35 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,25 +128,34 @@ jobs:
- name: Verify packed package exports
run: pnpm run verify:package

- name: Check out exact Interface release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- name: Check out exact Eval release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- name: Check out exact Knowledge release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
63 changes: 51 additions & 12 deletions bench/src/swe-arena/run-supervisor.test.mts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,11 +3,25 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, describe, expect, it } from 'vitest'
import { runSupervisorShim, supervisorDriverKillGraceMs } from './arms.ts'
import { run, TIMEOUT_RC } from './proc.ts'
import { ABORT_RC, run } from './proc.ts'

const dirs: string[] = []
const workerPids: number[] = []

async function waitForFile(path: string, timeoutMs = 10_000): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
await access(path)
return
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error
}
await new Promise((resolve) => setTimeout(resolve, 10))
}
throw new Error(`timed out waiting for ${path}`)
}

afterAll(async () => {
for (const pid of workerPids) {
try {
Expand DownExpand Up@@ -122,6 +136,7 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
writeFileSync(join(ctx.cwd, 'outer-driver-ready.txt'), 'ready')
return text('spawned supervisor ' + id)
},
})
Expand All@@ -140,10 +155,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 1_500
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -154,9 +170,19 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'outer-driver-ready.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'outer-cancel-settled.txt'), 'utf8')).toBe('settled')
expect(JSON.parse(await readFile(join(workspace, '.loops', 'supervisor', 'sup-2-fake34', 'state.json'), 'utf8')))
.toMatchObject({ status: 'cancelled' })
Expand All@@ -170,10 +196,10 @@ export default function fakeExtension(pi) {
const extension = join(dir, 'fake-extension.mjs')
await mkdir(workspace)
await writeFile(params, '{}')
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); setInterval(()=>{},1000)`
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; const ready=process.argv[2]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); fs.writeFileSync(ready,'ready'); setInterval(()=>{},1000)`
await writeFile(extension, `
import { spawn } from 'node:child_process'
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const id = 'sup-3-signal56'
Expand All@@ -188,11 +214,13 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt')], {
const readyPath = join(ctx.cwd, 'signal-worker-ready.txt')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt'), readyPath], {
detached: true,
stdio: 'ignore',
})
writeFileSync(join(ctx.cwd, 'signal-worker.pid'), String(child.pid))
while (!existsSync(readyPath)) await new Promise((resolve) => setTimeout(resolve, 5))
writeFileSync(join(ctx.cwd, 'spawn-entered.txt'), 'entered')
await new Promise((resolve) => setTimeout(resolve, 30_000))
return text('spawned supervisor ' + id)
Expand All@@ -214,10 +242,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 2_000
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -228,11 +257,21 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'spawn-entered.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise
const workerPid = Number(await readFile(join(workspace, 'signal-worker.pid'), 'utf8'))
workerPids.push(workerPid)

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'spawn-entered.txt'), 'utf8')).toBe('entered')
expect(await readFile(join(workspace, 'signal-worker-cleaned.txt'), 'utf8')).toBe('clean')
expect(await readFile(join(workspace, 'signal-cancel-settled.txt'), 'utf8')).toBe('settled')
Expand Down
2 changes: 1 addition & 1 deletion docs/api/primitive-catalog.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Primitive catalog — the never-stale anti-reinvention inventory

> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.1` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.
> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.2` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.

## 1. agent-runtime — own public surface

Expand Down
2 changes: 1 addition & 1 deletion docs/canonical-api.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Run pnpm docs:freshness after editing this file. -->

> **Version 0.107.3.**
> [`docs/api/primitive-catalog.md`](./api/primitive-catalog.md) lists every export and import path.
> `agent-eval` must satisfy `>=0.133.1 <0.134.0`.
> `agent-eval` must satisfy `>=0.133.2 <0.134.0`.
> `sandbox` must satisfy `>=0.15.0 <0.16.0`.
> Portable profile and tool-part types come from `@tangle-network/agent-interface` `>=0.36.0 <0.37.0`.
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@
"license": "MIT",
"packageManager": "pnpm@11.17.0",
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.133.1 <0.134.0",
"@tangle-network/agent-eval": ">=0.133.2 <0.134.0",
"@tangle-network/agent-interface": ">=0.36.0 <0.37.0",
"@tangle-network/sandbox": ">=0.15.0 <0.16.0",
"playwright": "^1.40.0"
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@ allowBuilds:
catalog:
'@arethetypeswrong/cli': 0.18.5
'@types/node': 26.1.1
'@tangle-network/agent-eval': 0.133.1
'@tangle-network/agent-eval': 0.133.2
'@tangle-network/agent-interface': 0.36.0
'@tangle-network/agent-knowledge': 6.1.3
'@tangle-network/agent-knowledge': 6.1.4
'@tangle-network/agent-profile-materialize': 0.9.0
'@tangle-network/sandbox': 0.15.1
publint: 0.3.22
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); fix(release): pack exact Interface in package cohort by drewstone · Pull Request #635 · tangle-network/agent-runtime · GitHub
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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,27 +60,35 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -128,25 +128,34 @@ jobs:
- name: Verify packed package exports
run: pnpm run verify:package

- name: Check out exact Interface release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-sdk
ref: 149259a78bfa187e0b10ce840a03d25dd722e064 # @tangle-network/agent-interface@0.36.0
path: .cohort/agent-sdk
persist-credentials: false

- name: Check out exact Eval release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-eval
ref: 98a0126cd1e337b35e69cdb83836a59a14a712df # v0.133.1
ref: fd3560c77541f7c5ccf2fb7cd5102adbc2ba5540 # v0.133.2
path: .cohort/agent-eval
persist-credentials: false

- name: Check out exact Knowledge release
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: tangle-network/agent-knowledge
ref: fa32fcfb91536721832c13182ea8972e8d3524e9 # v6.1.3
ref: a85cbb356290ff566b1af1f4138310d0c2e2169e # v6.1.4
path: .cohort/agent-knowledge
persist-credentials: false

- name: Verify exact Eval, Knowledge, and Runtime archives together
- name: Verify exact Interface, Eval, Knowledge, and Runtime archives together
run: >-
node scripts/verify-packed-cohort.mjs
--agent-interface-repo .cohort/agent-sdk
--agent-eval-repo .cohort/agent-eval
--agent-knowledge-repo .cohort/agent-knowledge

Expand Down
63 changes: 51 additions & 12 deletions bench/src/swe-arena/run-supervisor.test.mts
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,11 +3,25 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, describe, expect, it } from 'vitest'
import { runSupervisorShim, supervisorDriverKillGraceMs } from './arms.ts'
import { run, TIMEOUT_RC } from './proc.ts'
import { ABORT_RC, run } from './proc.ts'

const dirs: string[] = []
const workerPids: number[] = []

async function waitForFile(path: string, timeoutMs = 10_000): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
await access(path)
return
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error
}
await new Promise((resolve) => setTimeout(resolve, 10))
}
throw new Error(`timed out waiting for ${path}`)
}

afterAll(async () => {
for (const pid of workerPids) {
try {
Expand DownExpand Up@@ -122,6 +136,7 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
writeFileSync(join(ctx.cwd, 'outer-driver-ready.txt'), 'ready')
return text('spawned supervisor ' + id)
},
})
Expand All@@ -140,10 +155,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 1_500
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -154,9 +170,19 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'outer-driver-ready.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'outer-cancel-settled.txt'), 'utf8')).toBe('settled')
expect(JSON.parse(await readFile(join(workspace, '.loops', 'supervisor', 'sup-2-fake34', 'state.json'), 'utf8')))
.toMatchObject({ status: 'cancelled' })
Expand All@@ -170,10 +196,10 @@ export default function fakeExtension(pi) {
const extension = join(dir, 'fake-extension.mjs')
await mkdir(workspace)
await writeFile(params, '{}')
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); setInterval(()=>{},1000)`
const workerScript = `const fs=require('node:fs'); const marker=process.argv[1]; const ready=process.argv[2]; process.on('SIGTERM',()=>setTimeout(()=>{fs.writeFileSync(marker,'clean'); process.exit(0)},30)); fs.writeFileSync(ready,'ready'); setInterval(()=>{},1000)`
await writeFile(extension, `
import { spawn } from 'node:child_process'
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const id = 'sup-3-signal56'
Expand All@@ -188,11 +214,13 @@ export default function fakeExtension(pi) {
writeFileSync(join(runDir, 'state.json'), JSON.stringify({ status: 'running' }))
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id, label: 'root' }) + '\\n')
appendFileSync(join(runDir, 'journal.jsonl'), JSON.stringify({ kind: 'spawned', id: id + ':s1', parent: id, label: 'w-0' }) + '\\n')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt')], {
const readyPath = join(ctx.cwd, 'signal-worker-ready.txt')
child = spawn(process.execPath, ['-e', ${JSON.stringify(workerScript)}, join(ctx.cwd, 'signal-worker-cleaned.txt'), readyPath], {
detached: true,
stdio: 'ignore',
})
writeFileSync(join(ctx.cwd, 'signal-worker.pid'), String(child.pid))
while (!existsSync(readyPath)) await new Promise((resolve) => setTimeout(resolve, 5))
writeFileSync(join(ctx.cwd, 'spawn-entered.txt'), 'entered')
await new Promise((resolve) => setTimeout(resolve, 30_000))
return text('spawned supervisor ' + id)
Expand All@@ -214,10 +242,11 @@ export default function fakeExtension(pi) {
`)

const cancelTimeoutMs = 2_000
const result = await run(process.execPath, [
const controller = new AbortController()
const resultPromise = run(process.execPath, [
'--import', 'tsx', runSupervisorShim, extension, workspace, params,
], {
timeoutMs: 1_000,
signal: controller.signal,
killGraceMs: supervisorDriverKillGraceMs({
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
}),
Expand All@@ -228,11 +257,21 @@ export default function fakeExtension(pi) {
DRIVER_CANCEL_TIMEOUT_MS: String(cancelTimeoutMs),
},
})
try {
await waitForFile(join(workspace, 'spawn-entered.txt'))
} catch (error) {
controller.abort()
await resultPromise
throw error
}
controller.abort()
const result = await resultPromise
const workerPid = Number(await readFile(join(workspace, 'signal-worker.pid'), 'utf8'))
workerPids.push(workerPid)

expect(result.code, result.stdout + result.stderr).toBe(TIMEOUT_RC)
expect(result.timedOut).toBe(true)
expect(result.code, result.stdout + result.stderr).toBe(ABORT_RC)
expect(result.aborted).toBe(true)
expect(result.timedOut).toBe(false)
expect(await readFile(join(workspace, 'spawn-entered.txt'), 'utf8')).toBe('entered')
expect(await readFile(join(workspace, 'signal-worker-cleaned.txt'), 'utf8')).toBe('clean')
expect(await readFile(join(workspace, 'signal-cancel-settled.txt'), 'utf8')).toBe('settled')
Expand Down
2 changes: 1 addition & 1 deletion docs/api/primitive-catalog.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Primitive catalog — the never-stale anti-reinvention inventory

> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.1` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.
> **GENERATED** from `@tangle-network/agent-runtime@0.107.3` and `@tangle-network/agent-eval@0.133.2` by `scripts/gen-primitive-catalog.mjs`. Do NOT hand-edit — run `pnpm run docs:api`. This is the mechanical companion to the JUDGMENT in `canonical-api.md` (§2 decision table + §1.5 AgentProfile law): that doc says WHICH primitive to reach for and what NOT to build; this catalog proves WHAT exists. Per-symbol signatures + `file:line` live in the per-module pages under `docs/api/`.

## 1. agent-runtime — own public surface

Expand Down
2 changes: 1 addition & 1 deletion docs/canonical-api.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Run pnpm docs:freshness after editing this file. -->

> **Version 0.107.3.**
> [`docs/api/primitive-catalog.md`](./api/primitive-catalog.md) lists every export and import path.
> `agent-eval` must satisfy `>=0.133.1 <0.134.0`.
> `agent-eval` must satisfy `>=0.133.2 <0.134.0`.
> `sandbox` must satisfy `>=0.15.0 <0.16.0`.
> Portable profile and tool-part types come from `@tangle-network/agent-interface` `>=0.36.0 <0.37.0`.
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@
"license": "MIT",
"packageManager": "pnpm@11.17.0",
"peerDependencies": {
"@tangle-network/agent-eval": ">=0.133.1 <0.134.0",
"@tangle-network/agent-eval": ">=0.133.2 <0.134.0",
"@tangle-network/agent-interface": ">=0.36.0 <0.37.0",
"@tangle-network/sandbox": ">=0.15.0 <0.16.0",
"playwright": "^1.40.0"
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@ allowBuilds:
catalog:
'@arethetypeswrong/cli': 0.18.5
'@types/node': 26.1.1
'@tangle-network/agent-eval': 0.133.1
'@tangle-network/agent-eval': 0.133.2
'@tangle-network/agent-interface': 0.36.0
'@tangle-network/agent-knowledge': 6.1.3
'@tangle-network/agent-knowledge': 6.1.4
'@tangle-network/agent-profile-materialize': 0.9.0
'@tangle-network/sandbox': 0.15.1
publint: 0.3.22
Expand Down
Loading