Skip to content

Remove local mode — project is cloud (Supabase) only#17

Merged
lhymmEU merged 3 commits into
mainfrom
claude/mystifying-margulis-459e51
May 15, 2026
Merged

Remove local mode — project is cloud (Supabase) only#17
lhymmEU merged 3 commits into
mainfrom
claude/mystifying-margulis-459e51

Conversation

@lhymmEU

@lhymmEU lhymmEU commented May 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes all local-mode code (SQLite, ssh2, nodemailer, local-only vault paths)
  • Simplifies the core runtime from a dual-mode capability layer to a trivial cloud constant
  • Drops better-sqlite3, nodemailer, and ssh2 from optionalDependencies and their @types packages
  • All module action functions now require userId explicitly (no LOCAL_USER_ID sentinel default)

What changed

Deleted:

  • lib/claw/ssh.ts — native ssh2 SSH transport (local only)
  • lib/db/schema/sqlite/ — 12 SQLite table definitions
  • drizzle.sqlite.config.ts — SQLite Drizzle config
  • app/api/vault/read-local-file/ — server-side local filesystem vault helper
  • scripts/migrate-sqlite-to-supabase.ts — one-time migration script

Simplified:

  • lib/core/runtime.ts: collapsed to export const MODE = "cloud" — no more isLocal(), isCloud(), LOCAL_USER_ID, DeploymentMode, availableIn
  • lib/core/module-registry.ts: removed availableIn deployment-mode filtering
  • lib/core/types.ts: removed availableIn from FeatureModule
  • lib/core/mailer.ts: removed NodemailerMailer, always uses Resend
  • lib/core/llm-client.ts: removed ensureLocal() guard — LLM (OpenRouter) now usable in cloud
  • All 11 module action files: userId is now a required parameter (no LOCAL_USER_ID default)
  • All 9 module index.ts files: removed availableIn declarations
  • lib/modules/vault/api.ts + app/api/vault/route.ts: removed isCloud() branching, kept cloud paths only
  • Vault UI components: removed local-only storage path configuration UI
  • lib/modules/settings/defaults.ts: removed local-only OpenRouter/LLM setting defaults
  • next.config.ts: removed native-package externals for removed libraries
  • package.json: simplified dev script, removed migrate:sqlite script

Reviewer notes

  • The health endpoint (/api/health) still returns mode: "cloud" via the stub runtime.ts — no behaviour change
  • The lobsterd daemon and Cloudflare Worker relay are unaffected (cloud infrastructure)
  • isLlmAvailable() now returns true unconditionally; callers that were previously blocked in cloud mode will now attempt to use OpenRouter if a key is configured in Settings

🤖 Generated with Claude Code

lhymmEU and others added 3 commits May 14, 2026 18:13
The codebase previously supported two deployment modes (local SQLite/ssh2/nodemailer
vs cloud Supabase). Since the app now requires Supabase auth even when run locally,
the local-mode branch is dead code. This commit strips it entirely.

What was removed:
- lib/claw/ssh.ts — native ssh2 SSH transport
- lib/db/schema/sqlite/ — 12 SQLite table definitions
- drizzle.sqlite.config.ts — SQLite Drizzle config
- app/api/vault/read-local-file/ — local filesystem vault helper
- scripts/migrate-sqlite-to-supabase.ts — one-time migration script
- optionalDependencies: better-sqlite3, nodemailer, ssh2 (+ their @types)

What was simplified:
- lib/core/runtime.ts: from 45 lines to `export const MODE = "cloud"`
- lib/core/module-registry.ts: removed availableIn deployment-mode filtering
- lib/core/types.ts: removed availableIn field from FeatureModule
- lib/core/mailer.ts: kept only ResendMailer, removed NodemailerMailer
- lib/core/llm-client.ts: removed ensureLocal() guard blocking cloud LLM use
- All 11 module action files: userId now required (no LOCAL_USER_ID default)
- All 9 module index files: removed availableIn declarations
- Vault components/routes: removed isLocal()/isCloud() branching, cloud-only paths
- lib/modules/settings/defaults.ts: removed local-only OpenRouter/LLM defaults
- next.config.ts: removed native-package externals for local-only libs
- package.json dev script: removed DEPLOYMENT_MODE env var prefix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
myself Error Error May 15, 2026 7:20am

@lhymmEU lhymmEU merged commit 14d9c5d into main May 15, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant