Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 20 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
# =============================================================================
# MEMORA ENVIRONMENT CONFIGURATION
# HINDSIGHT ENVIRONMENT CONFIGURATION
# =============================================================================
# Copy this file to .env and update with your values
# Both services (API and Control Plane) read from this single file

# =============================================================================
# API SERVICE (MEMORA_API_*)
# API SERVICE (HINDSIGHT_API_*)
# =============================================================================

# Database
MEMORA_API_DATABASE_URL=postgresql://memora:memora_dev@localhost:5432/memora
# Use "pg0" to start an embedded PostgreSQL instance via pg0
# Or provide a full connection URL for external PostgreSQL
#HINDSIGHT_API_DATABASE_URL=postgresql://hindsight:hindsight_dev@localhost:5432/hindsight
HINDSIGHT_API_DATABASE_URL=pg0

# pg0 data directory (only used when HINDSIGHT_API_DATABASE_URL=pg0)
# HINDSIGHT_API_PG0_DATA_DIR=/path/to/pg_data

# LLM Provider: "openai", "groq", or "ollama"
MEMORA_API_LLM_PROVIDER=groq
HINDSIGHT_API_LLM_PROVIDER=groq

# LLM Model (provider-specific)
MEMORA_API_LLM_MODEL=openai/gpt-oss-20b
HINDSIGHT_API_LLM_MODEL=openai/gpt-oss-20b

# API Key (not needed for ollama)
MEMORA_API_LLM_API_KEY=your_api_key_here
HINDSIGHT_API_LLM_API_KEY=your_api_key_here

# Optional: Custom base URL (for ollama or custom endpoints)
# MEMORA_API_LLM_BASE_URL=http://localhost:11434/v1
# HINDSIGHT_API_LLM_BASE_URL=http://localhost:11434/v1

# API Server Configuration (optional)
# MEMORA_API_HOST=0.0.0.0
# MEMORA_API_PORT=8080
# HINDSIGHT_API_HOST=0.0.0.0
# HINDSIGHT_API_PORT=8888

MEMORA_API_MCP_ENABLED=true
HINDSIGHT_API_MCP_ENABLED=true

# =============================================================================
# CONTROL PLANE SERVICE (MEMORA_CP_*)
# CONTROL PLANE SERVICE (HINDSIGHT_CP_*)
# =============================================================================

# Dataplane API URL (where the control plane connects to)
MEMORA_CP_DATAPLANE_API_URL=http://localhost:8080
HINDSIGHT_CP_DATAPLANE_API_URL=http://localhost:8888

# Control Plane Server Configuration (optional)
# MEMORA_CP_PORT=3000
# MEMORA_CP_HOSTNAME=0.0.0.0
# HINDSIGHT_CP_PORT=3000
# HINDSIGHT_CP_HOSTNAME=0.0.0.0
12 changes: 6 additions & 6 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Deploy Docs to GitHub Pages

on:
push:
branches: [main]
branches: [main, renaming-pre-launch]
paths:
- 'memora-docs/**'
- 'hindsight-docs/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:

permissions:
Expand All @@ -21,20 +22,19 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: memora-docs
working-directory: hindsight-docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: memora-docs/package-lock.json
cache-dependency-path: hindsight-docs/package-lock.json
- run: npm ci
- run: npm run build
- uses: actions/upload-pages-artifact@v3
with:
path: memora-docs/build

path: hindsight-docs/build
deploy:
environment:
name: github-pages
Expand Down
106 changes: 53 additions & 53 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
with:
python-version-file: ".python-version"

