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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ prompts/system.md text eol=lf

# Keep bundled skill source digests stable across Windows and Linux checkouts.
skills/**/SKILL.md text eol=lf

# Check the desktop frontend out with LF on every platform. Biome's formatter
# check expects LF, and a CRLF checkout on Windows would fail it.
crates/omgcode-desktop/ui/** text=auto eol=lf
47 changes: 47 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Frontend

on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: frontend-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check:
name: Desktop frontend (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2025]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
defaults:
run:
working-directory: crates/omgcode-desktop/ui
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
- name: Install the locked dependencies
# The flag repeats what .npmrc sets, so no package install script runs
# even if that file changes.
run: npm ci --ignore-scripts
- name: Check types
run: npm run check
- name: Check formatting and lints
run: npm run lint
- name: Run tests
run: npm test
- name: Build and check the bundles
run: npm run test:dist
21 changes: 20 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
os: [ubuntu-24.04, windows-2025]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
timeout-minutes: 40
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -31,6 +31,25 @@ jobs:
run: rustup toolchain install 1.99.1 --profile minimal --component rustfmt --component clippy
- name: Check formatting
run: cargo fmt --all -- --check
- name: Install the desktop shell's Linux build packages
if: runner.os == 'Linux'
run: |
# The Tauri prerequisites for Debian and Ubuntu. They are needed to
# compile the desktop crate; no test here starts a webview.
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev \
libssl-dev libayatana-appindicator3-dev librsvg2-dev
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
- name: Build the desktop frontend
# The desktop crate embeds ui/dist at compile time, so the frontend
# must be built before any workspace-wide Cargo step.
working-directory: crates/omgcode-desktop/ui
run: |
npm ci --ignore-scripts
npm run build
- name: Check lints and compilation
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Start a user service manager for delegated cgroups
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,39 @@ concurrency:
cancel-in-progress: true

jobs:
# The frontend tests run dependency code, so they run in a job that is never
# given the Sonar credential. The analysis job receives only the report.
frontend-coverage:
name: Frontend coverage
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04
timeout-minutes: 15
defaults:
run:
working-directory: crates/omgcode-desktop/ui
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
- name: Install the locked dependencies
# The flag repeats what .npmrc sets, so no package install script runs
# even if that file changes.
run: npm ci --ignore-scripts
- name: Run the tests with coverage
run: npm run coverage
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: frontend-coverage
path: crates/omgcode-desktop/ui/coverage/lcov.info
if-no-files-found: error
retention-days: 1

analyze:
name: Sonar analysis
needs: frontend-coverage
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04
timeout-minutes: 15
Expand All @@ -25,6 +56,11 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- name: Fetch the frontend coverage report
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: frontend-coverage
path: crates/omgcode-desktop/ui/coverage
- name: Require the analysis credential
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ rustc-ice-*.txt
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Desktop UI (Node)
node_modules/
dist/
coverage/
35 changes: 28 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ repository contains a pinned Rust workspace with configuration-only workspace
preferences, a bounded native file broker exposed through trusted CLI commands,
and native identity checks. Follow [workspace settings](docs/workspace-permissions.md)
and [workspace file access](docs/file-access.md) for their contracts. Enabled
preferences never authorize execution. The prototype is not a desktop app.
preferences never authorize execution. A prototype Tauri desktop shell adds a
session tree, full-text search, chat, and an isolated approvals window. It is
unpackaged, has run only on Windows, and gives the webview no authority: the
Rust side authorizes every command and the trusted CLI remains. Follow the
[desktop interface](docs/desktop-interface.md) contract.
Chat offers the local LM Studio model read and list tools; when the workspace
also enables `read` and `write`, one exact-edit tool; and, when it also enables
`execute`, `read`, and `write`, one command tool. The edit and command tools
Expand All @@ -30,19 +34,36 @@ no run uses them. The trusted `packages fetch` command downloads from declared
origins into a per-workspace cache. A selected root is exposed read-only on
Linux and Windows; Windows needs a read-execute container grant, and Linux
falls back to application storage. Provider profiles record connection shapes
without credentials or adapters; no adapter or login uses them. Trusted CLI
commands can store API keys in protected OS storage (DPAPI on Windows, the
Secret Service on Linux) and bind them to `api_key` profiles; no adapter reads
them yet. Trusted
without credentials. Trusted CLI commands can store API keys in protected OS
storage (DPAPI on Windows, the Secret Service on Linux) and bind them to
`api_key` profiles. An `lm_studio` profile can record a loopback endpoint.
Only the local LM Studio adapter reads a credential, through an
operator-selected profile that supplies both the endpoint and the token
(ADR-0047, ADR-0048); no cloud adapter or login exists. Trusted
single-use approval records authorize one exact model-tool call: only a later
identical call may consume an approved record. `workspace_run_command` then
identical call may consume an approved record. The trusted CLI or the desktop
approvals window can decide a record; the window shows a request only when core
reproduces its digest, and approval needs a single-use review token.
`workspace_run_command` then
invokes the trusted runner, and `workspace_edit_file` then calls the
checkpointed apply with the size and digest of a live trusted read
([ADR-0043](docs/adr/0043-gate-the-model-file-edit-tool-with-approvals-and-checkpointed-apply.md)).
Neither route detects a concurrent writer. Trusted CLI
commands record, apply, and revoke Windows container ACL grants. Follow the
[execution contract](docs/execution.md).
The bundled web interface and most planned features are not implemented.
Sessions are indexed in a derived SQLite index that the journals can rebuild.
Chat can stream the local model's reply (`chat --stream` on the
CLI; on by default in the desktop shell, `--stream off` at launch). Streamed
text is provisional, and the journals record only the validated reply. The
shell pushes chat events to the main window through one caller-scoped channel
that needs no `core:` permission ([ADR-0049](docs/adr/0049-stream-local-model-replies-and-push-chat-events.md)).
A cancel request interrupts a streamed model request and the turn is recorded as
cancelled; a non-streamed request, the compaction request, and a tool call in
progress are not interruptible
([ADR-0050](docs/adr/0050-interrupt-a-streamed-model-request-on-cancellation.md)).
The desktop shell has no settings interface, development panels, packaging, or
recovery interface. Most other planned features are not
implemented.
The core validates replacement records and can prepare protected checkpoints on
Linux and Windows through a live authorized binding. The CLI provides
existing-only checkpoint inspection and acknowledgement. Trusted CLI apply can
Expand Down
Loading