Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
151d311
feat: init repo projects
hbjydev Feb 21, 2026
a4678cb
feat: init common crate with caller logic
hbjydev Feb 21, 2026
1735988
docs: add agent instructions
hbjydev Feb 21, 2026
8489218
feat: tracing and axum init
hbjydev Feb 21, 2026
4bd4917
fix: drop unused import
hbjydev Feb 21, 2026
a356525
feat: init common views and error handling
hbjydev Feb 21, 2026
66a6f7d
feat: default response types for endpoints
hbjydev Feb 21, 2026
88762ca
feat: simplify response generation code a little bit
hbjydev Feb 21, 2026
7c0da24
feat: add global 404 handler
hbjydev Feb 21, 2026
c92ec4e
fix: update openapi docs
hbjydev Feb 21, 2026
36e6898
feat: build & pr validation
hbjydev Feb 21, 2026
049e6a8
fix: cargo fmt
hbjydev Feb 21, 2026
a345060
fix: resolve clippy error
hbjydev Feb 21, 2026
a4bac63
fix: clippy fixes
hbjydev Feb 21, 2026
fb984b0
feat: console workflows
hbjydev Feb 21, 2026
88c4c3f
fix: bun run format --fix
hbjydev Feb 21, 2026
f4c100c
fix: bun run test to run vitest
hbjydev Feb 21, 2026
5fe09fa
fix: the rest of the console fixes
hbjydev Feb 21, 2026
39fccee
fix: for now, add a dummy test
hbjydev Feb 21, 2026
43783a0
feat: working on more views for the api
hbjydev Feb 21, 2026
ba83c64
feat: mongodb db init
hbjydev Feb 21, 2026
3c7c782
fix: resolve some connection issues with mongodb
hbjydev Feb 21, 2026
d49db53
fix: get(0), not iter().nth(0)
hbjydev Feb 21, 2026
23fd45e
docs: update api docs & add to contributing guidelines
hbjydev Feb 21, 2026
bb68c18
feat: tracing instrument for each storage func
hbjydev Feb 21, 2026
8cd2a6c
feat: create local user with admin cli task to do it
hbjydev Feb 21, 2026
e9dcb82
fix: cargo fmt
hbjydev Feb 21, 2026
c30307a
fix: clippy issues
hbjydev Feb 21, 2026
52a865a
feat: implement local auth
hbjydev Feb 21, 2026
defdfb9
fix: clippy fix
hbjydev Feb 21, 2026
c10f979
fix: include mongodb service in openapi schema check
hbjydev Feb 21, 2026
560a3d3
feat: improve structure of lucidctl
hbjydev Feb 22, 2026
deb97b3
fix: ai helping me work on sessions
hbjydev Feb 22, 2026
b7bef1e
feat: reset impl for console
hbjydev Feb 23, 2026
d7c3da6
feat(auth)!: replace hmac with ed25519 for session signing
hbjydev Feb 23, 2026
26341ef
chore(config): add local signing key configuration
hbjydev Feb 23, 2026
a7478cb
fix: change title to Lucid
hbjydev Feb 23, 2026
13268e8
feat: api client build for the console, login form
hbjydev Feb 23, 2026
1a8a494
feat: session impl
hbjydev Feb 23, 2026
e13d492
feat: sidebar shell built
hbjydev Feb 23, 2026
2e32bda
feat: login redirects
hbjydev Feb 23, 2026
69e8e31
fix: redirect to dashboard on successful login
hbjydev Feb 23, 2026
8a8ec67
feat: start working on logout button
hbjydev Feb 23, 2026
d84703d
feat: set up csrf token forwarding in the console
hbjydev Feb 24, 2026
200e139
feat: good impl of the sidebar
hbjydev Feb 24, 2026
c27a3bb
feat: begin hosts query
hbjydev Feb 24, 2026
c6daf78
feat: host list & caller wiring
hbjydev Feb 24, 2026
3fff426
feat: start implementing dummy badges for nav menu
hbjydev Feb 24, 2026
af0699f
feat: jwks endpoint
hbjydev Feb 24, 2026
710df46
feat: activation keys impl
hbjydev Feb 24, 2026
8c63a15
feat: activation keys ux init
hbjydev Feb 24, 2026
a53359d
feat: jwts using jwk kids
hbjydev Feb 24, 2026
eed5c12
feat: begin agent registration planning
hbjydev Feb 24, 2026
3a31ee2
feat: working on agent registration flow
hbjydev Feb 25, 2026
d820fad
feat: working agent registration flow
hbjydev Feb 25, 2026
dd85156
feat: working on running agent
hbjydev Feb 26, 2026
c7c061e
fix: run cargo fmt and add missing package.json scripts for CI
hbjydev Feb 27, 2026
d780a05
fix: resolve build errors
hbjydev Feb 27, 2026
ff268de
feat: working on a db ulid impl
hbjydev Feb 28, 2026
644fcc1
feat: swap to ulids fully
hbjydev Feb 28, 2026
2fbd042
fix(lint): cargo fmt
hbjydev Mar 8, 2026
89a2801
fix(lint): clippy fixes
hbjydev Mar 8, 2026
ecff8c6
fix(lint): cargo fmt
hbjydev Mar 8, 2026
8007ad1
fix: generate signing key for now in openapi run
hbjydev Mar 8, 2026
39357a1
fix(test): this should be checking for a valid ulid
hbjydev Mar 8, 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
122 changes: 122 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Build

