diff --git a/README.md b/README.md index d69f363..1328ffa 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,14 @@ Authenticate through Vercel Connect — no key touches your app, env, or the mod pnpm add @onkernel/eve-extension ``` -**2. Create and attach the Kernel connector** in Vercel Connect — name it `eve-extension` so the snippet below works unedited: +**2. Create and attach the Kernel connector** in Vercel Connect — name it `kernel-mcp` so the snippet below works unedited: ```bash -vercel connect create mcp.onkernel.com --name eve-extension -vercel connect attach mcp.onkernel.com/eve-extension +vercel connect create kernel --name kernel-mcp --connection-method mcp +vercel connect attach kernel/kernel-mcp ``` -(or add it from the dashboard → Connectors → "Browse all" → Kernel). Confirm the UID with `vercel connect list`. +`kernel` is Kernel's entry in Vercel's connector registry, so Vercel fills in the MCP URL and branding and opens your browser for the authorization step. `--connection-method mcp` is the part that matters: the registry entry also offers `api-key`, and only `mcp` gives you the per-user OAuth this extension expects. Omit the flag and the CLI prompts you to choose. (Or add it from the dashboard → Connectors → "Browse all" → Kernel.) Confirm the UID with `vercel connect list`. **3. Mount the extension** — one line, passing the connector UID: @@ -31,7 +31,7 @@ vercel connect attach mcp.onkernel.com/eve-extension // agent/extensions/kernel.ts import kernel from "@onkernel/eve-extension"; -export default kernel({ connect: "mcp.onkernel.com/eve-extension" }); +export default kernel({ connect: "kernel/kernel-mcp" }); ``` **4. Run it:** @@ -42,6 +42,8 @@ npx eve dev # or: npx eve deploy Leave `KERNEL_API_KEY` unset. The first time a user drives the browser, eve surfaces a Connect consent prompt; they approve once, and it's cached from then on (persists across threads and sessions). Each user authenticates as themselves — a good fit for Kernel's per-user managed auth. +Already have a connector from before Kernel was in the registry? It keeps working — leave it alone and point `connect` at whatever UID `vercel connect list` prints for it (e.g. `mcp.onkernel.com/eve-extension`). + ## What you get Once mounted, the agent has (namespaced under your mount, e.g. `kernel__browser__*` — discover exact names via `connection_search`): @@ -67,7 +69,7 @@ Both are one-line mounts — no override needed: | Model | Mount | Consent behavior | | --- | --- | --- | -| **Per-user via Vercel Connect** (recommended; each person authenticates as themselves) | `kernel({ connect: "mcp.onkernel.com/" })` | Each user consents **once, ever**; the grant persists across threads/sessions. No key in your app or env. | +| **Per-user via Vercel Connect** (recommended; each person authenticates as themselves) | `kernel({ connect: "kernel/" })` | Each user consents **once, ever**; the grant persists across threads/sessions. No key in your app or env. | | **Shared API key** ([bottom section](#authenticate-with-an-api-key-instead)) | `kernel({ apiKey })` or set `KERNEL_API_KEY` | One key for everyone, no prompts, no connector setup. | ## Overriding the connection @@ -76,7 +78,7 @@ You only need this for **advanced** customization — widening the tool allowlis ``` agent/extensions/kernel/ - extension.ts # export default kernel({ connect: "mcp.onkernel.com/eve-extension" }) + extension.ts # export default kernel({ connect: "kernel/kernel-mcp" }) connections/browser.ts # shadows the extension's "browser" connection ``` @@ -89,7 +91,7 @@ import { always } from "eve/tools/approval"; export default defineMcpClientConnection({ url: "https://mcp.onkernel.com/mcp", description: "Kernel cloud browser.", - auth: connect("mcp.onkernel.com/eve-extension"), // or { getToken: async () => ({ token: process.env.KERNEL_API_KEY! }) } + auth: connect("kernel/kernel-mcp"), // or { getToken: async () => ({ token: process.env.KERNEL_API_KEY! }) } tools: { allow: [ "manage_browsers", @@ -114,6 +116,7 @@ export default defineMcpClientConnection({ - **Node 24+** - **eve `>= 0.25`** in the consuming agent — extensions need it. Older eve silently ignores `agent/extensions/` (you'll see a "discover/unsupported-directory" warning and nothing mounts). The extension declares `eve` as a peer dependency floored at `>=0.25`, so the consumer's installed eve is the one that runs. - A **Kernel account** — a Vercel Connect Kernel connector (above) or a Kernel API key (below). +- For the Connect path, **Vercel CLI `>= 58.8.0`** — `--connection-method` landed there. Older CLIs reject the flag. - `@vercel/connect` ships as a dependency of this extension (used for the Connect path) — no separate install. ## Authenticate with an API key instead diff --git a/extension/extension.ts b/extension/extension.ts index 9c9bc3b..24f6ffa 100644 --- a/extension/extension.ts +++ b/extension/extension.ts @@ -7,7 +7,7 @@ import { z } from "zod"; // plus the read -> act -> observe loop as a skill. Pick auth at the mount: // // // Vercel Connect, per-user (recommended) — no API key: -// export default kernel({ connect: "mcp.onkernel.com/" }); +// export default kernel({ connect: "kernel/" }); // --connection-method mcp // // // Static API key (or omit and set KERNEL_API_KEY in the env): // export default kernel({ apiKey: process.env.KERNEL_API_KEY }); @@ -18,7 +18,8 @@ export default defineExtension({ // `connect` is unset) the connection falls back to the KERNEL_API_KEY env var. apiKey: z.string().optional(), // Authenticate through Vercel Connect instead of an API key: pass the - // connector UID, brokered per-user (interactive consent). Uses `@vercel/connect`. + // connector UID (e.g. "kernel/kernel-mcp"), brokered per-user (interactive + // consent). Uses `@vercel/connect`. connect: z.string().optional(), }), }); diff --git a/package-lock.json b/package-lock.json index 807dc18..5572bcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@onkernel/eve-extension", - "version": "0.1.3", + "version": "0.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@onkernel/eve-extension", - "version": "0.1.3", + "version": "0.1.4", "license": "MIT", "dependencies": { "@vercel/connect": "^0.4.0", diff --git a/package.json b/package.json index b552bc7..3fb97a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onkernel/eve-extension", - "version": "0.1.3", + "version": "0.1.4", "description": "Kernel cloud browser extension for Vercel eve agents — mount one line and get session management, Playwright execution, and human-like computer controls as kernel__* tools.", "type": "module", "license": "MIT",