Skip to content

v0.10.2: web min_score fix, CLI/security/port polish, all deferred items + doc sweep#83

Merged
fstamatelopoulos merged 10 commits into
mainfrom
feat/local-cerefox
Jun 6, 2026
Merged

v0.10.2: web min_score fix, CLI/security/port polish, all deferred items + doc sweep#83
fstamatelopoulos merged 10 commits into
mainfrom
feat/local-cerefox

Conversation

@fstamatelopoulos
Copy link
Copy Markdown
Owner

@fstamatelopoulos fstamatelopoulos commented Jun 5, 2026

Summary

Follow-up to v0.10.1. Completes all deferred polish items + a comprehensive doc sweep.

Fixed

  • Web docs-mode min_score — the v0.10.1 fix only caught the hybrid branch; the web
    UI's default (docs) mode still passed 0.0, so the default web search applied no
    threshold. Both branches now use getMinSearchScore(). (Web docs search now matches the CLI.)
  • CLI --max-bytes honors CEREFOX_MAX_RESPONSE_BYTES (200000 fallback); CLAUDE.md corrected.

Security

  • Local container binds 127.0.0.1 by default (was 0.0.0.0); LAN opt-in CEREFOX_LOCAL_BIND=0.0.0.0.

Local backend (World B)

  • Runtime port re-check: cerefox-local start/upgrade/init step +10 to a free port if
    the stored one was taken since last run (persisted; self-hold-guarded; only bring-up verbs).
  • Program-name-aware completion: cerefox-local completion <shell> emits a working,
    non-clashing script (cloud cerefox output byte-identical).
  • cerefox-local configure-agent --tool <client> wires Claude Desktop / Cursor / Codex /
    Gemini too (bin --local flag + one-shot docker run --entrypoint writer reuse; Claude
    Code via host claude mcp add).
  • Clearer port-selection message (cloud-present vs. busy).

Docs (sanity sweep — both paths)

  • Killed Fireworks-as-working claims (README, configuration.md, operational-cost.md, cli.md)
    — OpenAI is the only TS embedder today.
  • CONTRIBUTING.md de-Pythonized (frozen husk; Bun/Node-first; .docx supported, PDF dropped;
    embedder path _shared/embeddings; schema version gated by cut_release).
  • README drops the Python badge; cli.md gains a cerefox-local callout + cloud-only env note;
    install one-liner + port headline reconciled; agent-coordination notes local is single-machine.
  • World-B sections across access-paths / connect-agents / upgrading / operational-cost (Scenario C).

Test plan

  • _shared 206 · package non-live suites 31 (cli/stdio/pipeline/configure-agent-local) · build clean
  • completion: cloud output unchanged; cerefox-local namespaced + bound correctly
  • configure-agent --local entry override + the docker run --entrypoint write mechanism verified
  • (maintainer) merge after v0.10.1 testing → cut v0.10.2 (--npm-publish --docker-publish)

Still deferred (lower-value/heavier — see plan.md)

  • Local live-test wiring (run read/write suites against the local container).
  • schema-version.bundled=null image cosmetic.

🤖 Generated with Claude Code

fstamatelopoulos and others added 9 commits June 5, 2026 16:35
… to 127.0.0.1

- CLI `--max-bytes` now defaults to getMaxResponseBytes() (CEREFOX_MAX_RESPONSE_BYTES,
  200000 fallback) — the CLI does enforce a byte budget, so it should honor the env var.
  Corrected CLAUDE.md: the budget applies to MCP/EF + CLI; only the web UI is unlimited.
- Local container now publishes on 127.0.0.1 by default (loopback) instead of 0.0.0.0,
  so a single-user backend isn't exposed on the LAN. Opt back in with
  CEREFOX_LOCAL_BIND=0.0.0.0. install-local.sh + cerefox-local recreate()/init carry it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Close the cloud-only gaps the audit flagged:
