Remove local mode — project is cloud (Supabase) only#17
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
better-sqlite3,nodemailer, andssh2fromoptionalDependenciesand their@typespackagesuserIdexplicitly (noLOCAL_USER_IDsentinel default)What changed
Deleted:
lib/claw/ssh.ts— nativessh2SSH transport (local only)lib/db/schema/sqlite/— 12 SQLite table definitionsdrizzle.sqlite.config.ts— SQLite Drizzle configapp/api/vault/read-local-file/— server-side local filesystem vault helperscripts/migrate-sqlite-to-supabase.ts— one-time migration scriptSimplified:
lib/core/runtime.ts: collapsed toexport const MODE = "cloud"— no moreisLocal(),isCloud(),LOCAL_USER_ID,DeploymentMode,availableInlib/core/module-registry.ts: removedavailableIndeployment-mode filteringlib/core/types.ts: removedavailableInfromFeatureModulelib/core/mailer.ts: removedNodemailerMailer, always uses Resendlib/core/llm-client.ts: removedensureLocal()guard — LLM (OpenRouter) now usable in clouduserIdis now a required parameter (noLOCAL_USER_IDdefault)index.tsfiles: removedavailableIndeclarationslib/modules/vault/api.ts+app/api/vault/route.ts: removedisCloud()branching, kept cloud paths onlylib/modules/settings/defaults.ts: removed local-only OpenRouter/LLM setting defaultsnext.config.ts: removed native-package externals for removed librariespackage.json: simplifieddevscript, removedmigrate:sqlitescriptReviewer notes
/api/health) still returnsmode: "cloud"via the stubruntime.ts— no behaviour changelobsterddaemon and Cloudflare Worker relay are unaffected (cloud infrastructure)isLlmAvailable()now returnstrueunconditionally; 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