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
7 changes: 7 additions & 0 deletions .beads/issues.jsonl
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{"id":"terraphim-ai-061","title":"Fix tools_available() auto-reset side effect","status":"closed","priority":2,"issue_type":"bug","owner":"alex@example.com","created_at":"2026-02-26T16:28:08.006176745Z","created_by":"Alex","updated_at":"2026-02-26T19:07:04.472260702Z","closed_at":"2026-02-26T19:07:04.472260702Z","close_reason":"Closed"}
{"id":"terraphim-ai-2sz","title":"Add embedded device settings fallback to terraphim-cli","description":"Evaluate and implement an embedded DeviceSettings fallback (similar to terraphim-agent) so terraphim-cli doesn't fail on missing settings.","status":"open","priority":2,"issue_type":"task","owner":"alex@metacortex.engineer","created_at":"2026-02-10T08:23:48.689656434Z","created_by":"AlexMikhalev","updated_at":"2026-02-10T08:23:48.689656434Z"}
{"id":"terraphim-ai-8ld","title":"Rewrite compress() with proxy-first fallback","status":"closed","priority":1,"issue_type":"bug","owner":"alex@example.com","created_at":"2026-02-26T16:28:28.794633105Z","created_by":"Alex","updated_at":"2026-02-26T19:07:04.510972897Z","closed_at":"2026-02-26T19:07:04.510972897Z","close_reason":"Closed"}
{"id":"terraphim-ai-cbm","title":"Clarify terraphim-agent TUI offline/server requirement","description":"Determine whether terraphim-agent TUI is expected to work fully offline or requires a running server; document requirement and adjust behavior if needed.","design":"Phase 1/2 docs: docs/plans/terraphim-agent-tui-offline-server-research-2026-02-13.md and docs/plans/terraphim-agent-tui-offline-server-design-2026-02-13.md","acceptance_criteria":"Contract for fullscreen TUI vs REPL/offline is explicit in help/docs; actionable messaging when fullscreen TUI server is unreachable; tests cover mode behavior to prevent regressions.","notes":"Implemented on 2026-02-13: mode-contract wording in CLI/docs, fullscreen TUI server preflight with actionable repl fallback, and regression tests for help/non-TTY/server-failure paths. Validation: cargo fmt --package terraphim_agent; cargo clippy -p terraphim_agent --all-targets -- -D warnings; cargo test -p terraphim_agent --test offline_mode_tests; cargo test -p terraphim_agent --test server_mode_tests test_server_mode_config_show; targeted unit tests in main.rs for URL resolution and error messaging.","status":"closed","priority":2,"issue_type":"task","owner":"alex@metacortex.engineer","created_at":"2026-02-10T08:23:40.310825316Z","created_by":"AlexMikhalev","updated_at":"2026-02-23T10:46:13.066528719Z","closed_at":"2026-02-13T14:41:42.09313609Z"}
{"id":"terraphim-ai-iwy","title":"Add knowledge graph ranking example and guide","status":"closed","priority":2,"issue_type":"feature","owner":"alex@example.com","created_at":"2026-02-15T11:54:58.063432151Z","created_by":"Alex","updated_at":"2026-02-15T11:58:22.282021161Z","closed_at":"2026-02-15T11:58:22.282021161Z","close_reason":"Created knowledge graph ranking example and guide article"}
{"id":"terraphim-ai-ou6","title":"Make test_text_only_fallback deterministic","status":"closed","priority":2,"issue_type":"bug","owner":"alex@example.com","created_at":"2026-02-26T16:28:23.598516653Z","created_by":"Alex","updated_at":"2026-02-26T19:07:04.509756346Z","closed_at":"2026-02-26T19:07:04.509756346Z","close_reason":"Closed"}
{"id":"terraphim-ai-pdl","title":"Remove all #[allow(dead_code)] annotations","status":"closed","priority":3,"issue_type":"task","owner":"alex@example.com","created_at":"2026-02-26T16:28:39.215892144Z","created_by":"Alex","updated_at":"2026-02-26T19:07:04.513163031Z","closed_at":"2026-02-26T19:07:04.513163031Z","close_reason":"Closed"}
{"id":"terraphim-ai-q63","title":"Remove dead summarize_at_token_ratio config","status":"closed","priority":3,"issue_type":"bug","owner":"alex@example.com","created_at":"2026-02-26T16:28:13.176563141Z","created_by":"Alex","updated_at":"2026-02-26T19:07:04.506195356Z","closed_at":"2026-02-26T19:07:04.506195356Z","close_reason":"Closed"}
{"id":"terraphim-ai-rv5","title":"Fix AnthropicUsage field naming to Anthropic convention","status":"closed","priority":3,"issue_type":"bug","owner":"alex@example.com","created_at":"2026-02-26T16:28:18.370689359Z","created_by":"Alex","updated_at":"2026-02-26T19:07:04.50862237Z","closed_at":"2026-02-26T19:07:04.50862237Z","close_reason":"Closed"}
{"id":"terraphim-ai-tcw","title":"Define required feature parity between terraphim-agent and terraphim-cli","description":"Decide which commands/features must exist in both CLIs and document any intentional gaps for automation vs interactive use.","status":"open","priority":3,"issue_type":"task","owner":"alex@metacortex.engineer","created_at":"2026-02-10T08:23:51.548645229Z","created_by":"AlexMikhalev","updated_at":"2026-02-10T08:23:51.548645229Z"}
{"id":"terraphim-ai-yuk","title":"Fix stale data + inject summary into LLM context","status":"closed","priority":0,"issue_type":"bug","owner":"alex@example.com","created_at":"2026-02-26T16:28:34.015795558Z","created_by":"Alex","updated_at":"2026-02-26T19:07:04.512036157Z","closed_at":"2026-02-26T19:07:04.512036157Z","close_reason":"Closed"}
34 changes: 4 additions & 30 deletions .github/workflows/ci-optimized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,13 @@ jobs:

