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
Empty file added .codex
Empty file.
24 changes: 21 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,30 @@ VITE_WALLETCONNECT_PROJECT_ID=your-walletconnect-project-id

# LLM / Yield Concierge AI recommendations
# GEMINI_API_KEY — Google AI Studio key for Gemini
# GEMINI_MODEL — Primary model (default: gemini-3.1-pro-preview)
# GEMINI_FALLBACK_MODEL — Fallback on 429/503 (default: gemini-2.5-flash)
# GEMINI_MODEL — Primary model (default: gemini-2.5-flash-lite)

# LLM mode toggle (browser-side)
# VITE_LLM_MODE — Set to "fixture" to use bundled fixtures instead of live LLM (default: live)

# Shared proxy secret (optional — when set, lifi-composer and llm-recommend
# proxies require this value in the x-proxy-secret header instead of origin checks)
# proxies require this value in the x-proxy-secret header instead of origin checks).
# WARNING: setting this disables browser callers — proxyHeaders() does not send
# x-proxy-secret. Use only for server-to-server callers.
# PROXY_SECRET — Random secret string

# Origin allowlist for lifi-composer and llm-recommend proxies
# ALLOWED_ORIGINS — Comma-separated origins (e.g. https://yourdomain.com,https://preview.yourdomain.com)

# ---- Simulator-bridge runtime tuning (read by scripts/simulator-bridge.mjs etc.) ----
# These are typically left at defaults; tune only if you understand the impact.
# SIMULATOR_BRIDGE_PORT, EDB_WS_PORT
# TRACE_DETAIL_TTL_MS, TRACE_DETAIL_MAX_ENTRIES, TRACE_DETAIL_MAX_TOTAL_BYTES
# TRACE_DETAIL_GZIP_MIN_BYTES, TRACE_DETAIL_STRIP_OPCODE_LINES
# TRACE_DETAIL_STRIP_OPCODE_TRACE, TRACE_DETAIL_COMPACT_ARTIFACTS
# SIM_TRACE_V2_BRIDGE_JS_FALLBACK, SIM_TRACE_V2_LITE_TRANSPORT
# KEEP_ALIVE_IDLE_TTL_MS, KEEP_ALIVE_SWEEP_INTERVAL_MS, KEEP_ALIVE_MAX_SESSIONS
# KEEP_ALIVE_CLEAN_STALE_ON_STARTUP, KEEP_ALIVE_INCREMENTAL_PARSE_MAX_BYTES
# KEEP_ALIVE_SIM_TIMEOUT_MS, SIMULATION_TIMEOUT_MS, MAX_CONCURRENT_SIMULATIONS
# SIMULATION_QUEUE_MAX, SIMULATION_QUEUE_TIMEOUT_MS
# MEMORY_PRESSURE_THRESHOLD_MB, MEMORY_PRESSURE_HARD_LIMIT_MB
# SIMULATOR_BUILD_PROFILE, SIMULATOR_BINARY, EDB_BINARY
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ edb
*test*
*Test*
*TEST*
*.spec.ts
*.spec.tsx
*.spec.js
*.spec.mjs
*.spec.mts
/tmp
video/out
.superpowers
Expand Down
16 changes: 12 additions & 4 deletions api/edb/[...path].ts → api/edb-proxy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { VercelRequest, VercelResponse } from "@vercel/node";
import { maybeInjectDefaultEtherscanKey } from "../edbShared.js";
import { maybeInjectDefaultEtherscanKey } from "./edbShared.js";

export const config = {
api: { bodyParser: false },
Expand Down Expand Up @@ -104,9 +104,17 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
return res.status(405).json({ error: "method_not_allowed" });
}

// Extract sub-path from URL — more reliable than req.query.path across Vercel runtimes
const urlPath = (req.url || "").split("?")[0];
const subPath = urlPath.replace(/^\/api\/edb\/?/, "");
// Extract sub-path from the `path` query param populated by the Vercel
// rewrite rule in vercel.json. Vercel's file-based catch-all routing
// (`api/edb/[...path].ts`) does not reliably match multi-segment requests
// under `/api/edb/*` on this project, so we route via an explicit rewrite
// that mirrors the lifi-composer pattern.
const pathParam = req.query?.path;
const subPath = Array.isArray(pathParam)
? pathParam.join("/")
: typeof pathParam === "string"
? pathParam
: "";

// Validate each path segment
const parts = subPath ? subPath.split("/") : [];
Expand Down
122 changes: 0 additions & 122 deletions api/vertexAuth.ts

This file was deleted.

2 changes: 1 addition & 1 deletion edb
Submodule edb updated from 1ba2fc to c5b32c
7 changes: 4 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';

export default tseslint.config(
{
Expand All @@ -17,6 +16,10 @@ export default tseslint.config(
'test-*/**',
'**/test-*.js',
'test-app-*/**',
'.claude/worktrees/**',
'edb/**',
'starknet-sim/**',
'fhe/**',
],
},
js.configs.recommended,
Expand All @@ -31,12 +34,10 @@ export default tseslint.config(
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react-refresh/only-export-components': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'no-console': 'off',
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<!-- PWA: Web App Manifest -->
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#0a0a0a" />
<meta name="color-scheme" content="dark light" />
</head>
<body>
<div id="root"></div>
Expand Down
Loading
Loading