Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand Down
19 changes: 1 addition & 18 deletions apps/server/src/pi/extensions/proxyProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 0 additions & 50 deletions docker/instance.sh

This file was deleted.

Loading