latticesql 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +58 -12
- package/dist/cli.js +6445 -2006
- package/dist/index.cjs +1870 -537
- package/dist/index.d.cts +521 -5
- package/dist/index.d.ts +521 -5
- package/dist/index.js +1815 -525
- package/package.json +2 -1
package/LICENSE
CHANGED
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
|
|
168
168
|
END OF TERMS AND CONDITIONS
|
|
169
169
|
|
|
170
|
-
Copyright 2026 M-Flat Inc
|
|
170
|
+
Copyright 2026 Automated Industries (M-Flat Inc)
|
|
171
171
|
|
|
172
172
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
173
173
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -19,10 +19,13 @@ Every AI agent session starts cold — no memory of what happened yesterday, wha
|
|
|
19
19
|
3. **Ingests** agent-written output back into the DB via the writeback pipeline
|
|
20
20
|
4. **Manages** state with full CRUD, natural-key operations, seeding, and soft-delete
|
|
21
21
|
5. **Optimizes** context with token budgets, relevance filtering, enrichment pipelines, and reward-scored memory
|
|
22
|
-
6. **Searches** semantically
|
|
22
|
+
6. **Searches** full-text (FTS5 / `tsvector`, with a LIKE fallback) and semantically (bring-your-own embeddings + cosine similarity)
|
|
23
|
+
7. **Organizes** everything into `.lattice` workspaces with a local browser GUI, a workspace dashboard, changelog/version history, and a SQL↔markdown context bridge that auto-renders on every write
|
|
23
24
|
|
|
24
25
|
Lattice has no opinions about your schema, your agents, or your file format. You define the tables. You control the rendering. Lattice runs the sync loop.
|
|
25
26
|
|
|
27
|
+
**New in 1.16:** the `.lattice` workspace model + auto-render, full-text search, sources/references, a workspace dashboard, a **multiplayer cloud-editing** experience (live share/de-share, "last edited by", change-flash + counts, and an offline edit queue that replays on reconnect), and a much richer **Data Model editor** in the GUI — a force-directed schema graph, bidirectional many-to-many links, and a soft-delete model where every schema change (create/rename/delete a table, column, or link) is tracked in version history and **reversible** (deletes never destroy data; revert restores it), with session-scoped undo/redo. All with no AI dependency. See [docs/workspaces.md](docs/workspaces.md) and [docs/collaboration.md](docs/collaboration.md). The AI assistant, chat, and ingest summarization are exclusive to the 2.0 line (2.0 = the 1.16 feature set plus that AI layer).
|
|
28
|
+
|
|
26
29
|
---
|
|
27
30
|
|
|
28
31
|
## Table of contents
|
|
@@ -2075,6 +2078,52 @@ npx lattice gui
|
|
|
2075
2078
|
npx lattice gui --config ./lattice.config.yml --output ./context --port 4317
|
|
2076
2079
|
```
|
|
2077
2080
|
|
|
2081
|
+
### File-system workspace (v2.0+)
|
|
2082
|
+
|
|
2083
|
+
By default the GUI is a **file-system-style workspace**. The home dashboard shows
|
|
2084
|
+
one card per object; clicking in opens that object's rows as a grid of **folder
|
|
2085
|
+
tiles** rather than a spreadsheet. Click a tile to open an **item view** that
|
|
2086
|
+
renders the row as a document built from its columns — long-form fields render as
|
|
2087
|
+
formatted markdown — alongside that row's relationships as **sub-folders** you can
|
|
2088
|
+
keep opening (e.g. _Authors → a person → Books → a book → Reviews_). A breadcrumb
|
|
2089
|
+
trail tracks the drill path. **Click any value to edit it in place** — the change
|
|
2090
|
+
saves immediately via `PATCH` and is undoable. Native `files` rows show the inline
|
|
2091
|
+
file/markdown preview; their binary metadata stays read-only.
|
|
2092
|
+
|
|
2093
|
+
Relationships come from the schema: a `belongsTo` (a field with `ref:`) renders as
|
|
2094
|
+
a parent link, while the reverse side (other entities that point here) plus
|
|
2095
|
+
many-to-many junctions become the drill-in sub-folders. Declare `ref:` on your
|
|
2096
|
+
foreign-key fields to get the nested file tree.
|
|
2097
|
+
|
|
2098
|
+
The header carries the logo, undo/redo, the workspace (database) switcher, and a
|
|
2099
|
+
**settings gear** (top-right). The gear opens a slide-over drawer with **Database**,
|
|
2100
|
+
**Lattice**, and **User** settings plus an **Advanced mode** toggle. Turn Advanced
|
|
2101
|
+
mode on to switch the object/row views back to the classic editable **table + row**
|
|
2102
|
+
interface (below); turn it off for the file-system workspace. The left sidebar is
|
|
2103
|
+
slim and collapsible. The assistant rail is unchanged in either mode.
|
|
2104
|
+
|
|
2105
|
+
### Assistant sidebar (v2.0+)
|
|
2106
|
+
|
|
2107
|
+
The GUI has a fixed right sidebar with a live **activity feed** — every change
|
|
2108
|
+
(yours, the assistant's, or an ingest) streams in as it happens.
|
|
2109
|
+
|
|
2110
|
+
Add a Claude API token in **User Settings → Assistant** (or set
|
|
2111
|
+
`ANTHROPIC_API_KEY`) to enable the **AI assistant**: ask questions about your
|
|
2112
|
+
data or instruct edits in natural language. The assistant calls the same
|
|
2113
|
+
operations the UI does, so its changes are audited, shown in the feed, and
|
|
2114
|
+
undoable. A Claude subscription can be connected instead via OAuth when the
|
|
2115
|
+
`ANTHROPIC_OAUTH_*` environment variables are configured.
|
|
2116
|
+
|
|
2117
|
+
Optional extras, each enabled by its own key/binary:
|
|
2118
|
+
|
|
2119
|
+
- **Voice** — set an OpenAI (Whisper) or ElevenLabs key to dictate into the composer.
|
|
2120
|
+
- **File ingest** — reference a local file or paste text; it becomes a row in the
|
|
2121
|
+
native `files` entity with extracted text + (with a Claude key) an
|
|
2122
|
+
LLM-written description and links to related records. PDFs/office docs use the
|
|
2123
|
+
optional [`markitdown`](https://github.com/microsoft/markitdown) CLI when installed.
|
|
2124
|
+
|
|
2125
|
+
Chat threads, files, and secrets are all stored as native Lattice entities.
|
|
2126
|
+
|
|
2078
2127
|
**Options**
|
|
2079
2128
|
|
|
2080
2129
|
| Flag | Default | Description |
|
|
@@ -2106,8 +2155,11 @@ The convergence means you don't need to duplicate entity-context definitions in
|
|
|
2106
2155
|
**Views**
|
|
2107
2156
|
|
|
2108
2157
|
- **Dashboard** (`#/`) — one card per first-class entity with live row counts.
|
|
2109
|
-
- **
|
|
2110
|
-
- **
|
|
2158
|
+
- **Workspace / folder grid** (`#/fs/<entity>`, default mode, v2.0+) — the entity's rows as folder/file tiles.
|
|
2159
|
+
- **Item view** (`#/fs/<entity>/<id>[/<relation>/<id>…]`, default mode, v2.0+) — the row as a click-to-edit document plus its relationships as sub-folders; drill arbitrarily deep, with a clickable breadcrumb.
|
|
2160
|
+
- **Table view** (`#/objects/<entity>`, Advanced mode) — intrinsic columns, `belongsTo` chips, and a column per junction this entity participates in.
|
|
2161
|
+
- **Detail view** (`#/objects/<entity>/<id>`, Advanced mode) — read mode by default; `Edit` flips cells into inputs (`Save` PATCHes, `Cancel` reverts).
|
|
2162
|
+
- **Settings** (v2.0+) — opened from the header gear (Database / Lattice / User tabs + the Advanced-mode toggle); the legacy `#/settings/*` hashes still resolve and open the drawer.
|
|
2111
2163
|
- **Data Model** (inside **Database Settings**, v1.14+) — entity-level graph including the native `files`/`secrets` objects, with a per-entity editor. On a team cloud each table you own carries a **Share with team / Unshare** toggle. (Pre-1.14 this was a separate `#/settings/data-model` nav item; that hash still resolves for back-compat.)
|
|
2112
2164
|
|
|
2113
2165
|
**Internal tables added on first open**
|
|
@@ -2248,15 +2300,7 @@ lattice teams join \
|
|
|
2248
2300
|
|
|
2249
2301
|
The cloud rejects redemption if the caller's claimed email doesn't match the invitation's `invitee_email` (case-insensitive). Sharing an invite token in a public channel is therefore safe — only the addressee can redeem it.
|
|
2250
2302
|
|
|
2251
|
-
**Other subcommands** (`lattice teams help` for the full list): `list`, `members`, `leave`, `destroy`, `share`, `unshare`, `shared`, `sync`, `link`, `unlink`, `pull`, `push`, `status
|
|
2252
|
-
|
|
2253
|
-
**Dead-letter queue (v1.15+).** A pulled change envelope that fails to apply (e.g. it arrived before the row/table it depends on), and any non-owner-overwrite divergence notice, lands in `__lattice_team_dlq`. Inspect and recover it instead of losing it behind the pull cursor:
|
|
2254
|
-
|
|
2255
|
-
```bash
|
|
2256
|
-
lattice teams dlq list --team <name> # show entries (op, target, error)
|
|
2257
|
-
lattice teams dlq retry --team <name> [--id <id>] # replay; a late dependency now applies cleanly
|
|
2258
|
-
lattice teams dlq purge --team <name> [--id <id>] # discard without applying
|
|
2259
|
-
```
|
|
2303
|
+
**Other subcommands** (`lattice teams help` for the full list): `list`, `members`, `leave`, `destroy`, `share`, `unshare`, `shared`, `sync`, `link`, `unlink`, `pull`, `push`, `status`.
|
|
2260
2304
|
|
|
2261
2305
|
**Per-table ownership + opt-in sharing (v1.14+).** Team members share one physical Postgres, so visibility is enforced at the app layer via a `__lattice_object_owners` table: each table records its creator, and a user sees only the tables they own plus tables explicitly shared to the team. The native `files`/`secrets` objects are owned by the database creator and private by default. Sharing is an explicit, owner-only action (not a side effect of creating a table). The filter gates API access, not just the display.
|
|
2262
2306
|
|
|
@@ -2662,6 +2706,8 @@ DO_NOT_TRACK=1 npm install latticesql
|
|
|
2662
2706
|
npm install latticesql --ignore-scripts
|
|
2663
2707
|
```
|
|
2664
2708
|
|
|
2709
|
+
**In-app opt-out (consent preference)** — in the GUI, open **Settings → User → Preferences** and uncheck **"Send anonymous analytics"** (or set `"analytics": false` in `~/.lattice/preferences.json`). This is the single consent for all anonymous analytics Lattice shares via Scarf — the install ping and any Scarf pixel — so in-app updates (`lattice update` / `autoUpdate()`) suppress the Scarf ping and any future runtime telemetry is gated. Analytics is **on by default** (opt-out). The original `npm install` ping is governed at install time by the env-var options above — the preference governs reinstalls, not the install you already ran.
|
|
2710
|
+
|
|
2665
2711
|
Opting out has no effect on functionality — the package works identically. The Scarf postinstall is a fire-and-forget HTTPS ping with a short timeout; even when enabled it cannot fail your install.
|
|
2666
2712
|
|
|
2667
2713
|
See Scarf's own [privacy documentation](https://docs.scarf.sh) for the upstream policy.
|