Another cleanup pass

This commit is contained in:
2026-08-18 17:24:42 -04:00
parent 21a8b1e169
commit def93bd39a
14 changed files with 7243 additions and 7039 deletions
+2
View File
@@ -138,6 +138,8 @@ const preamble = {
'agent-web-fetch.js',
'agent-grok-port.js',
'agent-tools.js',
'agent-tool-definitions.js',
'agent-tool-dispatch.js',
'agent-markdown.js',
'agent-think-panel.js',
'agent-compact.js',
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -5,10 +5,16 @@ const STATE = readFileSync(
new URL('../lib/agent-state.js', import.meta.url),
'utf8'
)
const TOOLS = readFileSync(
new URL('../lib/agent-tools.js', import.meta.url),
'utf8'
)
const TOOLS =
readFileSync(new URL('../lib/agent-tools.js', import.meta.url), 'utf8') +
readFileSync(
new URL('../lib/agent-tool-definitions.js', import.meta.url),
'utf8'
) +
readFileSync(
new URL('../lib/agent-tool-dispatch.js', import.meta.url),
'utf8'
)
const OPENAI = readFileSync(
new URL('../lib/agent-openai.js', import.meta.url),
'utf8'
@@ -14,7 +14,18 @@ const PORT_SRC = readFileSync(
new URL('../lib/agent-grok-port.js', import.meta.url),
'utf8'
)
const TOOLS_SRC = readFileSync(new URL('../lib/agent-tools.js', import.meta.url), 'utf8')
const TOOLS_SRC =
readFileSync(new URL('../lib/agent-tools.js', import.meta.url), 'utf8') +
'\n' +
readFileSync(
new URL('../lib/agent-tool-definitions.js', import.meta.url),
'utf8'
) +
'\n' +
readFileSync(
new URL('../lib/agent-tool-dispatch.js', import.meta.url),
'utf8'
)
function loadPort() {
const sandbox = { TextDecoder, TextEncoder, Uint8Array, console }
@@ -2,10 +2,18 @@ import test from 'brittle'
import { readFileSync } from 'node:fs'
import vm from 'node:vm'
const CODE = readFileSync(
new URL('../lib/agent-tools.js', import.meta.url),
'utf8'
)
const CODE =
readFileSync(new URL('../lib/agent-tools.js', import.meta.url), 'utf8') +
'\n' +
readFileSync(
new URL('../lib/agent-tool-definitions.js', import.meta.url),
'utf8'
) +
'\n' +
readFileSync(
new URL('../lib/agent-tool-dispatch.js', import.meta.url),
'utf8'
)
function load(extra = {}) {
const sandbox = {