Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
707390e
Stage release updates safely and migrate stock v0.6.5 installs
JasonDocton Nov 4, 2026
a1ec67b
Recognize the stock updater’s independently timestamped backup
JasonDocton Nov 4, 2026
3a62d70
Pin the legacy handoff and later updates to published release tags
JasonDocton Nov 4, 2026
8061462
Test rollback and a release tag behind the default branch
JasonDocton Nov 4, 2026
c61673a
Publish the tested tag binaries and crate from the GitHub release event
JasonDocton Nov 4, 2026
d6b21f0
Verify recovery, private data, and space-containing upgrade paths on …
JasonDocton Nov 4, 2026
d6d5422
Limit rollback to owned files and preserve existing file modes
JasonDocton Nov 4, 2026
2de9e96
Keep update launchers available for recovery and validate path-safe e…
JasonDocton Nov 4, 2026
5e745e4
Exercise the stock upgrade with the released Bun toolchain and curren…
JasonDocton Nov 4, 2026
34fa36f
Recognize new configuration files through home-directory aliases duri…
JasonDocton Nov 4, 2026
e987ecd
Close fixture database readers and isolate release metadata preload p…
JasonDocton Nov 4, 2026
6c29322
Restore packages while preserving concurrent user settings edits
JasonDocton Nov 4, 2026
36b60ce
Document the complete release upgrade and retire the capture-only bridge
JasonDocton Nov 4, 2026
b2ba450
Mark the installed version only after the upgrade transaction succeeds
JasonDocton Nov 4, 2026
bb73068
Verify preexisting cached memory vectors survive upgrade and new capture
JasonDocton Nov 4, 2026
f6361cb
Format the upgrade cache-preservation assertions
JasonDocton Nov 4, 2026
eefe8af
Bundle verified 0.6.6 native builds
JasonDocton Nov 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
scripts/upgrade-v065-capture.sh text eol=lf
packages/lucid-server/bin/lucid-cli.sh text eol=lf
packages/lucid-server/bin/lucid-cli.cmd text eol=crlf
25 changes: 11 additions & 14 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ on:
- 'packages/lucid-perception/**'
workflow_dispatch: # Manual trigger
release:
types: [created]
types: [published]

jobs:
build-native:
if: github.event_name != 'release'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -114,6 +115,7 @@ jobs:
if-no-files-found: error

build-perception:
if: github.event_name != 'release'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -257,28 +259,23 @@ jobs:

# Attach binaries to releases
release:
needs: [build-native, build-perception]
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
contents: write

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- uses: actions/checkout@v4

- name: Prepare release files
- name: Package tested tag binaries
run: |
mkdir -p release

