@vox-ai-app/vox-tools
v1.0.0
Published
Tool infrastructure, builtins, docs, and definitions for Vox
Readme
@vox-ai-app/vox-tools
Core tool infrastructure for Vox: exec utilities, schema validation, builtins (filesystem, shell, fetch), document builders (Word, PDF, PPTX), LLM tool definitions, and the tool registry.
Install
npm install @vox-ai-app/vox-toolsPeer dependency: electron >= 28
Exports
| Export | Contents |
| -------------------------------- | ------------------ |
| @vox-ai-app/vox-tools | All core exports |
| @vox-ai-app/vox-tools/exec | Exec utilities |
| @vox-ai-app/vox-tools/schema | Validation helpers |
| @vox-ai-app/vox-tools/network | URL safety checks |
| @vox-ai-app/vox-tools/registry | Tool registry |
Registry
The registry holds all registered tools (builtins + MCP) and dispatches run() calls.
import {
registerAll,
registerMcp,
unregisterMcp,
closeAllMcp,
getDeclarations,
run,
setOnChange,
setLogger
} from '@vox-ai-app/vox-tools/registry'
setLogger(logger)
setOnChange(() => {
/* tool list changed */
})
registerAll(tools)
const { client, tools } = await connectMcpServer(server)
registerMcp(server, client, tools)
const result = await run('read_file', { path: '~/notes.md' }, { signal })Document Builders
import { createWordDocument, createPdfDocument, createPresentationDocument } from '@vox-ai-app/vox-tools'
await createWordDocument({ path: '~/report.docx', content: '# Title\n\nBody text.' })
await createPdfDocument({ path: '~/report.pdf', content: '# Title\n\nBody text.' })
await createPresentationDocument({ path: '~/slides.pptx', slides: [...] })Exec Utilities
import {
execAsync,
execAbortable,
esc,
writeTempScript,
cleanupTemp
} from '@vox-ai-app/vox-tools/exec'
const { stdout } = await execAsync('ls -la', { timeout: 10_000 })
const { stdout } = await execAbortable('long-cmd', { timeout: 30_000 }, signal)License
MIT
