<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Emre Öcel]]></title><description><![CDATA[Emre Öcel]]></description><link>https://emreocell1219.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 20:44:10 GMT</lastBuildDate><atom:link href="https://emreocell1219.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to land a first PR on Praxi-Bot, a local-first AI agent written in Rust and Tauri]]></title><description><![CDATA[This is a guide to a first pull request on Praxi-Bot, not a product launch. The project is still alpha, the issues below were open when I wrote this, and…]]></description><link>https://emreocell1219.hashnode.dev/how-to-land-a-first-pr-on-praxi-bot-a-local-first-ai-agent-written-in-rust-and-tauri</link><guid isPermaLink="true">https://emreocell1219.hashnode.dev/how-to-land-a-first-pr-on-praxi-bot-a-local-first-ai-agent-written-in-rust-and-tauri</guid><category><![CDATA[Rust]]></category><category><![CDATA[Tauri]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[Emre Öcel]]></dc:creator><pubDate>Fri, 20 Nov 2026 17:09:03 GMT</pubDate><content:encoded><![CDATA[<p>This is a guide to a first pull request on <a href="https://github.com/emreocell/Praxi-Bot">Praxi-Bot</a>, not a product launch. The project is still alpha, the issues below were open when I wrote this, and the useful work is small and well specified.</p>
<h2>What it is</h2>
<p>Praxi-Bot is a self-hosted AI agent that runs on your machine. A Rust daemon (tokio and axum) listens on <code>127.0.0.1</code> only. You talk to it from a Tauri desktop app, the <code>bot</code> command line, or Telegram. A bot can read and edit files, run commands, drive a browser and operate desktop apps, but every tool call goes through a permission engine in the daemon. The model does not get a free pass.</p>
<p>You pick the model: Ollama or LM Studio locally, or a cloud provider such as Gemini, Anthropic, or any OpenAI-compatible server. Keys stay in the OS keychain or an encrypted file. There is no telemetry. The licence is Apache-2.0, and there is no CLA.</p>
<p>It is still early (<code>v0.1.0-alpha.2</code>), with no stable API. The packaged desktop app and installer are Windows only, and the installer is not code-signed yet. The CLI and daemon also build on Linux and macOS. Desktop control works on Windows and on Linux under X11 or Xvfb; Wayland sessions are refused, and the macOS desktop backend is a stub.</p>
<p>Building the daemon from source needs Rust 1.89+, Node 24+, pnpm 10+ and a C toolchain. You do not need that to try the UI, or to land a docs-only change.</p>
<h2>The approval gate is code, not a prompt</h2>
<p>The crate is <code>permission-engine</code>. <code>CONTRIBUTING.md</code> asks you to open an issue first if you want to change the chat screen, approvals or the host flows. The function to read is <code>PermissionResolver::resolve</code> in <code>crates/permission-engine/src/resolver.rs</code>. Every action is an <code>ActionRequest</code>; the resolver returns one of three decisions:</p>
<pre><code class="language-rust">pub enum Decision {
    /// The action is allowed without further approval.
    Allow,
    /// The action requires real-time human approval before proceeding.
    Ask { unsupported_limits: Option&lt;Limits&gt; },
    /// The action is unconditionally denied.
    Deny,
}
</code></pre>
<p>Policy is layered: a bot's rule for a category wins over the workspace default, and a sub-agent cannot exceed its parent bot's level. After that, two floors apply no matter what the policy says. Money can never be silently allowed, and a match on the never-list of catastrophic commands is always at least an ask:</p>
<pre><code class="language-rust">        // 4a. Money always requires at least Ask.
        if req.category == PermissionCategory::Money &amp;&amp; decision == Decision::Allow {
            decision = Decision::ask();
        }

        // 4b. Never-list match always requires Ask.
        if !req.raw_command.is_empty()
            &amp;&amp; self
                .never_list
                .matches_in(&amp;req.raw_command, req.cwd.as_deref())
        {
            decision = decision.stricter(Decision::ask());
        }
</code></pre>
<p>The never-list parses the command rather than pattern-matching on the raw string, and it is a safety net, not a sandbox. If you want to change any of this, open an issue first. The starter issue below does not touch it.</p>
<h2>Run the UI without Rust, Tauri or an API key</h2>
<p>The desktop UI is a Vite app. In development it binds to port 1420 (<code>strictPort: true</code> in <code>apps/desktop/ui/vite.config.ts</code>). Mock mode is opt-in via <code>?mock=1</code> in a dev build (<code>apps/desktop/ui/src/api/mockMode.ts</code>) and serves canned data, so you can click through chat, approvals and settings with no daemon.</p>
<p>From a clone of the repo:</p>
<pre><code class="language-sh">pnpm install --frozen-lockfile
pnpm --dir apps/desktop/ui dev
</code></pre>
<p>Then open <code>http://localhost:1420/?mock=1</code>. If you want the UI in English, add <code>&amp;lang=en</code>. When <code>lang</code> is omitted, mock mode currently defaults to Turkish (<code>tr</code>), which is easy to miss. Other query parameters are listed in <code>apps/desktop/ui/README.md</code>.</p>
<p>This is also how README screenshots are made. You do not need the real-app smoke run for a first docs or unit-test pull request.</p>
<h2>A real starter issue: tests for the skill-hub hashing helpers</h2>
<p><a href="https://github.com/emreocell/Praxi-Bot/issues/317">#317</a> is labelled <code>good first issue</code>, <code>skill: rust</code> and <code>size: S</code>. It was open and unclaimed when I wrote this. Comment "I would like to take this" on the issue before you start, and skip it if someone already has.</p>
<p>The skill hub hashes a skill's files into a fingerprint that the user approves at install time. If that hash changes by accident, existing approvals become meaningless. The helpers live in <code>crates/skills/src/hub/util.rs</code> and currently have no direct tests:</p>
<pre><code class="language-rust">/// Lowercase hex of `bytes`.
pub fn hex(bytes: &amp;[u8]) -&gt; String {
    let mut s = String::with_capacity(bytes.len() * 2);
    for b in bytes {
        let _ = write!(s, "{b:02x}");
    }
    s
}

