## Summary
This change gives users a complete path from a deployed OpenConnector
gateway to using its Actions from an agent, a terminal, or application
code. It also integrates the optional OOMOL Key experience into provider
discovery and configured connections.
The console previously exposed MCP configuration and protocol
references, but CLI and SDK setup remained scattered across repository
documentation. The Action page's TypeScript example used raw HTTP rather
than the Connector SDK, and users had to replace gateway URLs and
connection names themselves. The standalone Marketplace page also
separated managed service discovery from the provider workflow.
## Changes
- Put **Discover connections** before **Configured connections**, with
OOMOL Key services identified as built-in accounts after activation and
separate source filters for built-in accounts and user credentials.
- Move optional OOMOL Key discovery into the provider page. Keep
supported services in a compact responsive grid with visible discounts,
and show the exact supported Actions in an operation drawer.
- Separate service expansion from the Key connection dialog. Users can
inspect services, connect or remove a Key, and hide the recommendation
without changing their own provider credentials.
- Consolidate language, theme, runtime refresh, and the OOMOL Key entry
in a top-right settings panel. Restore the product overview before
asking for a Key. Use shadcn Sonner for the hide notification and undo
action.
- Replace the Resources page with a three-stage client onboarding guide:
confirm the gateway URL and Runtime Token requirements, choose
MCP/CLI/SDK, and run the first Action. Changing the URL updates the
client examples and Action examples in the same console session.
- Add genuine CLI and OpenConnector SDK examples to Action details,
including named-connection selection. Retain cURL, HTTP TypeScript, and
agent examples.
- Add English and Simplified Chinese standalone onboarding guides, link
them from the READMEs, update SDK connection-management documentation,
and localize the console flow in all six supported languages.
## Build resilience
During verification, the existing remote provider icon catalog returned
HTTP 404 and prevented an otherwise valid Web build. The icon plugin now
applies a bounded fetch and emits a warning with an empty optional
mapping on failure. Provider-defined icons and the existing initials
fallback remain available, and a valid remote catalog still bundles
normally. Regression tests cover both cases.
## Verification
- `npm run fix-check` — passed lint fixes, formatting, and type checking
for src/scripts/examples.
- `npm run generate:catalog` — regenerated the current catalog and
registries after rebasing onto main.
- `npm run build:web` — passed with the remote-catalog warning and
normal icon fallback.
- `npx vitest run web/src --reporter=dot` — 21 files, 168 tests passed.
- `git diff --check` — passed.
- Browser checks covered gateway URL propagation into MCP/CLI/SDK and
Action examples, independent Key dialogs and service expansion, service
operation drawers, and Sonner hide/undo behavior.
- An installed oo CLI reached the local gateway and returned
`{"dryRun":true,"ok":true}`. Actual Hacker News retrieval was blocked by
this machine's upstream DNS resolving to a reserved address; the
existing egress protection was left intact.
## Base
Rebased onto the latest `origin/main` (`70a6f779`) without conflicts.
The earlier local UI commits are included in this PR, together with the
client onboarding work.
3.5 KiB
SDK And CLI
OpenConnector can be used directly through MCP and HTTP, and it also has dedicated developer tools
for application and agent workflows. The Connector SDK and oo CLI both work with the open-source
runtime and with OOMOL-hosted connector services, using the same provider ids, Action ids, and
schemas.
For the complete deployment-to-first-action walkthrough, start with Client onboarding or 中文接入指南.
Connector SDK
Connector SDK is the TypeScript client for calling connector Actions from apps and agent runtimes. Use it when you want to execute Actions, proxy upstream provider APIs, or inspect the runtime catalog from code.
Install:
npm install @oomol-lab/connector
For the self-hosted OpenConnector runtime, use OpenConnector. baseUrl is the server origin, not
a /v1 URL:
import { OpenConnector } from "@oomol-lab/connector";
const open = new OpenConnector({
baseUrl: "http://localhost:3000",
runtimeToken: process.env.OOMOL_CONNECT_RUNTIME_TOKEN,
});
const stories = await open.hackernews.get_top_stories({});
console.log(stories);
For OOMOL-hosted connector services, use Connector for personal connections or ProjectConnector
for end-user connections in a SaaS product. All clients use the same Action model; the gateway keeps
provider credentials behind the runtime boundary, authorizes the request, and executes the provider
Action. The SDK is a client; provider integrations and the OAuth credential lifecycle run on the
gateway. OpenConnector.connect.* can create connections with a separate adminToken, while
ordinary Action calls use runtimeToken. OAuth client setup, token creation, and deleting
connections remain Web Console administration.
For an end-to-end Gmail OAuth and SDK example, see gmail-oauth-sdk.md.
oo CLI
oo CLI is the command-line toolkit for local AI agent workflows. Use it when you want an agent on your machine to discover, inspect, and call connector Actions through a consistent command-line entry.
Point connector-family commands at a self-hosted OpenConnector runtime:
oo connector login http://localhost:3000
oo connector search "send an email"
oo connector schema gmail.send_email
oo connector run gmail --action send_email --data '@payload.json'
For authenticated runtimes, create a runtime token in the Web Console Access page and pass it during login:
oo connector login https://connector.example.com --token <runtime-token>
For containers and CI, use environment variables instead of writing CLI config:
export OO_CONNECTOR_URL="https://connector.example.com"
export OO_CONNECTOR_TOKEN="<runtime-token>"
oo connector run github --action get_current_user --data '{}'
When no self-hosted runtime is configured, connector commands can still route to OOMOL-hosted
connector services through OO_API_KEY or the active oo account. A self-hosted connector is a
capability override for connector commands, not an oo account; non-connector commands such as
hosted LLM, file transfer, and skill publishing still use OOMOL account authentication.
Protocol APIs
For custom clients, scripts, or agent hosts that do not use the SDK or CLI, use:
- MCP:
http://localhost:3000/mcp - HTTP runtime API:
/v1/actions - OpenAPI:
/openapi.json
See runtime-api.md for protocol-level details.