# Each artifact contains exactly one .node file
for dir in artifacts/native-*; do
cp "$dir"/*.node "release/"
set -euo pipefail
mkdir release
for platform in darwin-arm64 linux-arm64-gnu linux-x64-gnu win32-x64-msvc; do
cp "packages/lucid-native/lucid-native.${platform}.node" release/
done
for dir in artifacts/perception-*; do
cp "$dir"/*.node "release/"
for platform in darwin-arm64 darwin-x64 linux-x64-gnu win32-x64-msvc; do
cp "packages/lucid-perception/lucid-perception.${platform}.node" release/
done

echo "=== Release files ==="
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
Expand All @@ -46,6 +48,25 @@ jobs:
if ($errors) { throw ($errors | Out-String) }
}
- run: bun test packages/lucid-server/src/codex-config.test.ts
- run: python scripts/test-upgrade-recovery.py

stock-upgrade:
name: Stock v0.6.5 upgrade (Bun ${{ matrix.bun }})
runs-on: ubuntu-latest
strategy:
matrix:
bun: ["1.3.8", "latest"]
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.bun }}
- run: python3 scripts/test-release-upgrade.py
- run: python3 scripts/test-upgrade-recovery.py

test:
name: Test
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: Publish to crates.io

on:
push:
tags:
- 'v*'
release:
types: [published]

env:
CARGO_TERM_COLOR: always
WHISPER_DONT_GENERATE_BINDINGS: "1"

jobs:
publish:
if: github.event.release.prerelease == false && startsWith(github.event.release.tag_name, 'v')
name: Publish
runs-on: ubuntu-latest
permissions:
Expand All @@ -31,13 +32,14 @@ jobs:
echo "Version verified: $CARGO_VERSION"

- name: Run tests
run: cargo test --features transcription
run: cargo test --locked --features transcription

- name: Check if version exists on crates.io
id: check_version
run: |
VERSION=$(grep -m1 '^version' Cargo.toml | cut -d'"' -f2)
if curl -s "https://crates.io/api/v1/crates/lucid-core/$VERSION" | grep -q '"version":"'"$VERSION"'"'; then
curl -fsSL --retry 4 https://index.crates.io/lu/ci/lucid-core -o "$RUNNER_TEMP/lucid-index.jsonl"
if jq --slurp --exit-status --arg v "$VERSION" 'any(.[]; .vers == $v)' "$RUNNER_TEMP/lucid-index.jsonl" > /dev/null; then
echo "Version $VERSION already exists on crates.io, skipping publish"
echo "skip=true" >> $GITHUB_OUTPUT
else
Expand All @@ -49,4 +51,4 @@ jobs:
if: steps.check_version.outputs.skip != 'true'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p lucid-core
run: cargo publish --locked -p lucid-core
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.6] - 2026-11-03

- Configure Claude Code, Codex, or both directly from the installer client selection. Preserve existing hooks, notifiers and private database profiles.
- Record assistant replies as conversations, separately from user prompts.
- Bound native BGE inputs to the model's 512-position limit, including special tokens and batch padding.
- Verify OpenAI-compatible embedding endpoints and isolate cached vectors by model and width. Update hosts sharing a database together.
- Upgrade from installed v0.6.5 package paths. New updaters fetch the published release tag and restore enabled integrations without changing memory databases.

## [0.6.0] - 2026-02-15

### Added
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/*"]

[workspace.package]
version = "0.6.5"
version = "0.6.6"
edition = "2021"
license = "GPL-3.0"
repository = "https://github.com/JasonDocton/lucid-memory"
Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,28 @@ Restart Lucid after changing a serving model. When the endpoint reports a differ

Selecting **Claude Code** registers Lucid's MCP server, `UserPromptSubmit`, and `Stop`. Selecting **Codex** registers Lucid's MCP server and turn-completion notifier. Select **both** (`1 2`) to configure both clients in the same installation. Start new client sessions after installation. The database choice determines whether they share memories. If Codex already runs a notification command, Lucid passes it the original event as well.

**Existing v0.6.5 installations without the new installer.** Close Lucid clients and run `bash scripts/upgrade-v065-capture.sh` from a full checkout (Git Bash on Windows). It checks the five server source files, enables the direct hook, and preserves database and profile settings. Use `--rollback` to remove the hook and restore the stock files. The installer also migrates the previous user-level Claude response hook.

The v0.6.5 migration installs response capture only. It keeps the v0.6.5 embedding cache code. Before a newer server upgrades a shared database for endpoint-specific vectors, stop and update **every** client that uses that database. A stock or capture-only v0.6.5 server can discard other models' cached vectors when it opens the upgraded database. Use separate databases if clients must run different versions during rollout.
For existing installations, follow **Updating an existing installation** below. The upgrade keeps the previously selected clients and database profiles and registers their capture hooks automatically.

For Claude Code, Lucid saves up to 2,000 Unicode characters from each nonempty final reply in the active Claude database and project. Replies are tagged as assistant conversations and can be retrieved in later sessions. Lucid's configured embedding provider may process this text. Repeated delivery of the same reply for the same prompt is ignored. A Stop hook can ask Claude to continue, so a single user prompt can produce several replies. Capture requires a Stop payload with a session ID, prompt or turn ID, working directory, and final message. Use Claude Code 2.1.258 or later for the tested hook fields. Configless installations use the shared default. For named profiles, specify an absolute or home-relative database path.

</details>

### Updating an existing installation

Close other Lucid sessions before upgrading. On macOS or Linux with a standard home path, run `lucid update`, then restart your clients. The updater installs the latest **published GitHub release**, keeps your current clients and database profiles, and refreshes their hooks. Hosts that share a database should upgrade together. A stock or capture-only v0.6.5 host can remove another model's cached vectors when sharing a database with newer versions.

**Moving from v0.6.5 on Windows, or from a home path containing spaces or shell metacharacters:** use the following one-time route instead of invoking the v0.6.5 updater. Its original executable uses unquoted Unix shell commands before it can load replacement code. From a directory of your choice:

```shell
git clone --depth 1 --branch v0.6.6 https://github.com/JasonDocton/lucid-memory.git lucid-v0.6.6
cd lucid-v0.6.6
bun run --no-env-file --no-install ./packages/lucid-server/src/upgrade.ts --from-checkout
```

This route verifies the tagged checkout and installs into the existing Lucid directory. From v0.6.6 onward, `lucid update` supports paths with spaces and uses the same staged update on Windows, macOS, and Linux. Keep old sessions closed until the update finishes. If an upgrade is interrupted and the installed command cannot start, the same tagged-checkout command recovers the saved packages before retrying. Enabled automatic updates also check published releases.

For maintainers: v0.6.5 background updaters poll the private server manifest on `main`. Its source `version` stays pinned to `0.6.5` so they cannot launch the unsafe legacy update unattended. `lucidRelease` carries the actual release version, which is written to the installed manifest. Keep it aligned with the workspace and Cargo versions.

<details>
<summary><b>Multi-client configuration</b></summary>

Expand Down
19 changes: 10 additions & 9 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ if ($PkgFixNeeded) {

# Create CLI wrapper (batch file for Windows)
# Use %USERPROFILE% (resolved at runtime) so non-ASCII usernames work
Write-Utf8 "$LucidBin\lucid.cmd" "@echo off`r`nbun run `"%USERPROFILE%\.lucid\server\src\cli.ts`" %*`r`n"
Copy-Item "$LucidDir\server\bin\lucid-cli.cmd" "$LucidBin\lucid.cmd" -Force

# Create server launcher with auto-restart wrapper
Write-Utf8 "$LucidBin\lucid-server.cmd" "@echo off`r`npowershell -ExecutionPolicy Bypass -File `"%USERPROFILE%\.lucid\server\bin\lucid-server-wrapper.ps1`" %*`r`n"
Expand Down
5 changes: 1 addition & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,7 @@ if ! bun install; then
fi

# Create CLI wrapper
cat > "$LUCID_BIN/lucid" << 'EOF'
#!/bin/bash
exec bun run "$HOME/.lucid/server/src/cli.ts" "$@"
EOF
cp "$LUCID_DIR/server/bin/lucid-cli.sh" "$LUCID_BIN/lucid"
chmod +x "$LUCID_BIN/lucid"

# Copy server wrapper with auto-restart
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lucid-memory",
"version": "0.6.5",
"version": "0.6.6",
"private": true,
"workspaces": ["packages/*"],
"type": "module",
Expand Down Expand Up @@ -32,5 +32,9 @@
"@biomejs/biome": "^2.3.12",
"bun-types": "^1.3.8",
"typescript": "^5.9.3"
},
"overrides": {
"@lucid-memory/native": "workspace:*",
"@lucid-memory/perception": "workspace:*"
}
}
Loading
Loading