1
0
Fork 0

this got @gmail.com banned on kilo.ai

This commit is contained in:
Arthur K. 2026-03-12 04:46:48 +03:00
parent 84ad98b4d3
commit 1861b212c2
Signed by: wzray
GPG key ID: B97F30FDC4636357
19 changed files with 669 additions and 571 deletions

46
appimage/AppRun Executable file
View file

@ -0,0 +1,46 @@
#!/bin/sh
set -e
APPDIR="$(dirname "$(readlink -f "$0")")"
export PATH="$APPDIR/usr/bin:$PATH"
export EXTRAS_DIR="${EXTRAS_DIR:-$APPDIR/opt/kilocode/extras}"
export PLAYWRIGHT_BROWSERS_PATH="${PLAYWRIGHT_BROWSERS_PATH:-$APPDIR/opt/patchright-browsers}"
export CHROME_PATH="${CHROME_PATH:-$APPDIR/opt/google/chrome/chrome}"
if [ -z "${HOME}" ] || [ ! -w "${HOME}" ]; then
export HOME="/tmp/kilocode-home"
fi
mkdir -p "$HOME"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
mkdir -p "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$XDG_DATA_HOME"
# Ensure DATA_DIR is writable (default to current directory)
if [ -z "${DATA_DIR}" ]; then
DATA_DIR="$PWD/data"
fi
if [ ! -d "$DATA_DIR" ] || [ ! -w "$DATA_DIR" ]; then
DATA_DIR="$PWD/data"
fi
mkdir -p "$DATA_DIR"
export DATA_DIR
VENV_DIR="$APPDIR/opt/kilocode/.venv"
PY_BASE="$APPDIR/root/.local/share/uv/python/cpython-3.14.3-linux-x86_64-gnu"
PYTHON_BIN="$PY_BASE/bin/python3.14"
export VIRTUAL_ENV="$VENV_DIR"
export PYTHONHOME="$PY_BASE"
export PYTHONPATH="$VENV_DIR/lib/python3.14/site-packages"
SERVER_PY="$APPDIR/opt/kilocode/src/server.py"
if [ ! -x "$PYTHON_BIN" ]; then
echo "Python runtime not found: $PYTHON_BIN" >&2
exit 1
fi
exec "$PYTHON_BIN" -u "$SERVER_PY"

52
appimage/Dockerfile Normal file
View file

@ -0,0 +1,52 @@
FROM debian:13-slim
ENV DEBIAN_FRONTEND=noninteractive
ARG UBLOCK_VERSION=1.69.0
ARG PATCHRIGHT_VERSION=1.58.2
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
file \
python3 \
python3-venv \
python3-pip \
zip \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
RUN python3 -m venv /opt/uv-bootstrap && \
/opt/uv-bootstrap/bin/pip install --no-cache-dir uv
COPY pyproject.toml uv.lock ./
RUN UV_CACHE_DIR=/opt/uv-cache \
UV_PROJECT_ENVIRONMENT=/opt/build-deps \
/opt/uv-bootstrap/bin/uv sync --frozen --no-dev
RUN python3 -m venv /opt/patchright-venv && \
/opt/patchright-venv/bin/pip install --no-cache-dir "patchright==${PATCHRIGHT_VERSION}" && \
PLAYWRIGHT_BROWSERS_PATH=/opt/patchright-browsers /opt/patchright-venv/bin/patchright install chrome && \
ls -la /opt/google/chrome/ && \
ls -la /opt/patchright-browsers/
RUN mkdir -p /opt/assets && \
curl -fsSL -o /opt/assets/ublock_origin.xpi \
"https://github.com/gorhill/uBlock/releases/download/${UBLOCK_VERSION}/uBlock0_${UBLOCK_VERSION}.firefox.signed.xpi"
RUN curl -fsSL -o /opt/appimagetool.AppImage \
"https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" && \
chmod +x /opt/appimagetool.AppImage
COPY src/ ./src/
COPY appimage/ ./appimage/
COPY extras/extension/ ./extras/extension/
RUN cd extras/extension && zip -r /opt/assets/dark-reader.xpi . && cd /build
RUN chmod +x ./appimage/build_in_container.sh
CMD ["./appimage/build_in_container.sh"]

