Compare commits
3 Commits
eae85ce989
...
6afcc00165
| Author | SHA1 | Date | |
|---|---|---|---|
| 6afcc00165 | |||
| 744d2419e6 | |||
| 8d8f56664d |
@@ -23,6 +23,8 @@ A custom Nix overlay and flake providing additional packages not found in upstre
|
||||
| `kubernetes-mcp-server` | Model Context Protocol (MCP) server for Kubernetes and OpenShift | MCP Servers |
|
||||
| `loop` | Corporate messenger for your team | Communication |
|
||||
| `radar` | Modern Kubernetes visibility — topology, event timeline, service traffic, resource browsing, Helm management, and GitOps support | Kubernetes |
|
||||
| `omniroute` | Unified AI router with 160+ providers, auto fallback, MCP/A2A, OpenAI-compatible APIs | AI LLM Gateway |
|
||||
| `relay-free-llm` | RESTful API to route user prompts to various AI model providers with automatic failover and intent-based routing | AI LLM Gateway |
|
||||
| `stakpak` | DevOps AI agent that generates infrastructure code, debugs Kubernetes, configures CI/CD, and automates deployments | AI Agents |
|
||||
|
||||
## Usage
|
||||
@@ -120,7 +122,9 @@ nix-overlay/
|
||||
│ ├── kubernetes-mcp-server/ # MCP server for Kubernetes and OpenShift
|
||||
│ ├── loop/ # Corporate messenger for your team
|
||||
│ ├── mcp-gateway/ # MCP protocol gateway
|
||||
│ ├── omniroute/ # Unified AI router with 160+ providers
|
||||
│ ├── radar/ # Kubernetes UI (topology, timeline, Helm, GitOps)
|
||||
│ ├── relay-free-llm/ # AI model provider routing gateway
|
||||
│ ├── skillsmcp/ # MCP server for Agent Skills
|
||||
│ └── stakpak/ # DevOps AI agent for infrastructure automation
|
||||
└── README.md
|
||||
|
||||
@@ -34,6 +34,7 @@ buildGoModule rec {
|
||||
];
|
||||
|
||||
passthru = {
|
||||
category = "AI Coding Agents";
|
||||
updateScript = [
|
||||
"nix-update"
|
||||
"--flake"
|
||||
|
||||
@@ -59,74 +59,77 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = freebuffSrc;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper patchelf ];
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
patchelf
|
||||
];
|
||||
|
||||
dontStrip = true;
|
||||
dontPatchelf = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
runHook preInstall
|
||||
|
||||
# Extract and patch the pre-built binary for NixOS compatibility
|
||||
mkdir -p "$out/bin" /tmp/fb-engine
|
||||
tar xzf "${binarySrc}" -C /tmp/fb-engine --strip-components=0
|
||||
cp /tmp/fb-engine/freebuff "$out/bin/freebuff-engine"
|
||||
chmod 755 "$out/bin/freebuff-engine"
|
||||
# Extract and patch the pre-built binary for NixOS compatibility
|
||||
mkdir -p "$out/bin" /tmp/fb-engine
|
||||
tar xzf "${binarySrc}" -C /tmp/fb-engine --strip-components=0
|
||||
cp /tmp/fb-engine/freebuff "$out/bin/freebuff-engine"
|
||||
chmod 755 "$out/bin/freebuff-engine"
|
||||
|
||||
patchelf \
|
||||
--set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" \
|
||||
--set-rpath "${glibc}/lib:" \
|
||||
"$out/bin/freebuff-engine"
|
||||
patchelf \
|
||||
--set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" \
|
||||
--set-rpath "${glibc}/lib:" \
|
||||
"$out/bin/freebuff-engine"
|
||||
|
||||
if [ -f /tmp/fb-engine/tree-sitter.wasm ]; then
|
||||
cp /tmp/fb-engine/tree-sitter.wasm "$out/bin/"
|
||||
fi
|
||||
if [ -f /tmp/fb-engine/tree-sitter.wasm ]; then
|
||||
cp /tmp/fb-engine/tree-sitter.wasm "$out/bin/"
|
||||
fi
|
||||
|
||||
rm -rf /tmp/fb-engine
|
||||
rm -rf /tmp/fb-engine
|
||||
|
||||
# Extract npm dependencies from pre-fetched tarballs
|
||||
extractNpmPkg() {
|
||||
local src="$1" target="$2"
|
||||
mkdir -p "$target"
|
||||
tar xzf "$src" -C "$target" --strip-components=1
|
||||
# Extract npm dependencies from pre-fetched tarballs
|
||||
extractNpmPkg() {
|
||||
local src="$1" target="$2"
|
||||
mkdir -p "$target"
|
||||
tar xzf "$src" -C "$target" --strip-components=1
|
||||
}
|
||||
|
||||
mkdir -p "$out/lib/node_modules/tar"
|
||||
mkdir -p "$out/lib/node_modules/chownr"
|
||||
mkdir -p "$out/lib/node_modules/minipass"
|
||||
mkdir -p "$out/lib/node_modules/minizlib"
|
||||
mkdir -p "$out/lib/node_modules/yallist"
|
||||
mkdir -p "$out/lib/node_modules/@isaacs/fs-minipass"
|
||||
|
||||
extractNpmPkg "${pkgTar}" "$out/lib/node_modules/tar"
|
||||
extractNpmPkg "${pkgChownr}" "$out/lib/node_modules/chownr"
|
||||
extractNpmPkg "${pkgMinipass}" "$out/lib/node_modules/minipass"
|
||||
extractNpmPkg "${pkgMinizlib}" "$out/lib/node_modules/minizlib"
|
||||
extractNpmPkg "${pkgYallist}" "$out/lib/node_modules/yallist"
|
||||
extractNpmPkg "${pkgFsMinipass}" "$out/lib/node_modules/@isaacs/fs-minipass"
|
||||
|
||||
# Launcher: run the patched engine directly from nix-store
|
||||
cat > "$out/bin/launcher.js" << LAUNCHER_EOF
|
||||
#!/usr/bin/env node
|
||||
const { spawn } = require('child_process');
|
||||
const TERMINAL_RESET = '\x1b[?1049l\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l\x1b[?2004l\x1b[?25h';
|
||||
const engine = '${placeholder "out"}/bin/freebuff-engine';
|
||||
|
||||
function reset() {
|
||||
try { if (process.stdin.isTTY && process.stdin.setRawMode) process.stdin.setRawMode(false); } catch(e){}
|
||||
try { if (process.stdout.isTTY) process.stdout.write(TERMINAL_RESET); } catch(e){}
|
||||
}
|
||||
|
||||
mkdir -p "$out/lib/node_modules/tar"
|
||||
mkdir -p "$out/lib/node_modules/chownr"
|
||||
mkdir -p "$out/lib/node_modules/minipass"
|
||||
mkdir -p "$out/lib/node_modules/minizlib"
|
||||
mkdir -p "$out/lib/node_modules/yallist"
|
||||
mkdir -p "$out/lib/node_modules/@isaacs/fs-minipass"
|
||||
const child = spawn(engine, process.argv.slice(2), { stdio: 'inherit' });
|
||||
child.on('exit', (code, signal) => { reset(); process.exit(signal ? 1 : code || 0); });
|
||||
child.on('error', (e) => { console.error('Failed to start freebuff:', e.message); process.exit(1); });
|
||||
LAUNCHER_EOF
|
||||
|
||||
extractNpmPkg "${pkgTar}" "$out/lib/node_modules/tar"
|
||||
extractNpmPkg "${pkgChownr}" "$out/lib/node_modules/chownr"
|
||||
extractNpmPkg "${pkgMinipass}" "$out/lib/node_modules/minipass"
|
||||
extractNpmPkg "${pkgMinizlib}" "$out/lib/node_modules/minizlib"
|
||||
extractNpmPkg "${pkgYallist}" "$out/lib/node_modules/yallist"
|
||||
extractNpmPkg "${pkgFsMinipass}" "$out/lib/node_modules/@isaacs/fs-minipass"
|
||||
makeWrapper "${nodejs}/bin/node" "$out/bin/freebuff" \
|
||||
--set NODE_PATH "$out/lib/node_modules" \
|
||||
--add-flags "$out/bin/launcher.js"
|
||||
|
||||
# Launcher: run the patched engine directly from nix-store
|
||||
cat > "$out/bin/launcher.js" << LAUNCHER_EOF
|
||||
#!/usr/bin/env node
|
||||
const { spawn } = require('child_process');
|
||||
const TERMINAL_RESET = '\x1b[?1049l\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l\x1b[?2004l\x1b[?25h';
|
||||
const engine = '${placeholder "out"}/bin/freebuff-engine';
|
||||
|
||||
function reset() {
|
||||
try { if (process.stdin.isTTY && process.stdin.setRawMode) process.stdin.setRawMode(false); } catch(e){}
|
||||
try { if (process.stdout.isTTY) process.stdout.write(TERMINAL_RESET); } catch(e){}
|
||||
}
|
||||
|
||||
const child = spawn(engine, process.argv.slice(2), { stdio: 'inherit' });
|
||||
child.on('exit', (code, signal) => { reset(); process.exit(signal ? 1 : code || 0); });
|
||||
child.on('error', (e) => { console.error('Failed to start freebuff:', e.message); process.exit(1); });
|
||||
LAUNCHER_EOF
|
||||
|
||||
makeWrapper "${nodejs}/bin/node" "$out/bin/freebuff" \
|
||||
--set NODE_PATH "$out/lib/node_modules" \
|
||||
--add-flags "$out/bin/launcher.js"
|
||||
|
||||
runHook postInstall
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "graphifyy";
|
||||
pname = "graphify";
|
||||
version = "0.7.10";
|
||||
pyproject = true;
|
||||
|
||||
|
||||
5
packages/omniroute/default.nix
Normal file
5
packages/omniroute/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
pkgs.callPackage ./package.nix { }
|
||||
88
packages/omniroute/package.nix
Normal file
88
packages/omniroute/package.nix
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
nodejs_22,
|
||||
makeBinaryWrapper,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "3.8.28";
|
||||
npmTarball = fetchurl {
|
||||
url = "https://registry.npmjs.org/omniroute/-/omniroute-${version}.tgz";
|
||||
hash = "sha256-/le4p5DSX5T7/srNuxVBLepzUPw8BgIVio+h0JnbfyY=";
|
||||
};
|
||||
in
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "omniroute";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "diegosouzapw";
|
||||
repo = "OmniRoute";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-BRvpbhhLTYj2rKw+nZloaXkpu3ySs5sWZo9425xvAPs=";
|
||||
};
|
||||
|
||||
nodejs = nodejs_22;
|
||||
|
||||
npmDepsHash = "sha256-Q1KLR3NkeFBB+tQzBazy+XWyIfpG8Magv+rdeqISNxw=";
|
||||
|
||||
# Skip Next.js build (requires network for Google Fonts).
|
||||
# Pre-built dist/ is copied from the npm tarball in preConfigure.
|
||||
dontNpmBuild = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
npmInstallFlags = [ "--ignore-scripts" ];
|
||||
|
||||
npmRebuildFlags = [ "--ignore-scripts" ];
|
||||
|
||||
env = {
|
||||
HOME = "$TMPDIR";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
mkdir -p _npm_tmp
|
||||
tar xzf ${npmTarball} -C _npm_tmp
|
||||
cp -r _npm_tmp/package/dist .
|
||||
rm -rf _npm_tmp
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/node_modules/omniroute
|
||||
cp -r . $out/lib/node_modules/omniroute/
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper "${nodejs_22}/bin/node" "$out/bin/omniroute" \
|
||||
--add-flags "$out/lib/node_modules/omniroute/bin/omniroute.mjs"
|
||||
makeWrapper "${nodejs_22}/bin/node" "$out/bin/omniroute-reset-password" \
|
||||
--add-flags "$out/lib/node_modules/omniroute/bin/reset-password.mjs"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
category = "AI LLM Gateway";
|
||||
updateScript = [
|
||||
"nix-update"
|
||||
"--flake"
|
||||
".#omniroute"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Unified AI router with 160+ providers, RTK+Caveman compression, auto fallback, MCP/A2A, OpenAI-compatible APIs";
|
||||
homepage = "https://github.com/diegosouzapw/OmniRoute";
|
||||
changelog = "https://github.com/diegosouzapw/OmniRoute/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "omniroute";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
@@ -25,6 +25,9 @@ let
|
||||
|
||||
postPatch = ''
|
||||
# Fix missing resolved URLs for packages under web/node_modules/
|
||||
# WARNING: This sed is version-specific — if upstream bumps a
|
||||
# transitive dep version, the patterns silently fail and the
|
||||
# build breaks. Update resolved/integrity values when bumping radar.
|
||||
# that are actually external npm packages (not workspace links).
|
||||
# Insert "resolved" and "integrity" after the "version" field
|
||||
# for each affected package using sed.
|
||||
|
||||
5
packages/relay-free-llm/default.nix
Normal file
5
packages/relay-free-llm/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
pkgs.callPackage ./package.nix { }
|
||||
107
packages/relay-free-llm/package.nix
Normal file
107
packages/relay-free-llm/package.nix
Normal file
@@ -0,0 +1,107 @@
|
||||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
let
|
||||
cerebras-cloud-sdk = python3Packages.buildPythonPackage rec {
|
||||
pname = "cerebras-cloud-sdk";
|
||||
version = "1.67.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/92/12/c201f07582068141e88f9a523ab02fdc97de58f2f7c0df775c6c52b9d8dd/cerebras_cloud_sdk-1.67.0.tar.gz";
|
||||
hash = "sha256-Ou1vhsbHqD7p1M+wiirOoInOvyr1uK7RFu95mVpPSBM=";
|
||||
};
|
||||
|
||||
build-system = with python3Packages; [
|
||||
hatchling
|
||||
hatch-fancy-pypi-readme
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's/hatchling==[0-9.]*/hatchling/' pyproject.toml
|
||||
'';
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
anyio
|
||||
distro
|
||||
httpx
|
||||
pydantic
|
||||
sniffio
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Python SDK for Cerebras AI platform";
|
||||
homepage = "https://github.com/CerebrasAI/cerebras-cloud-sdk-python";
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
};
|
||||
|
||||
pyDeps = with python3Packages; [
|
||||
fastapi
|
||||
uvicorn
|
||||
google-genai
|
||||
cerebras-cloud-sdk
|
||||
groq
|
||||
mistralai
|
||||
requests
|
||||
python-dotenv
|
||||
pydantic
|
||||
httpx
|
||||
];
|
||||
in
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "relay-free-llm";
|
||||
version = "0.1.0+unstable";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "msmarkgu";
|
||||
repo = "RelayFreeLLM";
|
||||
rev = "fea9e1642dbbc5c0980885f41b21aa04a30090a2";
|
||||
hash = "sha256-ZLAVhJFrVFjqAz0f4qOi2REBDccIc8g2H9b7dcqcYRU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
propagatedBuildInputs = pyDeps;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/lib/relay-free-llm
|
||||
cp -r src $out/lib/relay-free-llm/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
makeWrapper ${python3Packages.python.interpreter} $out/bin/relay-free-llm \
|
||||
--add-flags "-m src.server" \
|
||||
--prefix PYTHONPATH : "$out/lib/relay-free-llm:$PYTHONPATH"
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
passthru = {
|
||||
category = "AI LLM Gateway";
|
||||
updateScript = [
|
||||
"nix-update"
|
||||
"--flake"
|
||||
".#relay-free-llm"
|
||||
"--version=branch=main"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "RESTful API to route user prompts to various AI model providers";
|
||||
homepage = "https://github.com/msmarkgu/RelayFreeLLM";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "relay-free-llm";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user