Feat v0.8.3 vector column (#70)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-sqlite (push) Successful in 2m59s
CI/CD / test-go-pg (push) Successful in 2m58s
CI/CD / build-and-deploy (push) Successful in 1m14s
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-sqlite (push) Successful in 2m59s
CI/CD / test-go-pg (push) Successful in 2m58s
CI/CD / build-and-deploy (push) Successful in 1m14s
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #70.
This commit is contained in:
34
CHANGELOG.md
34
CHANGELOG.md
@@ -2,6 +2,40 @@
|
||||
|
||||
All notable changes to Armature are documented here.
|
||||
|
||||
## v0.8.3 — Vector Column Type
|
||||
|
||||
Extensions can now declare vector columns and perform similarity search.
|
||||
Three-tier progressive enhancement: native pgvector on Postgres, JSONB
|
||||
fallback without pgvector, TEXT fallback on SQLite.
|
||||
|
||||
**Manifest: `db_tables` vector columns**
|
||||
|
||||
- Declare `"vector(N)"` as a column type (N = dimension, 1–4096).
|
||||
- On Postgres with pgvector: native `vector(N)` type with auto-created
|
||||
HNSW index (`vector_cosine_ops`).
|
||||
- On Postgres without pgvector: `JSONB` column.
|
||||
- On SQLite: `TEXT` column (JSON-encoded float arrays).
|
||||
|
||||
**Starlark API**
|
||||
|
||||
- `db.query_similar(table, column, vector=[], limit=10, filters={}, metric="cosine")`
|
||||
— returns rows ordered by ascending cosine distance with injected `_distance` key.
|
||||
- `db.insert()` now accepts list values (serialized as JSON strings) for
|
||||
vector column storage.
|
||||
|
||||
**Internal**
|
||||
|
||||
- Modified: `handlers/ext_db_schema.go` — `parseVectorDim`, `mapColType`
|
||||
gains `hasPgvector` parameter, HNSW index creation for vector columns.
|
||||
- Modified: `sandbox/db_module.go` — `HasPgvector` in `DBModuleConfig`,
|
||||
list support in `starlarkToGoValue`, `dbQuerySimilar` with pgvector and
|
||||
fallback paths, `cosineDistance` helper.
|
||||
- Modified: `sandbox/runner.go` — wire `HasPgvector` from capabilities.
|
||||
- Modified: `handlers/extensions.go` — `SetCapabilities` on `ExtensionHandler`.
|
||||
- Modified: `server/main.go` — wire capabilities to extension handler.
|
||||
- Updated: `docs/STARLARK-REFERENCE.md` — vector similarity section.
|
||||
- New tests: 5 schema tests + 8 db module tests (13 total).
|
||||
|
||||
## v0.8.2 — Capability Negotiation
|
||||
|
||||
Extensions declare environment requirements in their manifest. The kernel
|
||||
|
||||
Reference in New Issue
Block a user