16
appimage/build_appimage.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
set -e
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
OUT_DIR="$ROOT_DIR/dist"
mkdir -p "$OUT_DIR"
docker build -f "$ROOT_DIR/appimage/Dockerfile" -t megacode-appimage-builder "$ROOT_DIR"
docker run --rm \
-e UBLOCK_VERSION="${UBLOCK_VERSION:-1.69.0}" \
-v "$OUT_DIR:/out" \
megacode-appimage-builder
echo "Done: $OUT_DIR/megacode.appimage"

45
appimage/build_in_container.sh Executable file
View file

@ -0,0 +1,45 @@
#!/bin/sh
set -e
APPDIR="/AppDir"
OUTDIR="/out"
mkdir -p "$APPDIR/usr/bin" "$APPDIR/usr/lib" "$APPDIR/opt/kilocode" "$OUTDIR"
cp -a /opt/assets/dark-reader.xpi /tmp/dark-reader.xpi
cp -a /opt/assets/ublock_origin.xpi /tmp/ublock_origin.xpi
cp -a /build/src "$APPDIR/opt/kilocode/src"
mkdir -p "$APPDIR/opt/kilocode/extras/extensions"
cp -a /tmp/dark-reader.xpi "$APPDIR/opt/kilocode/extras/extensions/dark-reader.xpi"
cp -a /tmp/ublock_origin.xpi "$APPDIR/opt/kilocode/extras/extensions/ublock_origin.xpi"
export UV_CACHE_DIR="/opt/uv-cache"
export UV_PYTHON_DOWNLOADS=auto
export UV_PYTHON_PREFERENCE=managed
/opt/uv-bootstrap/bin/uv venv --python 3.14 "$APPDIR/opt/kilocode/.venv"
cd /build
UV_PROJECT_ENVIRONMENT="$APPDIR/opt/kilocode/.venv" /opt/uv-bootstrap/bin/uv sync --frozen --no-dev
mkdir -p "$APPDIR/opt/patchright-browsers"
cp -a /opt/patchright-browsers/* "$APPDIR/opt/patchright-browsers/" || true
mkdir -p "$APPDIR/opt/google"
cp -a /opt/google/chrome "$APPDIR/opt/google/" || { echo "ERROR: Chrome not found at /opt/google/chrome"; exit 1; }
if [ -d "/root/.local/share/uv/python" ]; then
mkdir -p "$APPDIR/root/.local/share/uv"
cp -a /root/.local/share/uv/python "$APPDIR/root/.local/share/uv/"
fi
cp /build/appimage/AppRun "$APPDIR/AppRun"
cp /build/appimage/kilocode.desktop "$APPDIR/kilocode.desktop"
cp /build/appimage/kilocode.svg "$APPDIR/kilocode.svg"
chmod +x "$APPDIR/AppRun"
rm -f "$OUTDIR/megacode.appimage"
ARCH=x86_64 /opt/appimagetool.AppImage --appimage-extract-and-run \
"$APPDIR" "$OUTDIR/megacode.appimage"
echo "AppImage built at $OUTDIR/megacode.appimage"

View file

@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Kilocode Service
Exec=kilocode
Icon=kilocode
Categories=Utility;
Terminal=true

6
appimage/kilocode.svg Normal file
View file

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
<rect width="256" height="256" rx="40" ry="40" fill="#1b1f24"/>
<rect x="48" y="56" width="160" height="144" rx="18" ry="18" fill="#2d333b"/>
<path d="M88 96h80v16H88zM88 128h80v16H88zM88 160h48v16H88z" fill="#8fb0ff"/>
<circle cx="176" cy="168" r="16" fill="#66d9a8"/>
</svg>

After

Width:  |  Height:  |  Size: 373 B