Skip to content

feat: lore start defaults to hosted mode, opt out with --local#334

Merged
BYK merged 2 commits into
mainfrom
feat/start-hosted-default
May 15, 2026
Merged

feat: lore start defaults to hosted mode, opt out with --local#334
BYK merged 2 commits into
mainfrom
feat/start-hosted-default

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 15, 2026

Summary

  • lore start now enables hosted mode by default — all FS operations on client-controlled paths are disabled
  • Add --local / -l CLI flag to opt out (keeps FS ops active for local use)
  • LORE_HOSTED_MODE=0 env var also opts out
  • lore run and lore import are unaffected — always local mode

Rationale

lore start (headless server, no agent launched) is the natural entry point for hosted/shared deployments. Making hosted mode the default means:

  • Safe by default: remote deployments get path traversal protection without any extra configuration
  • Local use is opt-in: the rare case of running lore start locally for personal use can opt out with --local

Binding IP is not a reliable signal for hosted vs local — users may bind to Tailscale IPs, use Argo tunnels, etc. while still being "local". The explicit --local flag is clearer.

Precedence

  1. --local CLI flag (highest)
  2. LORE_HOSTED_MODE env var (explicit 0 or 1)
  3. Caller default: lore start → hosted ON, lore run/lore import → hosted OFF

BYK added 2 commits May 15, 2026 11:26
`lore start` (headless server) now enables hosted mode by default,
disabling all FS operations on client-controlled paths. This is the
safe default for remote/shared deployments.

Opt out with `lore start --local` or `LORE_HOSTED_MODE=0` for local
use cases where FS ops are needed.

`lore run` and `lore import` are unaffected — they always run in
local mode since the agent/history is on the same machine.
- C1: Fix type cast in main.ts to include `local` field
- M1: Make `config` param required in `initIfNeeded()` (all call sites
  already pass it — removes latent footgun)
- M3: Add early `isHostedMode()` check in `tryImportKnowledge()`
- M5: Log note when reusing existing gateway about hosted mode state
- M6: Add 11 tests for hosted mode config defaulting logic (loadConfig
  env var handling + startGateway three-tier precedence)
@BYK BYK merged commit 47e7e91 into main May 15, 2026
7 checks passed
@BYK BYK deleted the feat/start-hosted-default branch May 15, 2026 11:38
This was referenced May 15, 2026
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