From 6f18613f9de8e7062c8275e2f7982d9674319860 Mon Sep 17 00:00:00 2001 From: dtzp555-max Date: Fri, 17 Jul 2026 09:30:57 +1000 Subject: [PATCH] =?UTF-8?q?docs(readme):=20staleness=20sweep=20=E2=80=94?= =?UTF-8?q?=20model=20count/examples,=20phantom=20`ocp=20stop`,=20undocume?= =?UTF-8?q?nted=20env=20vars,=20ocp-connect=20claim=20(#170)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(readme): sweep stale content — 6 models, drop phantom `ocp stop`, document 2 live env vars, fix ocp-connect claim P1 findings from a full README-vs-code staleness audit (each verified against the tree at 0c3e42b): - "5 models" x4 (L124/151/174/323) -> 6; the /v1/models curl example (L244) and ocp-connect sample output (L353) now include claude-sonnet-5 (added #152). - Troubleshooting told users to run `ocp stop`, which has never existed (the ocp case table has no stop) -> replaced with the real launchctl/systemctl commands + a note that stopping goes through the service manager. - CLAUDE_SYSTEM_PROMPT (server.mjs:326, applied at :1084) and CLAUDE_MCP_CONFIG (server.mjs:1124 -p path; lib/tui/session.mjs:447 FULL_TOOLS panes) are live config with no env-table row -> added both rows. - "ocp-connect detects and configures Claude Code, Cursor, ..." over-claimed: it auto-configures OpenClaw only, prints hints for Cursor/Cline/Continue/opencode, and has no Claude Code logic at all (OCP exposes an OpenAI-compat surface; Claude Code speaks the Anthropic protocol) -> reworded L28 + removed Claude Code from the client-connect prompt template (L160). - Upgrade examples presented v3.14 as the frontier -> refreshed to current-era numbers (v3.21.0->v3.21.1 patch, v3.18->v3.22 cross-minor). Historical feature attributions ("as of v3.14.0", bootstrap-quirk notes) kept — they are facts. Docs only; no code change. P0 (billing status note) and P2 (structure) are tracked separately. Co-Authored-By: Claude * docs(readme): drop the CLAUDE_SYSTEM_PROMPT row (dead env var) + fix systemd stop to --user Reviewer traced consumers: SYSTEM_PROMPT (server.mjs:326) is only echoed on /health (:2906) and the startup log (:3270) — extractSystemPrompt() never reads it, so the row documented behavior that does not exist. The dead var + the two stale in-code comments (server.mjs:19, :1084) go on the backlog: wire it or remove it (a server.mjs change, out of this docs PR's scope). Also: setup.mjs installs the systemd unit under --user (:514), so the Troubleshooting stop line loses the sudo and gains --user. Co-Authored-By: Claude --------- Co-authored-by: dtzp555 Co-authored-by: Claude --- README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c4c1e54..23f72b0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ One proxy. Multiple IDEs. All models. **$0 API cost.** There are several Claude proxy projects. OCP picks a specific lane: **align tightly with what `cli.js` actually does, observe + multiplex what's already there, don't extend the protocol.** What you get: - **LAN multi-user keys** (v3.7.0) — reach one Claude Pro/Max subscription from your own devices across the LAN. Each device gets a per-key API token (no OAuth session leak), with independent usage tracking and one-line revocation. Pro/Max are **per-user** accounts — see [Sharing with family / a team — honest limits](#deployment-model--security-read-this) before extending access to other **people**. -- **`ocp-connect` one-shot IDE setup** — one command on the client machine detects and configures Claude Code, Cursor, Cline, Continue.dev, OpenCode, and OpenClaw. No pasting `OPENAI_BASE_URL` six times. +- **`ocp-connect` one-shot client setup** — one command on the client machine auto-configures OpenClaw, and detects Cursor, Cline, Continue.dev, and opencode to print ready-to-paste setup hints for each. No hunting for where each tool keeps its `OPENAI_BASE_URL`. - **Response cache with per-key isolation + singleflight** (v3.13.0). Optional SHA-256 prompt cache, isolated per API key (cross-user pollution is impossible by hash construction, not by application logic), with stampede protection on concurrent identical prompts. Off by default. ([PR #65](https://github.com/dtzp555-max/ocp/pull/65), [PR #66](https://github.com/dtzp555-max/ocp/pull/66)) - **Per-key request quotas** (v3.8.0). Daily / weekly / monthly limits per key — set a kid's iPad to 20/day, a partner's laptop to 100/week. ([PR #18](https://github.com/dtzp555-max/ocp/pull/18)) - **SSE heartbeat for long reasoning** ([v3.12.0](https://github.com/dtzp555-max/ocp/releases/tag/v3.12.0), opt-in). If you've ever watched your IDE die at the 60s idle mark during a long Claude tool-use pause — that's nginx/Cloudflare default behavior. OCP emits an SSE comment frame to keep the connection alive without polluting the response. ([PR #49](https://github.com/dtzp555-max/ocp/pull/49)) @@ -121,7 +121,7 @@ Please follow https://github.com/dtzp555-max/ocp/blob/main/README.md installed and logged in (`claude auth status`). Install missing pieces using my system's package manager. 2. git clone the repo, cd in, and run `node setup.mjs`. -3. Verify with `curl http://127.0.0.1:3456/v1/models` (should list 5 models). +3. Verify with `curl http://127.0.0.1:3456/v1/models` (should list 6 models). 4. Add `export OPENAI_BASE_URL=http://127.0.0.1:3456/v1` to my shell rc. 5. Tell me to reload my shell and try a tool like Cline / Continue / Cursor. @@ -148,7 +148,7 @@ Please follow https://github.com/dtzp555-max/ocp/blob/main/README.md 5. Add OCP_ADMIN_KEY to my shell rc (~/.zshrc or ~/.bashrc). 6. Run `ocp lan` to show me the LAN IP and connect command. 7. Optionally create example keys: `ocp keys add laptop`, `ocp keys add tablet`. -8. Verify: `curl http://127.0.0.1:3456/v1/models` returns 5 models. +8. Verify: `curl http://127.0.0.1:3456/v1/models` returns 6 models. Tell me each step before running it. On error, diagnose before retrying. ``` @@ -157,8 +157,7 @@ Tell me each step before running it. On error, diagnose before retrying. ```text There's an OCP server at on my LAN. Configure this machine to -use it for any local IDEs (Cursor, Cline, Continue.dev, OpenCode, Claude -Code, OpenClaw). +use it for any local IDEs (Cursor, Cline, Continue.dev, OpenCode, OpenClaw). Server IP: API key (leave blank if the server has anonymous mode enabled): @@ -171,7 +170,7 @@ Please follow https://github.com/dtzp555-max/ocp/blob/main/README.md chmod +x ocp-connect 2. Run `./ocp-connect ` (add `--key ` if you have one). 3. Follow any IDE-specific manual hints it prints. -4. Verify: `curl http://:3456/v1/models` returns 5 models. +4. Verify: `curl http://:3456/v1/models` returns 6 models. 5. Tell me to reload my shell + restart any IDE that was already running. Don't auto-retry on error. Tell me the failure mode first. @@ -241,7 +240,7 @@ Run `ocp lan` to see your IP and ready-to-share instructions. **Verify:** ```bash curl http://127.0.0.1:3456/v1/models -# Returns: claude-opus-4-8, claude-opus-4-7, claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5-20251001 +# Returns: claude-opus-4-8, claude-opus-4-7, claude-opus-4-6, claude-sonnet-5, claude-sonnet-4-6, claude-haiku-4-5-20251001 ``` #### Headless install notes @@ -320,7 +319,7 @@ OCP Connect v1.3.0 (set by admin via PROXY_ANONYMOUS_KEY; see issue #12 §14 Path A) Testing API access... - ✓ API accessible (5 models available) + ✓ API accessible (6 models available) Shell config: ✓ .bashrc @@ -353,6 +352,7 @@ OCP Connect v1.3.0 • ocp/claude-opus-4-8 • ocp/claude-opus-4-7 • ocp/claude-opus-4-6 + • ocp/claude-sonnet-5 • ocp/claude-sonnet-4-6 • ocp/claude-haiku-4-5-20251001 Priority: PRIMARY (default model) @@ -577,9 +577,9 @@ The simplest path: ask your AI. What `ocp update` does: -- **Patch bump** (e.g. `v3.14.0 → v3.14.1`): +- **Patch bump** (e.g. `v3.21.0 → v3.21.1`): light path (git pull + npm install + restart). -- **Cross-minor** (e.g. `v3.10 → v3.14`): +- **Cross-minor** (e.g. `v3.18 → v3.22`): full path: pre-flight check, snapshot, `setup.mjs` (with plist env-merge), service restart, post-flight `/health` and `/v1/models` verification. - **Old version** (< v3.4.0): @@ -827,11 +827,12 @@ lsof -nP -iTCP:3456 -sTCP:LISTEN If it's an old OCP process, stop it before re-running setup: ```bash -ocp stop # if the CLI is on PATH -launchctl bootout gui/$(id -u)/dev.ocp.proxy # macOS launchd fallback -sudo systemctl stop ocp-proxy # Linux systemd fallback +launchctl bootout gui/$(id -u)/dev.ocp.proxy # macOS launchd +systemctl --user stop ocp-proxy # Linux systemd (installed as a --user unit) ``` +(There is no `ocp stop` subcommand — the proxy runs as a service, so stopping it goes through the service manager above. `ocp restart` exists for the bounce case.) + ### Setup fails with "node: command not found" or version error OCP requires Node.js 22.5+. Install: @@ -948,6 +949,7 @@ See [Subscription-pool (TUI) mode](#subscription-pool-tui-mode) and ADR 0007 PR- | `CLAUDE_CACHE_TTL` | `0` | Response cache TTL (ms, 0 = disabled). Set to e.g. `300000` for 5-min cache | | `CLAUDE_ALLOWED_TOOLS` | `Bash,Read,...,Agent` | Comma-separated tools to pre-approve | | `CLAUDE_SKIP_PERMISSIONS` | `false` | Bypass all permission checks | +| `CLAUDE_MCP_CONFIG` | *(unset)* | Path to an MCP server config JSON, passed to the spawned `claude` as `--mcp-config` (both the `-p` path and TUI `OCP_TUI_FULL_TOOLS` panes) | | `CLAUDE_NO_CONTEXT` | `false` | Suppress CLAUDE.md and auto-memory injection (pure API mode) | | `PROXY_API_KEY` | *(unset)* | Bearer token for shared-mode authentication | | `PROXY_ANONYMOUS_KEY` | *(unset)* | Well-known anonymous key allowlist (multi mode). When set, this exact string bypasses `validateKey()` and grants public access. Exposed via `/health.anonymousKey` only to localhost, or to all callers when `PROXY_ADVERTISE_ANON_KEY=1`. See [Anonymous Access](#anonymous-access-optional). |