Skip to content

feat: deploy script should auto-detect sqlite-vec extension path #30

@quanyeomans

Description

@quanyeomans

Problem

SQLITE_VEC_PATH must be set in service.env for vector search to work. The deploy script does not set this variable — the operator must find the .so file manually and add it.

On the current VM, it lives at:

/data/tools/qmd/node_modules/.pnpm/sqlite-vec-linux-x64@0.1.7-alpha.2/node_modules/sqlite-vec-linux-x64/vec0.so

This path is not documented anywhere in the repo and is discovered only through trial and error.

Proposed Fix

Add auto-detection logic to the deploy script (or a post-install check in kairix onboard check):

# Common probe locations in priority order
PROBE_PATHS=(
    "/usr/local/lib/vec0.so"
    "/usr/lib/sqlite-vec/vec0.so"
    /data/tools/qmd/node_modules/.pnpm/sqlite-vec-linux-x64@*/node_modules/sqlite-vec-linux-x64/vec0.so
    /opt/*/vec0.so
)

for path in "${PROBE_PATHS[@]}"; do
    expanded=$(echo $path)  # glob expansion
    if [[ -f "$expanded" ]]; then
        echo "SQLITE_VEC_PATH=$expanded" >> /opt/kairix/service.env
        break
    fi
done

If not found, emit a clear warning:

WARNING: sqlite-vec extension not found. Vector search will be unavailable.
Install sqlite-vec and set SQLITE_VEC_PATH=/path/to/vec0.so in /opt/kairix/service.env

Acceptance Criteria

  • Deploy script sets SQLITE_VEC_PATH automatically when the extension can be found
  • If not found, deploy script prints actionable install instructions
  • kairix onboard check vector search check reports the probed path when diagnosing failures

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions