Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,8 @@ REDIS_URL=redis://redis:6379 # REQUIRED for the self-host review
# Token broker (optional): get GitHub tokens from the central Orb (you installed the Orb App) instead of running
# your own GitHub App. Set the enrollment secret the operator issued for your install; unset = use your own App key.
# ORB_ENROLLMENT_SECRET= # one-time enrollment secret (a secret — keep it out of version control)
# ORB_BROKER_URL=https://api.loopover.ai # the Orb broker base (default; override for a private deployment)
# ORB_BROKER_URL= # required with ORB_ENROLLMENT_SECRET: your broker's origin (no default;
# # the hosted broker at api.loopover.ai is retired)
# ORB_RELAY_MODE=push # push | pull. push registers a public relay URL the broker calls;
# # pull is the right fit behind NAT/tailnet — your instance drains
# # events outbound instead of exposing an inbound endpoint. Default: push.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,16 @@ See [Tuning your reviews](https://loopover.ai/docs/tuning) for the full flag, se

```sh
npm install -g @loopover/mcp@latest
export LOOPOVER_API_URL=https://reviews.example.com # your self-hosted instance
loopover-mcp login
loopover-mcp doctor
loopover-mcp --stdio
```

`LOOPOVER_API_URL` is required: the hosted API at `api.loopover.ai` was retired on 2026-11-30. The next
`@loopover/mcp` release has no default API URL and says so when none is set; the release on npm today still
falls back to the retired host, so set the variable either way.

Print editor/client snippets:

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ Every verdict is independently verifiable without asking anyone's permission and
credentials. Start at [verify this review](/docs/verify-this-review), or run:

```bash
npx -p @loopover/mcp loopover-verify
npx -p @loopover/mcp loopover-verify --base-url https://reviews.example.com
```

Replace the URL with the instance that reviewed your pull request.

This is the first stop for "I think this is wrong", and it is deliberately first: it does not depend
on anyone agreeing with you. If a published commitment does not recompute, that is a fact you can
demonstrate rather than a position you have to argue.
Expand Down
21 changes: 11 additions & 10 deletions apps/loopover-ui/content/docs/mcp-clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ eyebrow: Get started

<Callout variant="warn" title="LoopOver's hosted service is retired">
The hosted MCP server at `https://api.loopover.ai/mcp` was retired on 2026-11-30. The remote blocks
below are what `init-client --mode remote` prints; to use them, replace `https://api.loopover.ai`
with your self-hosted instance's origin, and set `LOOPOVER_API_URL` to that origin so the stdio
gateway mounts its remote tools from the same place.
below use the placeholder `https://reviews.example.com`: replace it with your self-hosted instance's
origin, and set `LOOPOVER_API_URL` to that origin so the stdio gateway mounts its remote tools from
the same place. The next `@loopover/mcp` release prints these blocks and has no default API URL; the
release on npm today still prints and falls back to `api.loopover.ai`.
</Callout>

{/* GENERATED:MCP-CLIENT-CONFIG:BEGIN — edit packages/loopover-contract/src/client-config.ts, then `npm run mcp:client-config` */}
Expand Down Expand Up @@ -39,7 +40,7 @@ loopover-mcp init-client --print vscode --mode miner`}

The recommended default. Runs `loopover-mcp` on your machine, keeps auth and git analysis local, and — once you have run `loopover-mcp login` — mounts the remote tool set too, so one entry serves every tool your session entitles you to.

- Run `loopover-mcp login` before starting the client; without a session you get the local-git tools only, plus an advisory resource explaining how to get the rest.
- Set `LOOPOVER_API_URL` to your self-hosted instance and run `loopover-mcp login` before starting the client; without a session you get the local-git tools only, plus an advisory resource explaining how to get the rest.
- Pass `--no-remote` to keep the server purely local and skip the remote mount entirely.
- Assumes `loopover-mcp` is on your PATH; pass `--command /absolute/path/to/loopover-mcp` if your client does not inherit your shell PATH.

Expand Down Expand Up @@ -116,7 +117,7 @@ args = ["--stdio"]`}

