Skip to content
Open
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
8 changes: 6 additions & 2 deletions .claude/reference/feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if (features.platform) {
| `branding` | Rivet branding chrome. |
| `datacenter` | Datacenter-related UI. |
| `danger-zone` | Destructive settings actions (`features.dangerZone`). |
| `mcp` | MCP connection settings card on the namespace settings drawer. Flavor-dependent content: `platform` renders the hosted `mcp.rivet.dev` endpoint pinned to this namespace, everything else renders the local stdio (`npx @rivet-dev/mcp`) config. |

Deployment flavors map to flag sets roughly as: **cloud** = all on; **OSS** = `auth`/`platform`/`acl` off; **enterprise** = `acl` on, `auth`/`platform` off (engine enforces auth without a login UI). Do not treat `platform`/`auth` as "engine requires credentials" — that is `acl`. **`compute` is opt-in even on cloud** — each Railway service adds it to `VITE_FEATURE_FLAGS` per-environment (e.g. staging on, prod off) rather than inheriting the cloud default-on set.

Expand All @@ -48,15 +49,18 @@ Switch flavors in dev without restarting the server by setting the `localStorage
// OSS self-host: everything off
localStorage.setItem("FEATURE_FLAGS", ""); location.reload();

// OSS self-host with the local MCP snippet shown
localStorage.setItem("FEATURE_FLAGS", "mcp"); location.reload();

// Full cloud: all flags on (see the commented canonical list in frontend/.env.local)
localStorage.setItem(
"FEATURE_FLAGS",
"compute,platform,acl,auth,captcha,branding,support,billing,datacenter,danger-zone,multitenancy",
"compute,platform,acl,auth,captcha,branding,support,billing,datacenter,danger-zone,multitenancy,mcp",
);
location.reload();

// Enterprise: acl on, no login UI
localStorage.setItem("FEATURE_FLAGS", "acl,branding,support,datacenter,danger-zone"); location.reload();
localStorage.setItem("FEATURE_FLAGS", "acl,branding,support,datacenter,danger-zone,mcp"); location.reload();
```

In an agent-browser / DevTools session, paste those into the page console. `localStorage` persists across reloads, so run `localStorage.removeItem("FEATURE_FLAGS")` to return to the env default when finished. Confirm the active flavor with `JSON.stringify(features)` after importing, or just observe whether auth/cloud chrome is present.
Expand Down
57 changes: 57 additions & 0 deletions frontend/apps/inspector-ui/mcp-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Rivet Actor Inspector</title>
<script>
// MCP hosts may frame this app with `sandbox="allow-scripts"` and no
// `allow-same-origin`, which makes every `Window.localStorage` read throw
// a SecurityError. Shadow the accessors with in-memory stores before any
// module runs so storage reads degrade to per-session state.
(() => {
const memory = () => {
const entries = new Map();
return {
get length() {
return entries.size;
},
key(index) {
return [...entries.keys()][index] ?? null;
},
getItem(key) {
return entries.has(String(key))
? entries.get(String(key))
: null;
},
setItem(key, value) {
entries.set(String(key), String(value));
},
removeItem(key) {
entries.delete(String(key));
},
clear() {
entries.clear();
},
};
};
for (const name of ["localStorage", "sessionStorage"]) {
try {
const probe = "__rivet_storage_probe__";
window[name].setItem(probe, "1");
window[name].removeItem(probe);
} catch {
Object.defineProperty(window, name, {
configurable: true,
value: memory(),
});
}
}
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/mcp-main.tsx"></script>
</body>
</html>
66 changes: 51 additions & 15 deletions frontend/apps/inspector-ui/src/main.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

204 changes: 204 additions & 0 deletions frontend/apps/inspector-ui/src/mcp-main.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading