Skip to content
Open
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
6 changes: 2 additions & 4 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
"mcpServers": {
"graphify": {
"type": "stdio",
"command": "uvx",
"command": "${CLAUDE_PLUGIN_ROOT}/bin/graphify-plugin",
"args": [
"--from",
"graphifyy[sql,mcp]==0.9.123",
"graphify-mcp"
"mcp"
]
}
}
Expand Down
29 changes: 24 additions & 5 deletions .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,34 @@
"repository": "https://github.com/Graphify-Labs/graphify",
"license": "Apache-2.0",
"skills": "./skills/",
"hooks": "./hooks/hooks.json",
"hooks": "./hooks/codex.json",
"mcpServers": {
"graphify": {
"type": "stdio",
"command": "uvx",
"command": "./bin/graphify-plugin",
"args": [
"--from",
"graphifyy[sql,mcp]==0.9.123",
"graphify-mcp"
"mcp"
],
"cwd": "./",
"env_vars": [
"GRAPHIFY_PLUGIN_HOME",
"GRAPHIFY_PLUGIN_PROJECT",
"GRAPHIFY_OUT",
"GRAPHIFY_MAX_WORKERS",
"GRAPHIFY_PLUGIN_LOG_LEVEL",
"NEO4J_PASSWORD",
"FALKORDB_PASSWORD",
"ANTHROPIC_API_KEY",
"OPENAI_API_KEY",
"GEMINI_API_KEY",
"GOOGLE_API_KEY",
"MOONSHOT_API_KEY",
"AWS_PROFILE",
"AWS_REGION",
"AWS_DEFAULT_REGION",
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
"AWS_SESSION_TOKEN"
]
}
}
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/plugin-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Managed plugin runtime

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
generated:
name: Generated artifacts and Windows launcher provenance
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
with:
python-version: "3.12"
- name: Check native and portable manifests, capability inventory and skills
run: |
uv run --frozen python scripts/sync_plugin_manifests.py --check
uv run --frozen python -m tools.skillgen --check
- name: Rebuild the Windows executable from its checked-in source
run: |
uv tool run --from ziglang==0.15.2 python -m ziglang cc -target x86_64-windows-gnu -Os -s -municode plugin/windows-launcher.c -o "$RUNNER_TEMP/graphify-plugin.exe"
cmp bin/graphify-plugin.exe "$RUNNER_TEMP/graphify-plugin.exe"

