No description
  • Rust 95.8%
  • Lua 4.2%
Find a file
Markus Maiwald f656cdb89e
release: v0.2.1 — experimental DiffRenderer + FragmentRenderer
Patch bump promoting [Unreleased] → [0.2.1] - 2026-05-09. Two
namespace-isolated experimental trait surfaces added:

- experimental_diff_renderer: DiffRenderer trait + DiffRequest /
  Response / Line / Kind / View. Runtime-agnostic diff rendering
  contract. Consumer: progit-syntax-diff plugin.

- experimental_fragments: FragmentRenderer trait + FragmentContext /
  RenderFragment / FragmentAction / FRAGMENT_SLOT_REGISTRY const.
  Mechanism for plugins to inject UI fragments into existing TUI
  widgets. Slot allowlist enforced. Consumer: progit-pr-stacker.

Both modules ship under the experimental_* namespace per the "never
stabilise an interface before a real consumer has used it in
production" rule. Promotion to traits::DiffRenderer /
traits::FragmentRenderer lands once consumer plugins exercise the
API in a shipped release.

Non-breaking, additive only. 6 unit tests added (serde round-trips
+ slot-registry validation). cargo check clean.
2026-05-09 01:52:53 +02:00
docs feat: initial ProGit Plugin SDK with LuaJIT runtime 2025-12-11 01:46:56 +01:00
examples feat(sdk)!: v0.2 — canonical event surface and typed manifest 2026-05-07 12:17:16 +02:00
src feat(sdk): add experimental DiffRenderer and FragmentRenderer traits 2026-05-08 19:07:41 +02:00
stubs docs(sdk): LuaCATS stubs, integration harness, CHANGELOG v0.2.0 2026-05-07 12:17:47 +02:00
tests test(sdk): harness coverage for syntax-highlight v1.0 2026-05-07 14:48:28 +02:00
.gitignore chore(gitignore): firewall agent dirs and wrangler cache 2026-05-07 13:59:19 +02:00
Cargo.toml release: v0.2.1 — experimental DiffRenderer + FragmentRenderer 2026-05-09 01:52:53 +02:00
CHANGELOG.md release: v0.2.1 — experimental DiffRenderer + FragmentRenderer 2026-05-09 01:52:53 +02:00
CONTRIBUTING.md fix: standardize all URLs to git.sovereign-society.org 2026-03-15 15:02:01 +01:00
LICENSE legal: adopt LSL-1.0 for SDK, LUL-1.0 for marketplace, add PLUGIN_LICENSING.md 2026-01-05 21:13:52 +01:00
LICENSE_MARKETPLACE legal: adopt LSL-1.0 for SDK, LUL-1.0 for marketplace, add PLUGIN_LICENSING.md 2026-01-05 21:13:52 +01:00
LICENSE_VENTURE legal: adopt LSL-1.0 for SDK, LUL-1.0 for marketplace, add PLUGIN_LICENSING.md 2026-01-05 21:13:52 +01:00
PLUGIN_LICENSING.md legal: adopt LSL-1.0 for SDK, LUL-1.0 for marketplace, add PLUGIN_LICENSING.md 2026-01-05 21:13:52 +01:00
README.md fix: standardize all URLs to git.sovereign-society.org 2026-03-15 15:02:01 +01:00
SETUP_COMPLETE.md feat: initial ProGit Plugin SDK with LuaJIT runtime 2025-12-11 01:46:56 +01:00

ProGit Plugin SDK

License Crates.io

LSL-1.0 licensed SDK for building ProGit plugins in Lua or WASM.

Why LSL-1.0 (Sovereign)?

This SDK is intentionally licensed under LSL-1.0 (file-level copyleft) to:

  • Allow proprietary plugins - Your app code stays yours
  • Protect the engine - Modifications to SDK files must be shared back
  • Patent disarmament - "Cold War" clause for mutual protection
  • Legal certainty - Governed by Dutch Law (Amsterdam)

The ProGit TUI core uses LCL-1.0 (strong copyleft). Your plugins do NOT inherit this because they link to the SDK, not the Core.

See PLUGIN_LICENSING.md for details.


Features

  • 🦀 Rust-native - Type-safe plugin trait system
  • 🌙 Lua support - Lightweight scripting for simple integrations
  • 🕸️ WASM support - High-performance compiled plugins with sandboxing
  • 🔌 Hook system - Issue lifecycle, sync, merge requests, custom commands
  • 🛡️ Sandboxed - Plugins run in isolated environments
  • 📦 Zero dependencies on ProGit core - Clean separation