/// SHA-256 of `bytes` as lowercase hex.
#[allow(dead_code)] // Kept for future debugging/inspection tools
pub fn sha256_hex(bytes: &amp;[u8]) -&gt; String {
    hex(&amp;Sha256::digest(bytes))
}

/// Content hash over `(relative path, length, bytes)` of `files`, in order.
pub fn hash_files(files: &amp;[TreeFile]) -&gt; Result&lt;String, HubError&gt; { /* ... */ }
</code></pre>
<p><code>hash_files</code> folds each file's relative path, a <code>0</code> separator, the little-endian length and the bytes, in slice order. The issue asks you to pin that down, not to change it. Do not edit non-test code, do not change the hash format, and leave the <code>#[allow(dead_code)]</code> on <code>sha256_hex</code> alone — your test will be its only caller.</p>
<p>The easiest place to add the tests is <code>crates/skills/src/hub/tests.rs</code>, which already imports <code>util</code> and already uses <code>tempfile::TempDir</code>. For <code>hex</code> and <code>sha256_hex</code> the issue gives known-answer vectors: empty input and <code>[0x00, 0x0f, 0xff]</code> for <code>hex</code>, and the usual SHA-256 of <code>""</code> and <code>"abc"</code> for <code>sha256_hex</code>. Check those two SHA-256 strings against any SHA-256 tool before you commit them.</p>
<p>For <code>hash_files</code>, build a few <code>TreeFile</code> values (<code>rel</code>, <code>path</code>, <code>size</code>) over files in a <code>TempDir</code>. Assert that the same input hashes the same way twice, that changing file bytes changes the hash, that changing only <code>rel</code> changes the hash, and that the hash is order-sensitive. The function's doc comment says "in order"; <code>walk</code> sorts by relative path before it calls it. The point of the test is to write that down, not to make the function order-independent.</p>
<p>Then run exactly what the issue asks for:</p>
<pre><code class="language-sh">cargo fmt --all -- --check
cargo clippy -p skills --all-targets -- -D warnings
cargo test -p skills
</code></pre>
<p>A typo or a docs fix can skip all of this and use GitHub's web editor. For this issue you need a Rust toolchain and a pull request that touches only tests. First-time contributors will see CI wait until a maintainer approves the first run; that is a safety measure, not a judgement of the patch. Pull requests are squash-merged.</p>
<h2>How to contribute</h2>
<p>The 10-minute path is in <a href="https://github.com/emreocell/Praxi-Bot/blob/main/docs/contributing/FIRST_PR.md"><code>docs/contributing/FIRST_PR.md</code></a>. Build, test and review conventions are in <a href="https://github.com/emreocell/Praxi-Bot/blob/main/CONTRIBUTING.md"><code>CONTRIBUTING.md</code></a>. Labelled starters are at <a href="https://github.com/emreocell/Praxi-Bot/contribute">github.com/emreocell/Praxi-Bot/contribute</a> and under the <a href="https://github.com/emreocell/Praxi-Bot/labels/good%20first%20issue"><code>good first issue</code></a> label.</p>
<p>Besides #317, other size-S issues that were open at the time of writing include the exit-code table in <code>bot --help</code> (<a href="https://github.com/emreocell/Praxi-Bot/issues/319">#319</a>), a runnable example for the English and Turkish schedule parser (<a href="https://github.com/emreocell/Praxi-Bot/issues/318">#318</a>), user-guide pages for keyboard shortcuts, backup and a glossary (<a href="https://github.com/emreocell/Praxi-Bot/issues/320">#320</a>, <a href="https://github.com/emreocell/Praxi-Bot/issues/321">#321</a>, <a href="https://github.com/emreocell/Praxi-Bot/issues/322">#322</a>), and a TypeScript warning for untranslated i18n values (<a href="https://github.com/emreocell/Praxi-Bot/issues/324">#324</a>). Claim one issue per pull request, and check that it is still open before you start.</p>
<p>If you want to work on the chat screen, the approval flow or host pairing, discuss it in an issue first. Everything else that is labelled and small is meant to be taken.</p>
]]></content:encoded></item></channel></rss>