- name: Build memora package
working-directory: ./memora
- name: Build hindsight package
working-directory: ./hindsight
run: uv build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: python-memora-dist
path: memora/dist/*
name: python-hindsight-dist
path: hindsight/dist/*
retention-days: 30

build-rust-cli:
Expand All @@ -40,16 +40,16 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: memora
asset_name: memora-linux-amd64
artifact_name: hindsight
asset_name: hindsight-linux-amd64
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: memora
asset_name: memora-darwin-amd64
artifact_name: hindsight
asset_name: hindsight-darwin-amd64
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: memora
asset_name: memora-darwin-arm64
artifact_name: hindsight
asset_name: hindsight-darwin-arm64

steps:
- uses: actions/checkout@v4
Expand All @@ -74,17 +74,17 @@ jobs:
- name: Cache cargo build
uses: actions/cache@v4
with:
path: memora-cli/target
path: hindsight-cli/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Build
working-directory: memora-cli
working-directory: hindsight-cli
run: cargo build --release --target ${{ matrix.target }}

- name: Prepare artifact
run: |
mkdir -p artifacts
cp memora-cli/target/${{ matrix.target }}/release/${{ matrix.artifact_name }} artifacts/${{ matrix.asset_name }}
cp hindsight-cli/target/${{ matrix.target }}/release/${{ matrix.artifact_name }} artifacts/${{ matrix.asset_name }}
chmod +x artifacts/${{ matrix.asset_name }}

- name: Upload artifacts
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/memora-${{ matrix.component }}
images: ghcr.io/${{ github.repository_owner }}/hindsight-${{ matrix.component }}
tags: |
type=semver,pattern={{version}},value=${{ steps.get_version.outputs.VERSION }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.get_version.outputs.VERSION }}
Expand Down Expand Up @@ -179,11 +179,11 @@ jobs:

- name: Lint Helm chart
run: |
helm lint helm/memora
helm lint helm/hindsight

- name: Package Helm chart
run: |
helm package helm/memora --destination ./helm-packages
helm package helm/hindsight --destination ./helm-packages

- name: Upload Helm chart artifact
uses: actions/upload-artifact@v4
Expand All @@ -208,26 +208,26 @@ jobs:
- name: Download Python package
uses: actions/download-artifact@v4
with:
name: python-memora-dist
path: ./artifacts/python-memora-dist
name: python-hindsight-dist
path: ./artifacts/python-hindsight-dist

- name: Download Rust CLI (Linux)
uses: actions/download-artifact@v4
with:
name: rust-cli-memora-linux-amd64
path: ./artifacts/rust-cli-memora-linux-amd64
name: rust-cli-hindsight-linux-amd64
path: ./artifacts/rust-cli-hindsight-linux-amd64

- name: Download Rust CLI (macOS Intel)
uses: actions/download-artifact@v4
with:
name: rust-cli-memora-darwin-amd64
path: ./artifacts/rust-cli-memora-darwin-amd64
name: rust-cli-hindsight-darwin-amd64
path: ./artifacts/rust-cli-hindsight-darwin-amd64

- name: Download Rust CLI (macOS ARM)
uses: actions/download-artifact@v4
with:
name: rust-cli-memora-darwin-arm64
path: ./artifacts/rust-cli-memora-darwin-arm64
name: rust-cli-hindsight-darwin-arm64
path: ./artifacts/rust-cli-hindsight-darwin-arm64

- name: Download Helm chart
uses: actions/download-artifact@v4
Expand All @@ -239,80 +239,80 @@ jobs:
run: |
mkdir -p release-assets
# Python package
cp artifacts/python-memora-dist/* release-assets/
cp artifacts/python-hindsight-dist/* release-assets/
# Rust CLI binaries
cp artifacts/rust-cli-memora-linux-amd64/memora-linux-amd64 release-assets/
cp artifacts/rust-cli-memora-darwin-amd64/memora-darwin-amd64 release-assets/
cp artifacts/rust-cli-memora-darwin-arm64/memora-darwin-arm64 release-assets/
cp artifacts/rust-cli-hindsight-linux-amd64/hindsight-linux-amd64 release-assets/
cp artifacts/rust-cli-hindsight-darwin-amd64/hindsight-darwin-amd64 release-assets/
cp artifacts/rust-cli-hindsight-darwin-arm64/hindsight-darwin-arm64 release-assets/
# Helm chart
cp artifacts/helm-chart/*.tgz release-assets/

- name: Generate release notes
id: release_notes
run: |
cat << EOF > release-notes.md
# Memora v${{ steps.get_version.outputs.VERSION }}
# Hindsight v${{ steps.get_version.outputs.VERSION }}

## 📦 Release Artifacts

### Python Package
- \`memora-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl\`
- \`memora-${{ steps.get_version.outputs.VERSION }}.tar.gz\`
- \`hindsight-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl\`
- \`hindsight-${{ steps.get_version.outputs.VERSION }}.tar.gz\`

### CLI Binaries
- \`memora-linux-amd64\` - Linux x86_64
- \`memora-darwin-amd64\` - macOS Intel
- \`memora-darwin-arm64\` - macOS Apple Silicon
- \`hindsight-linux-amd64\` - Linux x86_64
- \`hindsight-darwin-amd64\` - macOS Intel
- \`hindsight-darwin-arm64\` - macOS Apple Silicon

### Helm Chart
- \`memora-${{ steps.get_version.outputs.VERSION }}.tgz\`
- \`hindsight-${{ steps.get_version.outputs.VERSION }}.tgz\`

### Docker Images
Docker images are published to GitHub Container Registry:
- \`ghcr.io/${{ github.repository_owner }}/memora-api:${{ steps.get_version.outputs.VERSION }}\`
- \`ghcr.io/${{ github.repository_owner }}/memora-control-plane:${{ steps.get_version.outputs.VERSION }}\`
- \`ghcr.io/${{ github.repository_owner }}/hindsight-api:${{ steps.get_version.outputs.VERSION }}\`
- \`ghcr.io/${{ github.repository_owner }}/hindsight-control-plane:${{ steps.get_version.outputs.VERSION }}\`

## 🚀 Installation

### Python Package
\`\`\`bash
pip install memora==${{ steps.get_version.outputs.VERSION }}
pip install hindsight==${{ steps.get_version.outputs.VERSION }}
\`\`\`

### CLI
\`\`\`bash
# macOS (Apple Silicon)
curl -L https://github.com/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/memora-darwin-arm64 -o memora
chmod +x memora
sudo mv memora /usr/local/bin/
curl -L https://github.com/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/hindsight-darwin-arm64 -o hindsight
chmod +x hindsight
sudo mv hindsight /usr/local/bin/

# macOS (Intel)
curl -L https://github.com/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/memora-darwin-amd64 -o memora
chmod +x memora
sudo mv memora /usr/local/bin/
curl -L https://github.com/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/hindsight-darwin-amd64 -o hindsight
chmod +x hindsight
sudo mv hindsight /usr/local/bin/

# Linux
curl -L https://github.com/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/memora-linux-amd64 -o memora
chmod +x memora
sudo mv memora /usr/local/bin/
curl -L https://github.com/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/hindsight-linux-amd64 -o hindsight
chmod +x hindsight
sudo mv hindsight /usr/local/bin/
\`\`\`

### Helm Chart
\`\`\`bash
helm install memora memora-${{ steps.get_version.outputs.VERSION }}.tgz
helm install hindsight hindsight-${{ steps.get_version.outputs.VERSION }}.tgz
\`\`\`

### Docker
\`\`\`bash
# Pull API image
docker pull ghcr.io/${{ github.repository_owner }}/memora-api:${{ steps.get_version.outputs.VERSION }}
docker pull ghcr.io/${{ github.repository_owner }}/hindsight-api:${{ steps.get_version.outputs.VERSION }}

# Pull Control Plane image
docker pull ghcr.io/${{ github.repository_owner }}/memora-control-plane:${{ steps.get_version.outputs.VERSION }}
docker pull ghcr.io/${{ github.repository_owner }}/hindsight-control-plane:${{ steps.get_version.outputs.VERSION }}

# Or use latest
docker pull ghcr.io/${{ github.repository_owner }}/memora-api:latest
docker pull ghcr.io/${{ github.repository_owner }}/memora-control-plane:latest
docker pull ghcr.io/${{ github.repository_owner }}/hindsight-api:latest
docker pull ghcr.io/${{ github.repository_owner }}/hindsight-control-plane:latest
\`\`\`
EOF
cat release-notes.md
Expand All @@ -333,7 +333,7 @@ jobs:
echo "# Release v${{ steps.get_version.outputs.VERSION }} Published Successfully" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## 📦 Components" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Python package (memora)" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Python package (hindsight)" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Rust CLI (Linux amd64, macOS amd64, macOS arm64)" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Docker images (API, Control Plane)" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Helm chart" >> $GITHUB_STEP_SUMMARY
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: memora_test
POSTGRES_DB: hindsight_test
options: >-
--health-cmd pg_isready
--health-interval 10s
Expand All @@ -26,10 +26,10 @@ jobs:
- 5432:5432

env:
MEMORA_API_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/memora_test
MEMORA_API_LLM_PROVIDER: groq
MEMORA_API_LLM_API_KEY: ${{ secrets.GROQ_API_KEY }}
MEMORA_API_LLM_MODEL: openai/gpt-oss-20b
HINDSIGHT_API_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/hindsight_test
HINDSIGHT_API_LLM_PROVIDER: groq
HINDSIGHT_API_LLM_API_KEY: ${{ secrets.GROQ_API_KEY }}
HINDSIGHT_API_LLM_MODEL: openai/gpt-oss-20b

steps:
- uses: actions/checkout@v4
Expand All @@ -48,9 +48,9 @@ jobs:
run: uv sync --extra test

- name: Run migrations
working-directory: ./memora
working-directory: ./hindsight
run: |
uv run alembic upgrade head

- name: Run tests
run: uv run pytest memora/tests -v
run: uv run pytest hindsight/tests -v
8 changes: 0 additions & 8 deletions CLAUDE.md

This file was deleted.

Loading
Loading