bootstrap:
name: Private bootstrap and MCP (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# This Python runs the test driver only. The driver isolates the plugin's
# PATH and poisons ambient Python settings to detect accidental fallback.
- name: Exercise the exact native launcher with a fresh private runtime
run: python tools/plugin_smoke.py

complete-profile:
name: Complete optional profile and canonical update
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install every declared extra and update a separate project
run: python tools/plugin_smoke.py --all-features
5 changes: 5 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Guard generated plugin and skill artifacts before publication
run: |
uv run --frozen --python 3.12 python scripts/sync_plugin_manifests.py --check
uv run --frozen --python 3.12 python -m tools.skillgen --check

- name: Build sdist + wheel
run: uv build --sdist --wheel

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ sudo apt install python3 python3-pip pipx

The official source repository is [Graphify-Labs/graphify](https://github.com/Graphify-Labs/graphify).

**Native Claude Code / Codex plugin:** the [managed plugin guide](docs/plugin-runtime.md)
describes installation, private runtime provisioning, optional features, migration,
updates and removal. The native plugin provisions Graphify's software dependencies;
the standalone package commands below are an alternative installation path.

The two-command quickstart is at the top of this README. This section covers the install methods, project-scoped installs, and every supported platform.

**Install methods** (pick one):
Expand Down
85 changes: 85 additions & 0 deletions bin/graphify-plugin
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/sh
# Bootstrap uses OS facilities only; never run an ambient Python, uv or Graphify.
set -eu
log() {
level=$1
shift
[ "$level" != DEBUG ] || [ "${GRAPHIFY_PLUGIN_LOG_LEVEL:-INFO}" = DEBUG ] || return 0
printf '%s %s [graphify-plugin] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$level" "$*" >&2
}
fail() { log ERROR "$*"; exit 1; }
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd -P)
. "$ROOT/plugin/runtime.env"
case "$(uname -s)" in
Darwin) os=apple-darwin; data="${HOME}/Library/Application Support" ;;
Linux) os=unknown-linux-gnu; data="${XDG_DATA_HOME:-${HOME}/.local/share}" ;;
*) fail "Unsupported bootstrap OS; see plugin runtime support documentation" ;;
esac
case "$(uname -m)" in
x86_64|amd64) arch=x86_64 ;;
aarch64|arm64) arch=aarch64 ;;
*) fail "Unsupported CPU architecture" ;;
esac
PLUGIN_HOME=${GRAPHIFY_PLUGIN_HOME:-$data/graphify-plugin}
case "$PLUGIN_HOME" in
/|"$HOME"|"$ROOT"|"$ROOT"/*) fail "Runtime home must be a dedicated directory outside the plugin cache" ;;
esac
mkdir -p "$PLUGIN_HOME"
PLUGIN_HOME=$(CDPATH= cd -- "$PLUGIN_HOME" && pwd -P)
owner="$PLUGIN_HOME/.graphify-plugin-owner"
if [ -e "$owner" ]; then
[ "$(cat "$owner")" = graphify-managed-plugin-runtime-v1 ] || fail "Incompatible runtime ownership marker"
elif [ -n "$(ls -A "$PLUGIN_HOME")" ]; then
fail "Runtime home is not empty and has no Graphify ownership marker"
else
printf %s graphify-managed-plugin-runtime-v1 > "$owner"
fi
[ ! -L "$PLUGIN_HOME/bootstrap" ] || fail "Private bootstrap directory must not be a symbolic link"
mkdir -p "$PLUGIN_HOME/bootstrap"
UV="$PLUGIN_HOME/bootstrap/uv"
asset="uv-$arch-$os.tar.gz"
case "$arch-$os" in
x86_64-unknown-linux-gnu) checksum=$UV_LINUX_X64_SHA256 ;;
aarch64-unknown-linux-gnu) checksum=$UV_LINUX_ARM64_SHA256 ;;
x86_64-apple-darwin) checksum=$UV_MACOS_X64_SHA256 ;;
aarch64-apple-darwin) checksum=$UV_MACOS_ARM64_SHA256 ;;
esac
if [ ! -x "$UV" ] || [ "$("$UV" --version 2>/dev/null | cut -d ' ' -f 2)" != "$UV_VERSION" ]; then
log INFO "Downloading the verified private runtime installer"
stage=$(mktemp -d "$PLUGIN_HOME/bootstrap/.download.XXXXXX")
trap 'rm -rf "$stage"' EXIT HUP INT TERM
url="https://github.com/astral-sh/uv/releases/download/$UV_VERSION/$asset"
if command -v curl >/dev/null 2>&1; then
curl --fail --silent --show-error --location --proto '=https' --tlsv1.2 "$url" -o "$stage/$asset" || fail "Runtime installer download failed"
elif command -v wget >/dev/null 2>&1; then
wget --https-only --quiet "$url" -O "$stage/$asset" || fail "Runtime installer download failed"
else
fail "This OS image has neither curl nor wget; provide its HTTPS download utility"
fi
if command -v sha256sum >/dev/null 2>&1; then
actual=$(sha256sum "$stage/$asset" | cut -d ' ' -f 1)
elif command -v shasum >/dev/null 2>&1; then
actual=$(shasum -a 256 "$stage/$asset" | cut -d ' ' -f 1)
else
fail "No OS SHA-256 verification utility is available"
fi
[ "$actual" = "$checksum" ] || fail "Runtime installer checksum mismatch"
tar -xzf "$stage/$asset" -C "$stage" || fail "Cannot extract the verified runtime installer"
chmod 755 "$stage/uv-$arch-$os/uv"
mv -f "$stage/uv-$arch-$os/uv" "$UV"
rm -rf "$stage"
trap - EXIT HUP INT TERM
fi
export UV_PYTHON_INSTALL_DIR="$PLUGIN_HOME/python"
export UV_CACHE_DIR="$PLUGIN_HOME/uv-cache"
export UV_PYTHON_PREFERENCE=only-managed
export UV_PYTHON_DOWNLOADS=automatic
export GRAPHIFY_PLUGIN_HOME="$PLUGIN_HOME"
unset PYTHONHOME PYTHONPATH VIRTUAL_ENV UV_PROJECT_ENVIRONMENT
if ! python=$("$UV" python find --no-project "$PYTHON_VERSION" 2>/dev/null); then
log INFO "Installing the private Python runtime"
"$UV" python install "$PYTHON_VERSION" --no-bin --no-registry --no-progress >&2 || fail "Private Python installation failed"
python=$("$UV" python find --no-project "$PYTHON_VERSION") || fail "Private Python was not found after installation"
fi
log DEBUG "Starting the versioned plugin runtime manager"
exec "$python" -I "$ROOT/graphify/plugin_runtime.py" --root "$ROOT" --home "$PLUGIN_HOME" --uv "$UV" "$@"
Binary file added bin/graphify-plugin.exe
Binary file not shown.
Loading
Loading