on:
push:
branches: [main]
tags:
- 'v*'

jobs:
console:
name: Build Console
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2

- name: Install dependencies
working-directory: console
run: bun install --frozen-lockfile

- name: Build console
working-directory: console
run: bun run build

- name: Upload console artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.5.0
with:
name: lucid-console
path: console/dist/
if-no-files-found: error

build:
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # v1
with:
toolchain: stable
targets: ${{ matrix.target }}

- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
with:
key: ${{ matrix.target }}

- name: Install cross-compilation tools
if: runner.os == 'Linux' && contains(matrix.target, 'musl')
run: |
sudo apt-get update
sudo apt-get install -y musl-tools

- name: Install cross-compilation tools (aarch64)
if: runner.os == 'Linux' && contains(matrix.target, 'aarch64')
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu

- name: Build
run: cargo build --release --target ${{ matrix.target }} --workspace

- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.5.0
with:
name: lucid-${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/lucid-api
target/${{ matrix.target }}/release/lucid-agent
if-no-files-found: error

release:
name: Create Release
if: startsWith(github.ref, 'refs/tags/')
needs: [build, console]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- name: Download all artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8

- name: Create archives
run: |
for dir in lucid-*; do
if [ "$dir" = "lucid-console" ]; then
cd "$dir"
tar czf "../lucid-console.tar.gz" .
cd ..
else
target="${dir#lucid-}"
cd "$dir"
tar czf "../${dir}.tar.gz" *
cd ..
fi
done

- name: Create release
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.2.0
with:
draft: true
files: lucid-*.tar.gz
generate_release_notes: true
65 changes: 65 additions & 0 deletions .github/workflows/pr-console.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: PR Validation (Console)

on:
pull_request:
branches: [main]
paths:
- 'console/**'
- '.github/workflows/pr-console.yml'
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: console
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run tests
run: bun run test

check:
name: Lint & Format
runs-on: ubuntu-latest
defaults:
run:
working-directory: console
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run biome check
run: bun check

build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: console
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build
run: bun run build
99 changes: 99 additions & 0 deletions .github/workflows/pr-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: PR Validation (Rust)

on:
pull_request:
branches: [main]
paths:
- 'agent/**'
- 'api/**'
- 'common/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/pr-rust.yml'
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # v1
with:
toolchain: stable
components: rustfmt, clippy

- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2

- name: Run tests
run: cargo test --workspace --all-features

fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # v1
with:
toolchain: stable
components: rustfmt

- name: Check formatting
run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # v1
with:
toolchain: stable
components: clippy

- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2

- name: Run clippy
run: cargo clippy --workspace --all-features -- -D warnings

openapi:
name: OpenAPI Schema
runs-on: ubuntu-latest
services:
mongodb:
image: mongodb/mongodb-community-server:8.0-ubi8
ports: [27017:27017]
env:
LUCID_API_DB_URL: mongodb://localhost:27017/lucid
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v6.0.2

- uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # v1
with:
toolchain: stable

- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2

- name: Generate signing key
run: openssl genpkey -algorithm ED25519 -out signing_key.pem

- name: Generate OpenAPI schema
env:
LUCID_API_SIGNING_KEY_FILE: signing_key.pem
run: cargo run --bin lucid-api -- --dump-openapi > /tmp/openapi.json

- name: Check schema is up to date
run: |
if ! diff -q api/openapi.json /tmp/openapi.json; then
echo "❌ OpenAPI schema is out of date"
echo "Run: cargo run --bin lucid-api -- --dump-openapi > api/openapi.json"
exit 1
fi
echo "✅ OpenAPI schema is up to date"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ Cargo.lock

# Antora Docs
build/

mise.local.toml
config/local
21 changes: 21 additions & 0 deletions .opencode/skills/db-model-impl/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: db-model-impl
description: Finish implementing the logic for a database model written by a developer.
license: Apache-2.0
compatibility: opencode
metadata:
audience: maintainers
workflow: github
---

## What I do

- Create a storage filter struct for the created model
- Create a `Store` trait for the model (i.e. `HostStore`)
- Implement the new `Store` trait for all `Storage` trait implementations
- Add any relevant permissions to the `Permissions` enum in `lucid-common`

## When to use me

Use this when you are tasked with finishing implementation of a database model,
or when writing a _new_ database model.
22 changes: 22 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Lucid Agent Guidelines

Be sure to read the [README](./README.adoc) for information on what Lucid
actually is and aims to enable.

Lucid is built from three key components:

- `api/`, the API service that everything interfaces with
- `agent/`, the host agent responsible for collecting host telemetry
- `console/`, the web UI used by administrators to interface with the system

## Coding Guidelines

### Rust

- All dependencies must be declared in the root `Cargo.toml`, not locally to
individual crates.

- After editing any Rust code, you **must** run `cargo fmt` on the changed
files.

- Always write unit tests for logic, write integration tests where relevant.
9 changes: 9 additions & 0 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ If you would like to contribute to Lucid, but are not exactly sure what to work
on, you can find a number of open issues that are awaiting contributions in
https://github.com/roostmoe/lucid/issues[Issues].

=== Updating the API documentation

When updating the API, ensure you have updated the OpenAPI specification.

[source,bash]
----
$ cargo run -p lucid-api -- --dump-openapi > api/openapi.json
----

== Reporting Vulnerabilities

If you have found a security vulnerability in Lucid, please follow the
Expand Down
Loading
Loading