@vox-ai-app/indexing
Local file indexing, full-text search, and document parsing for Vox. Runs in a separate Electron utility process to keep the main process responsive.
Install
npm install @vox-ai-app/indexing
Peer dependency: electron >= 28
Requirements
VOX_USER_DATA_PATH — writable directory, database stored as knowledge-index.db
VOX_APP_PATH — app path, used to locate the parser worker
- Build config must emit two separate entry points (see Build section)
Usage
import {
bootIndexingRuntime,
shutdownIndexingRuntime,
addIndexFolder,
removeIndexFolder,
searchIndexedContextForTool,
getIndexingStatus,
setLogger,
setSentryCapture
} from '@vox-ai-app/indexing'
setLogger(logger)
setSentryCapture(captureException)
await bootIndexingRuntime()
await addIndexFolder('/Users/me/Documents')
const results = await searchIndexedContextForTool('query text', { limit: 5 })
await shutdownIndexingRuntime()
API
Runtime lifecycle
bootIndexingRuntime()
shutdownIndexingRuntime()
rebuildIndexing()
resetIndexingState()
Folder management
addIndexFolder(path)
removeIndexFolder(path)
getTrackedIndexFolders()
pickIndexFolder()
Query
searchIndexedContextForTool(query, opts)
listIndexedFilesForTool(path, opts)
readIndexedFileForTool(path)
getIndexedChildren(path)
getIndexingStatus()
IPC registration
For Electron apps that expose indexing over IPC:
import { registerIndexingIpc } from '@vox-ai-app/indexing/ipc'
registerIndexingIpc()
Process status subscription (advanced)
For apps that want push-based status updates from the utility process:
import { setOnStatusChange } from '@vox-ai-app/indexing/process'
setOnStatusChange((status) => {
console.log(status)
})
Supported file types
.pdf, .docx, .pptx, .xlsx, .odt, .odp, .ods, .rtf, and plain text files.
Build
Register two additional entry points in your Electron build config:
export default {
main: {
build: {
rollupOptions: {
input: {
index: 'src/main/index.js',
'indexing.process': 'node_modules/@vox-ai-app/indexing/src/process/process.js',
'indexing.parser.worker': 'node_modules/@vox-ai-app/indexing/src/parser/worker.js'
}
}
}
}
}
License
MIT