Quick Start

Lua Plugin

use progit_plugin_sdk::prelude::*;

let script = r#"
    plugin = {
        name = "hello-world",
        version = "1.0.0",
        author = "Your Name",
        hooks = {
            on_issue_created = true,
        }
    }
    
    function on_issue_created(issue)
        print("New issue: " .. issue.title)
        return { success = true }
    end
"#;

let mut plugin = LuaPlugin::from_string(script, "hello")?;
plugin.on_issue_created(&issue)?;

WASM Plugin

use progit_plugin_sdk::prelude::*;

let plugin = WasmPlugin::load("plugins/my_plugin.wasm")?;
plugin.on_issue_created(&issue)?;

Plugin Structure

Lua Plugin Template

-- SPDX-License-Identifier: Apache-2.0

plugin = {
    name = "my-plugin",
    version = "1.0.0",
    author = "Your Name",
    description = "Plugin description",
    hooks = {
        on_issue_created = true,
        on_issue_updated = true,
    }
}

function init()
    -- Called once when plugin loads
    print("Plugin initialized!")
end

function on_issue_created(issue)
    -- Called when an issue is created
    print("New issue: " .. issue.title)
    return { success = true }
end

function on_issue_updated(issue)
    -- Called when an issue is updated
    return { success = true }
end

WASM Plugin Template

See examples/wasm_plugin_template/ for a complete Rust → WASM plugin example.


Available Hooks

Hook Trigger Data
on_issue_created Issue created Issue
on_issue_updated Issue updated Issue
on_issue_deleted Issue deleted { id: string }
on_status_changed Issue status changed Issue
on_sync_push Before sync push Issue[]
on_sync_pull After sync pull Issue[]
on_merge_request_created MR created MergeRequest
on_command(name) Custom command Custom

Examples

Run examples:

cargo run --example lua_hello_world

Architecture

┌──────────────────────────────────────────────────────────────┐
│  ProGit TUI Core (Rust)                                      │
│  LCL-1.0 Licensed (Strong Copyleft)                          │
│  NO proprietary code linked                                  │
└───────────────────────────┬──────────────────────────────────┘
                            │
                   progit-plugin-sdk (LSL-1.0)
                            │
┌───────────────────────────┴──────────────────────────────────┐
│  Community Plugins (Lua/WASM)                                │
│  ANY License (LCL/LSL/LUL/LVL or Proprietary)                │
│  Loaded at RUNTIME via SDK                                   │
└──────────────────────────────────────────────────────────────┘

Key Points:

  • SDK is LSL-1.0 - "Commercial Bridge" allows proprietary plugins
  • ProGit core is LCL-1.0 - strong copyleft, source always visible
  • No static linking - plugins loaded at runtime
  • Clean API boundary - zero license contagion for your code

Plugin Context

Plugins receive a PluginContext on initialization:

pub struct PluginContext {
    pub repo_path: String,
    pub user: Option<String>,
    pub env: HashMap<String, String>,
    pub config: HashMap<String, serde_json::Value>,
}

Access in Lua:

function init()
    print("Repository: " .. context.repo_path)
    print("User: " .. (context.user or "unknown"))
end

Issue Schema

pub struct Issue {
    pub id: String,
    pub title: String,
    pub description: String,
    pub status: String,              // "backlog" | "in-progress" | "done"
    pub tags: Vec<String>,
    pub assignee: Option<String>,
    pub effort: Option<u8>,          // 1-5
    pub blocked: bool,
    pub created: String,             // ISO 8601
    pub updated: String,             // ISO 8601
    pub due: Option<String>,         // ISO 8601
    pub metadata: HashMap<String, serde_json::Value>,
}

Building Plugins

Lua Plugins

Just write .lua files! No build step required.

WASM Plugins

# Install WASM target
rustup target add wasm32-wasi

# Build your plugin
cd my-plugin
cargo build --target wasm32-wasi --release

# Plugin is at: target/wasm32-wasi/release/my_plugin.wasm

Contributing

Built with ❤️ in Rust.

git clone https://git.sovereign-society.org/ProGit/progit-plugin-sdk
cd progit-plugin-sdk
cargo test
cargo fmt

License: LSL-1.0 (Sovereign)


License

Copyright (c) 2025 Markus Maiwald

Licensed under the Libertaria Sovereign License, Version 1.0. See LICENSE for details.

Plugin authors: You may license your plugins under ANY terms. See PLUGIN_LICENSING.md.


Made with 🔥 by developers, for developers.