- upgrading.md: `cerefox-local upgrade` row (one versioned image, no server deploy/reindex).
- operational-cost.md: Scenario C — fully local (no Supabase tier / EF limit; embeddings only).
- access-paths.md: World-B access model (no EF/anon-JWT layer; in-container PostgREST +
  docker-exec MCP; token never leaves the container; 127.0.0.1 by default).
- connect-agents.md: local MCP path via `cerefox-local configure-agent` / `cerefox-local mcp`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…agent polish)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The v0.10.1 wiring was incomplete: only the `hybrid` branch in discovery.ts
got getMinSearchScore() — the `docs` branch (the web UI's default mode) still
passed p_min_score: 0.0, so the default web search applied no threshold. A
replace_all missed it (the docs block is indented 4 spaces vs hybrid's 6).
Both branches now use getMinSearchScore().

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The "(and/or busy)" message was ambiguous — it fired the same way whether 8000
was actually in use or just proactively skipped because a cloud install shares
the 8000 default. Now it distinguishes the two and tells the user how to force
8000 if they want it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…s if taken

cerefox-local start/upgrade/init now detect when the configured host port was
taken by another process since last run and step +10 to a free one (persisting
it to ~/.cerefox/local/.env), instead of letting docker fail to bind quietly.
Only the container-(re)starting paths do this — the proxied KB verbs (search,
document, mcp, …) and stop/status/logs/uninstall never run port detection. The
check happens after the container's own port is freed (rm in recreate; stopped
container in start), so a healthy running setup is never needlessly port-hopped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Complete the deferred v0.10.2 polish:
- Shell completion is now program-name aware: `cerefox completion <shell>`
  binds to the actual program name + namespaces its functions, so
  `cerefox-local completion <shell>` emits a working, non-clashing script.
  Cloud `cerefox` output is byte-identical (no regression).
- configure-agent gains `--local` (MCP entry → `cerefox-local mcp`, honoring
  CEREFOX_LOCAL_CMD). `cerefox-local configure-agent --tool <client>` now wires
  Claude Desktop / Cursor / Codex / Gemini too, by running the bundled config
  writers one-shot via `docker run --entrypoint` with only the client's config
  dir mounted (Claude Code still via host `claude mcp add`). Verified: the
  --local entry override + the one-shot-write-to-mount mechanism both work.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
From a comprehensive audit of all docs (README, CONTRIBUTING, AGENT_*, guides):
- Kill Fireworks-as-working claims (README, configuration.md example block,
  operational-cost.md, cli.md) — OpenAI is the only TS embedder today.
- CONTRIBUTING.md: stop presenting Python as a live runtime/adapter (it's a
  frozen MCP husk); Bun/Node-first dev setup with uv optional; .docx IS
  supported (only PDF dropped); embedder path → _shared/embeddings; schema
  version is gated by cut_release, not bumped by hand.
- README: drop the Python badge.
- cli.md: add a cerefox-local (World-B) callout; mark the Supabase/db env as
  cloud-only (local users set only OPENAI_API_KEY); note ingest-dir needs
  --extensions .docx opt-in.
- Reconcile the install-local one-liner + the "localhost:8000" headline
  (installer auto-steps the port) between README and setup-local.md.
- agent-coordination.md: note cross-machine coordination assumes the cloud
  backend (local is single-machine / loopback by default).
- test: lock in configure-agent --local entry override.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…10.2

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@fstamatelopoulos fstamatelopoulos changed the title v0.10.2: CLI max-bytes env, 127.0.0.1 bind, World-B docs v0.10.2: web min_score fix, CLI/security/port polish, all deferred items + doc sweep Jun 6, 2026
Mirror the cloud installer: generate the program-name-namespaced completion
script from the container (docker exec) and source it from the user's shell rc
(idempotent, best-effort, never aborts the install) + print an "exec $shell"
hint. `completion install` itself can't run for World B (proxied → writes
inside the container), so the host-side wiring lives in the installer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@fstamatelopoulos fstamatelopoulos merged commit 8d24d03 into main Jun 6, 2026
3 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