mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-21 02:28:07 +02:00
Merge branch 'main' into ragnorc/stored-queries-mcp
This commit is contained in:
commit
8c1cc102c7
29 changed files with 542 additions and 58 deletions
|
|
@ -20,6 +20,8 @@ Build or install:
|
|||
- `omnigraph`
|
||||
- `omnigraph-server`
|
||||
|
||||
On Windows, the binaries are `omnigraph.exe` and `omnigraph-server.exe`.
|
||||
|
||||
Run against a local graph:
|
||||
|
||||
```bash
|
||||
|
|
@ -107,6 +109,35 @@ docker run --rm -p 8080:8080 \
|
|||
--bind 0.0.0.0:8080
|
||||
```
|
||||
|
||||
### Container entrypoint env vars
|
||||
|
||||
When no positional args are given, the image entrypoint
|
||||
(`docker/entrypoint.sh`) builds the server command from env vars:
|
||||
|
||||
| Var | Effect |
|
||||
|---|---|
|
||||
| `OMNIGRAPH_TARGET_URI` | Graph URI, passed as the positional argument. |
|
||||
| `OMNIGRAPH_CONFIG` | Path to an `omnigraph.yaml`, passed as `--config`. Used to supply a `policy.file` (Cedar authorization). The config file and any relative `policy.file` must be mounted into the container. |
|
||||
| `OMNIGRAPH_TARGET` | Graph name to select from the config's `graphs:` block (with `OMNIGRAPH_CONFIG`, when no `OMNIGRAPH_TARGET_URI`). |
|
||||
| `OMNIGRAPH_BIND` | Listen address (default `0.0.0.0:8080`). |
|
||||
|
||||
`OMNIGRAPH_TARGET_URI` and `OMNIGRAPH_CONFIG` **compose**: set both to keep the
|
||||
graph URI in the env var while loading policy from the config file (the
|
||||
positional URI wins over any `graphs:` entry). To enable Cedar policy on a
|
||||
container otherwise driven by `OMNIGRAPH_TARGET_URI`, mount the config dir and
|
||||
add `OMNIGRAPH_CONFIG`:
|
||||
|
||||
```bash
|
||||
docker run --rm -p 8080:8080 \
|
||||
-e OMNIGRAPH_SERVER_BEARER_TOKEN="change-me" \
|
||||
-e OMNIGRAPH_TARGET_URI="s3://my-bucket/graphs/example/releases/2026-04-10-v0.1.0" \
|
||||
-e OMNIGRAPH_CONFIG="/etc/omnigraph/omnigraph.yaml" \
|
||||
-v "$PWD/config:/etc/omnigraph:ro" \
|
||||
omnigraph-server:local
|
||||
# /etc/omnigraph/omnigraph.yaml contains `policy: { file: ./policy.yaml }`;
|
||||
# policy.yaml (+ optional policy.tests.yaml) sit beside it in the mount.
|
||||
```
|
||||
|
||||
## Auth
|
||||
|
||||
The server can run unauthenticated for local development only when explicitly
|
||||
|
|
@ -141,8 +172,10 @@ The server binary ships in two flavors:
|
|||
| **AWS** | `cargo build --release --features aws` | Adds AWS Secrets Manager backend for bearer tokens |
|
||||
|
||||
Tagged release archives contain the default `omnigraph` and
|
||||
`omnigraph-server` binaries. AWS-enabled server binaries are built from source
|
||||
with `cargo build --release --features aws -p omnigraph-server` when needed.
|
||||
`omnigraph-server` binaries on macOS / Linux, and `omnigraph.exe` plus
|
||||
`omnigraph-server.exe` on Windows. AWS-enabled server binaries are built from
|
||||
source with `cargo build --release --features aws -p omnigraph-server` when
|
||||
needed.
|
||||
|
||||
The AWS build adds ~150 transitive deps and ~30-60s of first-build compile
|
||||
time. Default builds don't pay that cost.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
- `Manifest(ManifestError { kind: BadRequest|NotFound|Conflict|Internal, details: Option<ManifestConflictDetails>, … })`
|
||||
- `ManifestConflictDetails::ExpectedVersionMismatch { table_key, expected, actual }` — caller's `expected_table_versions` did not match the manifest's current latest non-tombstoned version (set by `OmniError::manifest_expected_version_mismatch`).
|
||||
- `ManifestConflictDetails::RowLevelCasContention` — Lance row-level CAS rejected the publish because a concurrent writer landed the same `object_id`. Retried internally by the publisher; only surfaces if the retry budget exhausts.
|
||||
- **D₂ parse-time rejection** (MR-794): a single mutation query that mixes inserts/updates with deletes errors out *before any I/O* with kind `BadRequest`. Message: `mutation '<name>' on the same query mixes inserts/updates and deletes; split into separate mutations: (1) inserts and updates, then (2) deletes`. See [docs/user/query-language.md](query-language.md) for the rule and [docs/dev/runs.md](../dev/runs.md) for the underlying staged-write rationale.
|
||||
- **D₂ parse-time rejection** (MR-794): a single mutation query that mixes inserts/updates with deletes errors out *before any I/O* with kind `BadRequest`. Message: `mutation '<name>' on the same query mixes inserts/updates and deletes; split into separate mutations: (1) inserts and updates, then (2) deletes`. See [docs/user/query-language.md](query-language.md) for the rule and [docs/dev/writes.md](../dev/writes.md) for the underlying staged-write rationale.
|
||||
- `MergeConflicts(Vec<MergeConflict>)`
|
||||
|
||||
Compiler-side `NanoError` covers parse / catalog / type / storage / plan / execution / arrow / lance / IO / manifest / unique-constraint, each with structured spans (`SourceSpan { start, end }`) for ariadne-style diagnostics.
|
||||
|
|
|
|||
|
|
@ -2,16 +2,29 @@
|
|||
|
||||
## Quick Install
|
||||
|
||||
macOS / Linux:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/install.sh | bash
|
||||
```
|
||||
|
||||
Windows PowerShell:
|
||||
|
||||
```powershell
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -UseBasicParsing https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/install.ps1 | iex"
|
||||
```
|
||||
|
||||
By default the installer places:
|
||||
|
||||
- `omnigraph`
|
||||
- `omnigraph-server`
|
||||
|
||||
in `~/.local/bin`.
|
||||
in `~/.local/bin` on macOS / Linux, or:
|
||||
|
||||
- `omnigraph.exe`
|
||||
- `omnigraph-server.exe`
|
||||
|
||||
in `%USERPROFILE%\.local\bin` on Windows.
|
||||
|
||||
The default installer is binary-only. It downloads a published release asset,
|
||||
verifies the SHA256 checksum, and unpacks it. It does not build from source.
|
||||
|
|
@ -39,6 +52,13 @@ Rolling edge binaries from `main`:
|
|||
curl -fsSL https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/install.sh | RELEASE_CHANNEL=edge bash
|
||||
```
|
||||
|
||||
Windows rolling edge binaries:
|
||||
|
||||
```powershell
|
||||
iwr -UseBasicParsing https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/install.ps1 -OutFile install.ps1
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -ReleaseChannel edge
|
||||
```
|
||||
|
||||
Install from source:
|
||||
|
||||
```bash
|
||||
|
|
@ -53,12 +73,24 @@ Install to a different directory:
|
|||
curl -fsSL https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/install.sh | INSTALL_DIR="$HOME/bin" bash
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```powershell
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -InstallDir "$env:USERPROFILE\bin"
|
||||
```
|
||||
|
||||
Install a specific tag:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/install.sh | VERSION=v0.1.0 bash
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```powershell
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Version v0.1.0
|
||||
```
|
||||
|
||||
Build from a specific git ref:
|
||||
|
||||
```bash
|
||||
|
|
@ -67,27 +99,53 @@ curl -fsSL https://raw.githubusercontent.com/ModernRelay/omnigraph/main/scripts/
|
|||
|
||||
## Manual Source Build
|
||||
|
||||
macOS / Linux:
|
||||
|
||||
```bash
|
||||
cargo build --release --locked -p omnigraph-cli -p omnigraph-server
|
||||
install -m 0755 target/release/omnigraph ~/.local/bin/omnigraph
|
||||
install -m 0755 target/release/omnigraph-server ~/.local/bin/omnigraph-server
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```powershell
|
||||
cargo build --release --locked -p omnigraph-cli -p omnigraph-server
|
||||
New-Item -ItemType Directory -Force "$env:USERPROFILE\.local\bin" | Out-Null
|
||||
Copy-Item target\release\omnigraph.exe "$env:USERPROFILE\.local\bin\omnigraph.exe"
|
||||
Copy-Item target\release\omnigraph-server.exe "$env:USERPROFILE\.local\bin\omnigraph-server.exe"
|
||||
```
|
||||
|
||||
## Release Assets
|
||||
|
||||
Tagged releases are expected to publish:
|
||||
|
||||
- `omnigraph-linux-x86_64.tar.gz`
|
||||
- `omnigraph-macos-arm64.tar.gz`
|
||||
- `omnigraph-windows-x86_64.zip`
|
||||
|
||||
Each archive contains both binaries:
|
||||
The macOS / Linux archives contain both binaries:
|
||||
|
||||
- `omnigraph`
|
||||
- `omnigraph-server`
|
||||
|
||||
The Windows archive contains:
|
||||
|
||||
- `omnigraph.exe`
|
||||
- `omnigraph-server.exe`
|
||||
|
||||
## Verify The Install
|
||||
|
||||
macOS / Linux:
|
||||
|
||||
```bash
|
||||
omnigraph version
|
||||
omnigraph-server --help
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```powershell
|
||||
omnigraph.exe version
|
||||
omnigraph-server.exe --help
|
||||
```
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ A single mutation query must be **either insert/update-only or delete-only**. Mi
|
|||
|
||||
> `mutation '<name>' on the same query mixes inserts/updates and deletes; split into separate mutations: (1) inserts and updates, then (2) deletes. This restriction lifts when Lance exposes a two-phase delete API (tracked: MR-793 / Lance-upstream).`
|
||||
|
||||
Reason: under the staged-write rewire (MR-794), inserts and updates accumulate in memory and commit at end-of-query, while deletes still inline-commit (Lance 4.0.0 has no public two-phase delete). Mixing creates ordering hazards (same-row insert→delete becomes a no-op because the staged insert isn't visible to delete; cascading deletes of just-inserted edges break referential integrity by silent design). Until Lance exposes `DeleteJob::execute_uncommitted`, the parse-time rejection keeps both paths atomic and correct. See [docs/dev/runs.md](../dev/runs.md) and [docs/dev/invariants.md](../dev/invariants.md).
|
||||
Reason: under the staged-write rewire (MR-794), inserts and updates accumulate in memory and commit at end-of-query, while deletes still inline-commit (Lance 4.0.0 has no public two-phase delete). Mixing creates ordering hazards (same-row insert→delete becomes a no-op because the staged insert isn't visible to delete; cascading deletes of just-inserted edges break referential integrity by silent design). Until Lance exposes `DeleteJob::execute_uncommitted`, the parse-time rejection keeps both paths atomic and correct. See [docs/dev/writes.md](../dev/writes.md) and [docs/dev/invariants.md](../dev/invariants.md).
|
||||
|
||||
## IR (Intermediate Representation)
|
||||
|
||||
|
|
|
|||
|
|
@ -164,5 +164,5 @@ This is the workflow MR-797 / agentic loops are designed around: **branches are
|
|||
- [`docs/user/branches-commits.md`](branches-commits.md) — branch and commit-graph mechanics.
|
||||
- [`docs/dev/merge.md`](../dev/merge.md) — three-way merge details and conflict kinds.
|
||||
- [`docs/user/query-language.md`](query-language.md) — `.gq` syntax for the multi-statement queries used above.
|
||||
- [`docs/dev/runs.md`](../dev/runs.md) — the per-query commit pipeline that gives single-query atomicity.
|
||||
- [`docs/dev/writes.md`](../dev/writes.md) — the per-query commit pipeline that gives single-query atomicity.
|
||||
- [`docs/dev/invariants.md`](../dev/invariants.md) — the architectural rule.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue