From f52765c34c43b778ed0fc8592bc73c0b7d940ff9 Mon Sep 17 00:00:00 2001 From: Maksym Yezhov Date: Wed, 1 Jul 2026 11:36:38 -0700 Subject: [PATCH] chore: remove vendor locked variables --- README.md | 2 +- apps/server/package.json | 2 +- .../server/src/pi/extensions/proxyProvider.ts | 19 +------ docker/instance.sh | 50 ------------------- 4 files changed, 3 insertions(+), 70 deletions(-) delete mode 100644 docker/instance.sh diff --git a/README.md b/README.md index 2698b56..01e4c6e 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ See [`apps/web/src/shared/ui/DESIGN_SYSTEM.md`](apps/web/src/shared/ui/DESIGN_SY ```bash pnpm install -pnpm dev # runs server + web via Turbo +PI_PROXY_URL="https://proxy..." PI_PROXY_API_KEY="...." pnpm dev ``` `pnpm dev` sets the session/bundle/memory paths to local gitignored folders (`.sessions`, diff --git a/apps/server/package.json b/apps/server/package.json index f14fd73..53c1677 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -5,7 +5,7 @@ "type": "module", "prettier": "@tangent/build/prettier", "scripts": { - "dev": "AUTH_JWT_TOKEN_COOKIE_NAME=OKTASSO_TOKEN tsx watch --tsconfig ./tsconfig.json src/index.ts", + "dev": "tsx watch --tsconfig ./tsconfig.json src/index.ts", "seed": "tsx --tsconfig ./tsconfig.json src/seed.ts", "build": "node build.mjs", "lint": "eslint .", diff --git a/apps/server/src/pi/extensions/proxyProvider.ts b/apps/server/src/pi/extensions/proxyProvider.ts index 0c2d44a..31f025c 100644 --- a/apps/server/src/pi/extensions/proxyProvider.ts +++ b/apps/server/src/pi/extensions/proxyProvider.ts @@ -8,29 +8,12 @@ * is therefore excluded from our type-check (`@ts-nocheck`) and is never * imported by the server itself — only passed as a path to the Pi subprocess, * which loads it with jiti. - * - * Why this exists: locally, Pi reaches the LLM gateway via an auto-discovered - * extension in `~/.pi/agent/extensions/` (the `shopify-proxy` package) that - * calls `pi.registerProvider(...)` with the proxy base URL and - * `apiKey: "$PI_PROXY_API_KEY"`. In the container `HOME=/tmp`, so that config - * directory does not exist and no provider points at the proxy — Pi then can't - * reach any model and the agent returns nothing. - * - * This extension reproduces that provider registration, deriving the proxy base - * from `PI_PROXY_URL` (defaulting to the Shopify proxy so local behavior is - * unchanged). The actual API key is interpolated by Pi from `$PI_PROXY_API_KEY` - * at request time. */ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; -const DEFAULT_PROXY_URL = "https://proxy.shopify.ai"; - // Trailing slash is stripped so per-provider paths concatenate cleanly. -const PROXY_URL = (process.env.PI_PROXY_URL ?? DEFAULT_PROXY_URL).replace( - /\/+$/, - "", -); +const PROXY_URL = (process.env.PI_PROXY_URL ?? "").replace(/\/+$/, ""); export default function (pi: ExtensionAPI) { // Managed routes mirror the local shopify-proxy extension so selecting a diff --git a/docker/instance.sh b/docker/instance.sh deleted file mode 100644 index 92b2043..0000000 --- a/docker/instance.sh +++ /dev/null @@ -1,50 +0,0 @@ -# Install proxy CA certificates -# apk --no-cache add ca-certificates -# update-ca-certificates -# Installing certificate manually -cat /usr/local/share/ca-certificates/* >> /etc/ssl/certs/ca-certificates.crt -# ! Python're request library ignores the system's CA certificate bundle and uses a built-in bundle. See https://stackoverflow.com/a/42982144/1497385 -# Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate -# Fixing that by overriding the CA bundle. -export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt -export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt - -# Install uv -apt-get update && apt-get install -y curl -curl -LsSf https://astral.sh/uv/install.sh | sh - -export PATH="$PATH:$HOME/.local/bin" - -# Install tangle-deploy -uv tool install /tangent/packages_to_install/python/tangle_deploy* --with /tangent/packages_to_install/python/rowlet* -# ! Need to configure tangle-deploy auth, otherwise it tries using interactive Minerva auth and gets stuck forever. -export TANGLE_AUTH="DUMMY_USER:DUMMY_PASSWORD" - -# [Not] Installing Google Cloud SDK in background -apt-get install -y python3 bash -#export PATH="$PATH:/root/google-cloud-sdk/bin/" -# curl -sSL https://sdk.cloud.google.com | bash 2>/dev/null && /root/google-cloud-sdk/bin/gcloud auth list && /root/google-cloud-sdk/bin/gcloud config set core/custom_ca_certs_file /etc/ssl/certs/ca-certificates.crt & -# # == tangent-service-account@shopify-skypilot-clusters.iam.gserviceaccount.com - -# Activating proxy (The `http_*` casing matters for curl). https://superuser.com/questions/876100/https-proxy-vs-https-proxy -# gcloud CLI only supports HTTP proxies https://docs.cloud.google.com/sdk/docs/proxy-settings#proxy_configuration -# export HTTPS_PROXY=https://localhost:8080 -export HTTPS_PROXY=http://localhost:8080 -export http_proxy=http://localhost:8080 -export NODE_USE_ENV_PROXY=1 -export NO_PROXY=localhost,127.0.0.1 -export no_proxy=localhost,127.0.0.1 - -# Must differ from the proxy container's {DEFAULT_PROXY_PORT}. -export PORT=8000 -export PI_DEBUG=true -export PI_PROXY_API_KEY=redacted - -export SESSIONS_ROOT=/root/workspace/.sessions -export SESSIONS_DB=/root/workspace/.sessions/tangent.db -export AGENT_BUNDLES_ROOT=/root/workspace/.agent-bundles -export GLOBAL_MEMORY_DIR=/root/workspace/memory -export AUTH_JWT_TOKEN_COOKIE_NAME=MINERVA_TOKEN - -cd /app -exec /app/docker/docker-entrypoint.sh \ No newline at end of file