## Remote streamable-http

For agents that run in the cloud, or anywhere you do not want a local Node process. Connects straight to the hosted server; the local-git tools are not available over this transport because there is no local checkout to read.
For agents that run in the cloud, or anywhere you do not want a local Node process. Connects straight to your self-hosted instance (replace `https://reviews.example.com` with its origin); the local-git tools are not available over this transport because there is no local checkout to read.

- Authenticates with a bearer token read from `LOOPOVER_API_TOKEN` — the same variable the CLI honors. Set it in the environment your client starts in; never paste the token into the config file.
- Tools whose work is a local git operation are absent here by design. Use the stdio mode if you need them.
Expand All @@ -127,7 +128,7 @@ For agents that run in the cloud, or anywhere you do not want a local Node proce
filename="~/.codex/config.toml"
lang="toml"
code={`[mcp_servers.loopover]
url = "https://api.loopover.ai/mcp"
url = "https://reviews.example.com/mcp"
bearer_token_env_var = "LOOPOVER_API_TOKEN"`}
/>

Expand All @@ -142,7 +143,7 @@ Codex releases before its RMCP client became the default also need `experimental
"mcpServers": {
"loopover": {
"type": "http",
"url": "https://api.loopover.ai/mcp",
"url": "https://reviews.example.com/mcp",
"headers": {
"Authorization": "Bearer \${LOOPOVER_API_TOKEN}"
}
Expand All @@ -160,7 +161,7 @@ Codex releases before its RMCP client became the default also need `experimental
"mcpServers": {
"loopover": {
"type": "http",
"url": "https://api.loopover.ai/mcp",
"url": "https://reviews.example.com/mcp",
"headers": {
"Authorization": "Bearer \${LOOPOVER_API_TOKEN}"
}
Expand All @@ -178,7 +179,7 @@ Codex releases before its RMCP client became the default also need `experimental
"servers": {
"loopover": {
"type": "http",
"url": "https://api.loopover.ai/mcp",
"url": "https://reviews.example.com/mcp",
"headers": {
"Authorization": "Bearer \${LOOPOVER_API_TOKEN}"
}
Expand All @@ -189,7 +190,7 @@ Codex releases before its RMCP client became the default also need `experimental

## Miner stdio

AMS's own local state-visibility tools, as a separate stdio server. It stays separate on purpose: it reads this machine's SQLite state and shares no code or network path with the hosted server.
AMS's own local state-visibility tools, as a separate stdio server. It stays separate on purpose: it reads this machine's SQLite state and shares no code or network path with the API server.

- Takes no flags and needs no login — everything it reads is already on this machine.
- A dual-role operator runs this alongside the stdio gateway; the two entries coexist in one client config.
Expand Down
4 changes: 2 additions & 2 deletions apps/loopover-ui/src/lib/selfhost-env-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [
},
{
name: "ORB_BROKER_URL",
firstReference: "src/server.ts",
firstReference: "src/selfhost/preflight.ts",
},
{
name: "ORB_COLLECTOR_INSTANCE_SECRET",
Expand Down Expand Up @@ -847,7 +847,7 @@ export const SELFHOST_ENV_REFERENCE_MARKDOWN = [
"| `ORB_AIR_GAP` | `src/selfhost/orb-collector.ts` |",
"| `ORB_ANONYMIZE` | `src/selfhost/orb-collector.ts` |",
"| `ORB_APP_ID` | `src/selfhost/orb-collector.ts` |",
"| `ORB_BROKER_URL` | `src/server.ts` |",
"| `ORB_BROKER_URL` | `src/selfhost/preflight.ts` |",
"| `ORB_COLLECTOR_INSTANCE_SECRET` | `src/selfhost/orb-collector.ts` |",
"| `ORB_COLLECTOR_TOKEN` | `src/selfhost/orb-collector.ts` |",
"| `ORB_COLLECTOR_URL` | `src/selfhost/orb-collector.ts` |",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ services:
# BROKERED mode — use the central LoopOver Orb App instead of creating your own GitHub App. Install the
# Orb App on your repos + set ORB_ENROLLMENT_SECRET in .env (loaded above); the engine then brokers
# short-lived GitHub tokens from the Orb on demand (no own App private key). See .env.example.
# ORB_BROKER_URL: https://api.loopover.ai # override only for a private Orb deployment
# ORB_BROKER_URL: https://broker.example # required in brokered mode: your broker (the hosted one is retired)
volumes:
- loopover-data:/data
# Container-private per-repo config dir (read-only). Create ./loopover-config/{owner}__{repo}/.loopover.yml
Expand Down
7 changes: 2 additions & 5 deletions docs/validator-eval-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,12 @@ validator diffing two records sees the version move, without depending on having
One command. No credentials, no account, no coordination with us:

```bash
npx -p @loopover/mcp loopover-verify
npx -p @loopover/mcp loopover-verify --base-url https://reviews.example.com
```

`--base-url` names the instance to verify (the hosted API was retired on 2026-11-30, so there is no default).
It fetches the public surfaces, **recomputes** every commitment locally, and exits non-zero if any claim
fails. It never calls back to ask whether we passed — a deployment cannot pass by asserting that it passed.

Since #9724 we run it against ourselves nightly, from a runner holding no credentials of any kind, so the
tool is exercised against production continuously rather than only when someone thinks to look. If it is
failing, there is an open issue saying which claim broke.

**What a validator must trust:** our published signing key, and that the corpus we publish is the corpus we
scored. The second is exactly what `corpusChecksum` is for — and why the #9962 fix mattered.
9 changes: 9 additions & 0 deletions packages/loopover-contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ responses were consumed as `any`.
This package is the one place those contracts live. **A shape declared here is never restated
elsewhere.**

## No hosted defaults

Nothing here defaults to LoopOver's hosted API or Orb broker (`https://api.loopover.ai`), which were retired on
2026-11-30. `resolveLoopoverApiUrl` returns `null` when no URL is configured, with
`MISSING_LOOPOVER_API_URL_MESSAGE` for callers to report, and `orbBrokerBaseUrl` throws
`MISSING_ORB_BROKER_URL_MESSAGE` when `ORB_BROKER_URL` is unset. The generated client config uses the
self-hosted placeholder `https://reviews.example.com`. The next release carries this; the version on npm today
still exports the old defaults.

## Why a separate package

It is a **leaf**: its only runtime dependency is `zod`, and it imports no node builtins, so it is
Expand Down
27 changes: 22 additions & 5 deletions packages/loopover-contract/src/cli-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,30 @@
* repo built locally, and CI failed on a module that had never been committed. Do not rename it back.
*/

export const DEFAULT_LOOPOVER_API_URL = "https://api.loopover.ai";
/**
* LoopOver's hosted API, retired on 2026-11-30. It was the shipped default; nothing defaults to an API URL
* now, because the only LoopOver API left to call is one an operator runs themselves.
*/
export const RETIRED_LOOPOVER_API_URL = "https://api.loopover.ai";

/** The placeholder origin the docs use for a self-hosted instance. It only fills examples; nothing calls it. */
export const SELF_HOSTED_API_URL_PLACEHOLDER = "https://reviews.example.com";

/** What a CLI says when it needs the API and no URL is configured. */
export const MISSING_LOOPOVER_API_URL_MESSAGE =
`No LoopOver API URL is configured. The hosted API (${RETIRED_LOOPOVER_API_URL}) was retired on 2026-11-30, so ` +
`set LOOPOVER_API_URL to your self-hosted instance's origin (for example ${SELF_HOSTED_API_URL_PLACEHOLDER}), ` +
"or save it as a profile's apiUrl.";

/**
* API URLs that used to be the shipped default. A config still naming one is a stale artifact of an
* older install, not a deliberate override, so resolution SKIPS them rather than honoring them.
* older install, not a deliberate override, so resolution SKIPS them rather than honoring them. The
* retired hosted API is one: a login saved against it can no longer reach anything.
*/
export const LEGACY_LOOPOVER_API_URLS: ReadonlySet<string> = new Set([
"https://gittensory-api.zeronode.workers.dev",
"https://gittensory-api.aethereal.dev",
RETIRED_LOOPOVER_API_URL,
]);

export const DEFAULT_PROFILE_NAME = "default";
Expand Down Expand Up @@ -121,7 +136,9 @@ export function profileSessionToken(profile: LoopoverConfigProfile | undefined):

/**
* The API URL to call: LOOPOVER_API_URL, else the active profile's apiUrl, else the config's top-level
* apiUrl, else the default -- skipping any LEGACY_LOOPOVER_API_URLS entry at every step.
* apiUrl -- skipping any LEGACY_LOOPOVER_API_URLS entry at every step -- else null. There is no default:
* a caller that needs the API reports MISSING_LOOPOVER_API_URL_MESSAGE instead of calling a host that
* no longer answers.
*
* The fall-THROUGH matters and is the behavior the two copies had drifted on (#9521). @loopover/mcp
* picked the profile apiUrl if present and fell straight to the default when it was legacy, so a stale
Expand All @@ -133,13 +150,13 @@ export function resolveLoopoverApiUrl(
env: LoopoverConfigEnv,
config: LoopoverConfig,
profile: LoopoverConfigProfile | undefined,
): string {
): string | null {
if (env.LOOPOVER_API_URL) return env.LOOPOVER_API_URL.replace(/\/+$/, "");
for (const candidate of [profile?.apiUrl, config.apiUrl]) {
if (typeof candidate === "string" && candidate.trim()) {
const normalized = candidate.replace(/\/+$/, "");
if (!LEGACY_LOOPOVER_API_URLS.has(normalized)) return normalized;
}
}
return DEFAULT_LOOPOVER_API_URL;
return null;
}
15 changes: 9 additions & 6 deletions packages/loopover-contract/src/client-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// So the grid lives here, as data, and every surface renders it: `init-client --print` reads this, and
// scripts/gen-mcp-client-config.ts writes the docs and README blocks from it under a --check drift guard.
// Adding a host or a mode is one entry in this file, and every surface that describes it moves together.
import { DEFAULT_LOOPOVER_API_URL } from "./cli-config.js";
import { SELF_HOSTED_API_URL_PLACEHOLDER } from "./cli-config.js";

/** How a client reaches LoopOver. Ordered as a reader should consider them: local default first. */
export const CONNECTION_MODES = ["stdio", "remote", "miner"] as const;
Expand Down Expand Up @@ -84,8 +84,11 @@ export type ConnectionModeSpec = {
notes: readonly string[];
};

/** The remote endpoint. Same origin the server card advertises, so the two can never disagree. */
export const REMOTE_MCP_URL = `${DEFAULT_LOOPOVER_API_URL}/mcp`;
/**
* The remote endpoint, on the docs' placeholder origin: a self-hosted instance serves it at `/mcp`, and a
* reader replaces the origin with their instance's. The hosted endpoint this used to name is retired.
*/
export const REMOTE_MCP_URL = `${SELF_HOSTED_API_URL_PLACEHOLDER}/mcp`;

/**
* The env var the remote endpoint's bearer token comes from.
Expand All @@ -106,15 +109,15 @@ export const CONNECTION_MODE_SPEC: Record<ConnectionMode, ConnectionModeSpec> =
command: "loopover-mcp",
args: ["--stdio"],
notes: [
"Run `loopover-mcp login` before starting the client; without a session you get the local-git tools only, plus an advisory resource explaining how to get the rest.",
"Set `LOOPOVER_API_URL` to your self-hosted instance and run `loopover-mcp login` before starting the client; without a session you get the local-git tools only, plus an advisory resource explaining how to get the rest.",
"Pass `--no-remote` to keep the server purely local and skip the remote mount entirely.",
"Assumes `loopover-mcp` is on your PATH; pass `--command /absolute/path/to/loopover-mcp` if your client does not inherit your shell PATH.",
],
},
remote: {
title: "Remote streamable-http",
summary:
"For agents that run in the cloud, or anywhere you do not want a local Node process. Connects straight to the hosted server; the local-git tools are not available over this transport because there is no local checkout to read.",
"For agents that run in the cloud, or anywhere you do not want a local Node process. Connects straight to your self-hosted instance (replace `https://reviews.example.com` with its origin); the local-git tools are not available over this transport because there is no local checkout to read.",
serverKey: "loopover",
transport: "http",
args: [],
Expand All @@ -126,7 +129,7 @@ export const CONNECTION_MODE_SPEC: Record<ConnectionMode, ConnectionModeSpec> =
miner: {
title: "Miner stdio",
summary:
"AMS's own local state-visibility tools, as a separate stdio server. It stays separate on purpose: it reads this machine's SQLite state and shares no code or network path with the hosted server.",
"AMS's own local state-visibility tools, as a separate stdio server. It stays separate on purpose: it reads this machine's SQLite state and shares no code or network path with the API server.",
serverKey: "loopover-miner",
transport: "stdio",
command: "loopover-miner-mcp",
Expand Down
2 changes: 1 addition & 1 deletion packages/loopover-contract/src/discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export type ServerCardInput = {
/** The server's semantic version. Sourced from @loopover/mcp's package.json — never hand-bumped here. */
version: string;
deployment: DiscoveryDeployment;
/** Absolute base URL this deployment answers on, e.g. `https://api.loopover.ai`. */
/** Absolute base URL this deployment answers on, e.g. `https://reviews.example.com`. */
baseUrl: string;
tools: readonly McpToolDefinition[];
/**
Expand Down
13 changes: 10 additions & 3 deletions packages/loopover-contract/src/orb-broker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@
* must stay Workers-safe (see its tsconfig's `"types": []`).
*/

/** The Orb's hosted broker base; override (ORB_BROKER_URL) only to point at a private loopover deployment. */
export const DEFAULT_ORB_BROKER_URL = "https://api.loopover.ai";
/**
* What a brokered caller is told when ORB_BROKER_URL is unset. The hosted broker it used to default to
* (https://api.loopover.ai) was retired on 2026-11-30, so there is no default: brokered mode needs a broker
* the operator names.
*/
export const MISSING_ORB_BROKER_URL_MESSAGE =
"ORB_BROKER_URL is not set. LoopOver's hosted broker (https://api.loopover.ai) was retired on 2026-11-30, so " +
"set ORB_BROKER_URL to a broker you run, or use a Direct GitHub App instead of brokered mode.";

/**
* The broker's cold token mint can take many seconds when GitHub is throttling the App; allow headroom
Expand All @@ -38,7 +44,8 @@ function isLocalBrokerHost(hostname: string): boolean {
* or fragment, and https unless it targets localhost development.
*/
export function orbBrokerBaseUrl(env: { ORB_BROKER_URL?: string | undefined }): string {
const raw = env.ORB_BROKER_URL ?? DEFAULT_ORB_BROKER_URL;
const raw = env.ORB_BROKER_URL;
if (!raw) throw new Error(MISSING_ORB_BROKER_URL_MESSAGE);
let url: URL;
try {
url = new URL(raw);
Expand Down
Loading
Loading