lint-and-format:
runs-on: [self-hosted, Linux, X64]
needs: [setup, build-base-image, build-frontend]
needs: [setup, build-base-image]
if: needs.setup.outputs.should-build == 'true'

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Download frontend artifacts
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: desktop/dist

- name: Download Docker image artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -157,10 +151,6 @@ jobs:
run: |
docker load < terraphim-builder-image.tar.gz

- name: Verify frontend dist
run: |
ls -la desktop/dist || echo "No desktop/dist found"

- name: Run format check
run: |
docker run --rm \
Expand All @@ -187,7 +177,7 @@ jobs:

build-rust:
runs-on: [self-hosted, Linux, X64]
needs: [setup, build-base-image, build-frontend, lint-and-format]
needs: [setup, build-base-image, lint-and-format]
if: needs.setup.outputs.should-build == 'true'
strategy:
fail-fast: false
Expand All @@ -207,12 +197,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- name: Download frontend artifacts
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: frontend-dist

- name: Download Docker image artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -225,10 +209,6 @@ jobs:

- name: Build Rust project
run: |
# Copy frontend dist to desktop/dist (RustEmbed expects ../desktop/dist relative to terraphim_server)
mkdir -p desktop/dist
cp -r frontend-dist/* desktop/dist/ || echo "No frontend files found"

# Build with Docker
docker run --rm \
-v $PWD:/workspace \
Expand Down Expand Up @@ -273,7 +253,7 @@ jobs:

test:
runs-on: [self-hosted, Linux, X64]
needs: [setup, build-base-image, build-frontend, build-rust]
needs: [setup, build-base-image, build-rust]
if: needs.setup.outputs.should-build == 'true'
timeout-minutes: 20

Expand All @@ -289,12 +269,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- name: Download frontend artifacts
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: desktop/dist

- name: Download Docker image artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -322,7 +296,7 @@ jobs:
"

summary:
needs: [lint-and-format, build-frontend, build-rust, test]
needs: [lint-and-format, build-rust, test]
if: always()
runs-on: [self-hosted, Linux, X64]

Expand Down
41 changes: 11 additions & 30 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
frontend-changed: ${{ steps.changes.outputs.frontend }}
dockerfile-changed: ${{ steps.changes.outputs.dockerfile }}
docs-changed: ${{ steps.changes.outputs.docs }}
should-run-full-ci: ${{ steps.changes.outputs.should-run_full_ci }}
should-run-full-ci: ${{ steps.should_run.outputs.should_run_full_ci }}

steps:
- name: Pre-checkout cleanup
Expand Down Expand Up @@ -83,13 +83,13 @@ jobs:
echo "should_run_full_ci=false" >> $GITHUB_OUTPUT
fi

# Build frontend (required for RustEmbed)
# Build frontend (frontend-only changes)
build-frontend:
name: Build Frontend
runs-on: [self-hosted, Linux, X64]
timeout-minutes: 20
needs: changes
if: needs.changes.outputs.rust-changed == 'true'
if: needs.changes.outputs.frontend-changed == 'true'

steps:
- name: Pre-checkout cleanup
Expand Down Expand Up @@ -165,24 +165,18 @@ jobs:
name: Rust Clippy
runs-on: [self-hosted, Linux, X64]
timeout-minutes: 5
needs: [changes, build-frontend]
needs: [changes]
if: needs.changes.outputs.rust-changed == 'true'

steps:
- name: Pre-checkout cleanup
run: |
WORKDIR="${GITHUB_WORKSPACE:-$PWD}"
sudo rm -rf "${WORKDIR}/target" "${WORKDIR}/desktop/dist" || true
sudo rm -rf "${WORKDIR}/target" || true

- name: Checkout
uses: actions/checkout@v6

- name: Download frontend dist
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: desktop/dist

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -196,24 +190,18 @@ jobs:
name: Rust Compilation Check
runs-on: [self-hosted, Linux, X64]
timeout-minutes: 6
needs: [changes, build-frontend]
needs: [changes]
if: needs.changes.outputs.rust-changed == 'true'

steps:
- name: Pre-checkout cleanup
run: |
WORKDIR="${GITHUB_WORKSPACE:-$PWD}"
sudo rm -rf "${WORKDIR}/target" "${WORKDIR}/desktop/dist" || true
sudo rm -rf "${WORKDIR}/target" || true

- name: Checkout
uses: actions/checkout@v6

- name: Download frontend dist
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: desktop/dist

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -281,24 +269,18 @@ jobs:
name: Rust Unit Tests
runs-on: [self-hosted, Linux, X64]
timeout-minutes: 8
needs: [changes, rust-compile, build-frontend]
needs: [changes, rust-compile]
if: needs.changes.outputs.rust-changed == 'true' && needs.rust-compile.result == 'success'

steps:
- name: Pre-checkout cleanup
run: |
WORKDIR="${GITHUB_WORKSPACE:-$PWD}"
sudo rm -rf "${WORKDIR}/target" "${WORKDIR}/desktop/dist" || true
sudo rm -rf "${WORKDIR}/target" || true

- name: Checkout
uses: actions/checkout@v6

- name: Download frontend dist
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: desktop/dist

- name: Install system dependencies
run: |
sudo apt-get update -qq
Expand Down Expand Up @@ -405,7 +387,7 @@ jobs:
echo "| Job | Status | Notes |" >> $GITHUB_STEP_SUMMARY
echo "|-----|--------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Changes Detected | ${{ needs.changes.result }} | Rust: ${{ needs.changes.outputs.rust-changed }}, Frontend: ${{ needs.changes.outputs.frontend-changed }} |" >> $GITHUB_STEP_SUMMARY
echo "| Build Frontend | ${{ needs.build-frontend.result || 'skipped' }} | Frontend build for RustEmbed |" >> $GITHUB_STEP_SUMMARY
echo "| Build Frontend | ${{ needs.build-frontend.result || 'skipped' }} | Frontend build (frontend-only changes) |" >> $GITHUB_STEP_SUMMARY
echo "| Rust Format | ${{ needs.rust-format.result || 'skipped' }} | Code formatting check |" >> $GITHUB_STEP_SUMMARY
echo "| Rust Clippy | ${{ needs.rust-clippy.result || 'skipped' }} | Linting and warnings |" >> $GITHUB_STEP_SUMMARY
echo "| Rust Compile | ${{ needs.rust-compile.result || 'skipped' }} | Compilation verification |" >> $GITHUB_STEP_SUMMARY
Expand All @@ -414,8 +396,7 @@ jobs:
echo "| WASM Build | ${{ needs.wasm-build.result || 'skipped' }} | WebAssembly compilation |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

if [[ "${{ needs.build-frontend.result }}" == "failure" ]] || \
[[ "${{ needs.rust-format.result }}" == "failure" ]] || \
if [[ "${{ needs.rust-format.result }}" == "failure" ]] || \
[[ "${{ needs.rust-clippy.result }}" == "failure" ]] || \
[[ "${{ needs.rust-compile.result }}" == "failure" ]] || \
[[ "${{ needs.rust-tests.result }}" == "failure" ]]; then
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/python-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ jobs:
with:
enable-cache: true

- name: Install dependencies
run: uv pip install --system black ruff mypy

- name: Setup virtual environment
working-directory: crates/terraphim_automata_py
run: |
Expand All @@ -55,6 +52,7 @@ jobs:
else
source .venv/bin/activate
fi
uv pip install black ruff mypy

- name: Fix Black formatting
working-directory: crates/terraphim_automata_py
Expand All @@ -64,16 +62,28 @@ jobs:
else
source .venv/bin/activate
fi
uv run black python/
black python/
continue-on-error: false

- name: Lint with Ruff
working-directory: crates/terraphim_automata_py
run: ruff check python/
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
source .venv/Scripts/activate
else
source .venv/bin/activate
fi
ruff check python/

- name: Type check with mypy
working-directory: crates/terraphim_automata_py
run: mypy python/terraphim_automata/ --ignore-missing-imports
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
source .venv/Scripts/activate
else
source .venv/bin/activate
fi
mypy python/terraphim_automata/ --ignore-missing-imports
continue-on-error: true

test:
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,41 +40,6 @@ jobs:
sudo apt-get install -yqq --no-install-recommends \
libappindicator3-dev || true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Cache frontend dependencies
uses: actions/cache@v4
with:
path: |
desktop/node_modules
~/.cache/yarn
key: ${{ runner.os }}-frontend-${{ hashFiles('desktop/yarn.lock') }}
restore-keys: |
${{ runner.os }}-frontend-

- name: Cache frontend build
uses: actions/cache@v4
with:
path: desktop/dist
key: ${{ runner.os }}-frontend-dist-${{ hashFiles('desktop/src/**', 'desktop/package.json', 'desktop/vite.config.ts') }}
restore-keys: |
${{ runner.os }}-frontend-dist-

- name: Build frontend
working-directory: desktop
run: |
# Skip build if dist already exists from cache
if [ -f "dist/index.html" ]; then
echo "Frontend dist found in cache, skipping build"
else
echo "Building frontend..."
yarn install --frozen-lockfile
yarn build
fi

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
Loading
Loading