#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
Stop fat image enabling the AI engine by default (#8276)
Anthony Stirling77cfee2bc7b8
diff --git a/.github/aur/stirling-pdf-desktop/PKGBUILD b/.github/aur/stirling-pdf-desktop/PKGBUILDindex c39b1e847c..b7f2cd5beb 100644--- a/.github/aur/stirling-pdf-desktop/PKGBUILD+++ b/.github/aur/stirling-pdf-desktop/PKGBUILD@@ -1,6 +1,6 @@# Maintainer: Stirling PDF Inc <[email protected]>pkgname=stirling-pdf-desktop-pkgver=3.0.1+pkgver=3.0.2pkgrel=1pkgdesc="Locally hosted, web-based PDF manipulation tool (Tauri desktop app, official Stirling PDF Inc build)"arch=('x86_64')diff --git a/.github/aur/stirling-pdf-server-bin/PKGBUILD b/.github/aur/stirling-pdf-server-bin/PKGBUILDindex 76e70d47a4..e5ab26e285 100644--- a/.github/aur/stirling-pdf-server-bin/PKGBUILD+++ b/.github/aur/stirling-pdf-server-bin/PKGBUILD@@ -1,6 +1,6 @@# Maintainer: Stirling PDF Inc <[email protected]>pkgname=stirling-pdf-server-bin-pkgver=3.0.1+pkgver=3.0.2pkgrel=1pkgdesc="Locally hosted, web-based PDF manipulation tool (server JAR, prebuilt)"arch=('any')diff --git a/build.gradle b/build.gradleindex 8b85f97da7..7f2a17cac7 100644--- a/build.gradle+++ b/build.gradle@@ -121,7 +121,7 @@ springBoot {allprojects {group = 'stirling.software'- version = '3.0.1'+ version = '3.0.2'configurations.configureEach {exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat"diff --git a/docker/embedded/Dockerfile.fat b/docker/embedded/Dockerfile.fatindex 8689bfff3b..7823540b2e 100644--- a/docker/embedded/Dockerfile.fat+++ b/docker/embedded/Dockerfile.fat@@ -172,7 +172,6 @@ ENV VERSION_TAG=$VERSION_TAG \PGID=1000 \UMASK=022 \FAT_DOCKER=true \- AIENGINE_ENABLED=true \STIRLING_ENGINE_HOME=/opt/stirling-engine \STIRLING_ENGINE_PORT=5001 \STIRLING_ENGINE_WORKERS=2 \diff --git a/engine/pyproject.toml b/engine/pyproject.tomlindex a7e365a939..fbc6fe74d3 100644--- a/engine/pyproject.toml+++ b/engine/pyproject.toml@@ -21,6 +21,8 @@ engine = ["pydantic-ai-slim[anthropic,openai]>=1.107.2,<2.0.0","pydantic-settings>=2.15.0","python-dotenv>=1.2.3",+ # Lets the image's init script read aiEngine.enabled from settings.yml before starting us.+ "pyyaml>=6.0.3","sqlite-vec>=0.1.9","uvicorn>=0.52.4",]diff --git a/engine/uv.lock b/engine/uv.lockindex 15f5290a69..b1c842923a 100644--- a/engine/uv.lock+++ b/engine/uv.lock@@ -422,6 +422,7 @@ engine = [{ name = "pydantic-ai-slim", extra = ["anthropic", "openai"] },{ name = "pydantic-settings" },{ name = "python-dotenv" },+ { name = "pyyaml" },{ name = "sqlite-vec" },{ name = "uvicorn" },]@@ -480,6 +481,7 @@ engine = [{ name = "pydantic-ai-slim", extras = ["anthropic", "openai"], specifier = ">=1.107.2,<2.0.0" },{ name = "pydantic-settings", specifier = ">=2.15.0" },{ name = "python-dotenv", specifier = ">=1.2.3" },+ { name = "pyyaml", specifier = ">=6.0.3" },{ name = "sqlite-vec", specifier = ">=0.1.9" },{ name = "uvicorn", specifier = ">=0.52.4" },]diff --git a/frontend/editor/src-tauri/tauri.conf.json b/frontend/editor/src-tauri/tauri.conf.jsonindex 24942e93eb..3a7f4ff82a 100644--- a/frontend/editor/src-tauri/tauri.conf.json+++ b/frontend/editor/src-tauri/tauri.conf.json@@ -2,7 +2,7 @@"$schema": "../../node_modules/@tauri-apps/cli/config.schema.json","productName": "Stirling PDF","mainBinaryName": "Stirling-PDF",- "version": "3.0.1",+ "version": "3.0.2","identifier": "stirling.pdf.dev","build": {"frontendDist": "../dist",diff --git a/frontend/editor/src/core/testing/serverExperienceSimulations.ts b/frontend/editor/src/core/testing/serverExperienceSimulations.tsindex afc5574e69..ec000fffae 100644--- a/frontend/editor/src/core/testing/serverExperienceSimulations.ts+++ b/frontend/editor/src/core/testing/serverExperienceSimulations.ts@@ -38,7 +38,7 @@ const FREE_LICENSE_INFO: LicenseInfo = {const BASE_NO_LOGIN_CONFIG: AppConfig = {enableAnalytics: true,- appVersion: "3.0.1",+ appVersion: "3.0.2",serverCertificateEnabled: false,enableAlphaFunctionality: false,serverPort: 8080,diff --git a/frontend/editor/src/proprietary/testing/serverExperienceSimulations.ts b/frontend/editor/src/proprietary/testing/serverExperienceSimulations.tsindex 025d108fc0..45e5879a1a 100644--- a/frontend/editor/src/proprietary/testing/serverExperienceSimulations.ts+++ b/frontend/editor/src/proprietary/testing/serverExperienceSimulations.ts@@ -48,7 +48,7 @@ const FREE_LICENSE_INFO: LicenseInfo = {const BASE_NO_LOGIN_CONFIG: AppConfig = {enableAnalytics: true,- appVersion: "3.0.1",+ appVersion: "3.0.2",serverCertificateEnabled: false,enableAlphaFunctionality: false,enableDesktopInstallSlide: true,diff --git a/scripts/init-without-ocr.sh b/scripts/init-without-ocr.shindex 3cba516fac..d421f09849 100755--- a/scripts/init-without-ocr.sh+++ b/scripts/init-without-ocr.sh@@ -1385,8 +1385,31 @@ fi# Only the fat image ships it. The backend already defaults to http://localhost:5001.STIRLING_ENGINE_HOME="${STIRLING_ENGINE_HOME:-/opt/stirling-engine}"ENGINE_PID=""-if [ -x "$STIRLING_ENGINE_HOME/.venv/bin/python" ] && [ "${AIENGINE_ENABLED:-true}" = "false" ]; then- log "AI engine bundled but AIENGINE_ENABLED=false; not starting it."++# Prints aiEngine.enabled from a settings file, parsed as real YAML by the engine's own Python.+read_ai_engine_enabled() {+ [ -f "$1" ] || return+ env -u PYTHONPATH "$STIRLING_ENGINE_HOME/.venv/bin/python" -c '+import sys, yaml+doc = yaml.safe_load(open(sys.argv[1], encoding="utf-8"))+ai = doc.get("aiEngine") if isinstance(doc, dict) else None+if isinstance(ai, dict) and "enabled" in ai:+ print(str(ai["enabled"]).lower())+' "$1" 2>/dev/null+}++# Env wins over settings.yml, as in Spring.+ai_engine_wanted() {+ if [ -n "${AIENGINE_ENABLED:-}" ]; then+ [ "$(printf '%s' "$AIENGINE_ENABLED" | tr '[:upper:]' '[:lower:]')" = "true" ]+ return+ fi+ local settings="${STIRLING_BASE_PATH:+${STIRLING_BASE_PATH%/}/configs/settings.yml}"+ [ "$(read_ai_engine_enabled "${settings:-$CONFIG_FILE}")" = "true" ]+}++if [ -x "$STIRLING_ENGINE_HOME/.venv/bin/python" ] && ! ai_engine_wanted; then+ log "AI engine bundled but aiEngine.enabled is not true; not starting it (enabling it later needs a container restart)."elif [ -x "$STIRLING_ENGINE_HOME/.venv/bin/python" ]; thenlog "Starting bundled AI engine on port ${STIRLING_ENGINE_PORT:-5001}..."ENGINE_CMD=(