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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Tool results keep the full text for the UI (`text`) and a ~16 KB cut for the mod

## Catalog

`CATALOG` ships c0mpute hosting and ThreatCrush. `makeCatalog(extra, { replace })` merges your
`CATALOG` ships c0mpute hosting, ThreatCrush and CheapestWayz (on by default: `default: true`, sign-in on first use). `makeCatalog(extra, { replace })` merges your
own entries (an entry with an empty `url` removes a built-in one).

## Server-side safety
Expand Down
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ export interface CatalogEntry {
description?: string;
homepage?: string;
icon?: string;
/** On for every account (in DEFAULT_PLUGINS): listed and switched on, signed in on first use. */
default?: boolean;
}

export interface OpenAITool {
Expand Down Expand Up @@ -356,7 +358,7 @@ export interface ActionSummary {
}
export const MODEL_CAN_BE_WRONG: string;
export const FINANCE_CATALOG: readonly FinanceCatalogEntry[];
/** Everything on for every account: money plugins (sign-in on first use), then docs plugins (auth "none"). */
/** Everything on for every account: money plugins (sign-in on first use), docs plugins (auth "none"), then CATALOG defaults (sign-in on first use). */
export const DEFAULT_PLUGINS: readonly FinanceCatalogEntry[];
export const DOCS_CATALOG: readonly DocsCatalogEntry[];
/** The one-line CLI command that registers an entry, e.g. `claude mcp add --transport http <slug> <url>`. */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@profullstack/chat-plugins",
"version": "0.3.0",
"version": "0.3.1",
"type": "module",
"description": "Chat plugins = remote MCP servers, with less hoops than connectors: paste a URL or pick from a catalog, sign-in is automatic (OAuth 2.1 + DCR + PKCE), and an agent loop runs the tools even on models with no native tool calling. Zero dependencies.",
"keywords": [
Expand Down
12 changes: 12 additions & 0 deletions src/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ export const CATALOG = Object.freeze([
description: "File-hash, IP and domain reputation, plus your org's scan and pentest findings.",
homepage: "https://threatcrush.com",
}),
// On by default (DEFAULT_PLUGINS): reading works without an account; earning tools (referral
// link, earnings) and posting sign in on first use with OAuth 2.1, by email link or CoinPay.
Object.freeze({
slug: "cheapestwayz",
name: "CheapestWayz",
url: "https://cheapestwayz.com/mcp",
description:
"Find the cheapest way to get something done: priced DIY, online and local-business methods ranked by cost, local quote requests, and your referral link and earnings. Sign in with your CheapestWayz email link or CoinPay.",
homepage: "https://cheapestwayz.com",
icon: "https://cheapestwayz.com/favicon.svg",
default: true,
}),
]);

/**
Expand Down
3 changes: 2 additions & 1 deletion src/money.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// imports: describeAction() also runs in the browser.

import { DOCS_CATALOG } from "./docs.js";
import { CATALOG } from "./catalog.js";

export const MODEL_CAN_BE_WRONG = "The model can be wrong. You decide: nothing here runs until you approve it.";
export const FINANCE_CATALOG = Object.freeze([
Expand Down Expand Up @@ -46,7 +47,7 @@ export const FINANCE_CATALOG = Object.freeze([
]);
// Everything apps switch on for every account: the money plugins each person
// signs in to, then the docs plugins that need no sign-in (auth: "none").
export const DEFAULT_PLUGINS = Object.freeze([...FINANCE_CATALOG.filter((e) => e.default), ...DOCS_CATALOG.filter((e) => e.default)]);
export const DEFAULT_PLUGINS = Object.freeze([...FINANCE_CATALOG.filter((e) => e.default), ...DOCS_CATALOG.filter((e) => e.default), ...CATALOG.filter((e) => e.default)]);
const MERCURY_READ = new Set([
"getCurrentDate",
"getAccount",
Expand Down
2 changes: 1 addition & 1 deletion test/docs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe("docs plugins", () => {
expect(ms.url).toBe("https://learn.microsoft.com/api/mcp");
expect(ms.default).toBe(true);
expect(ms.auth).toBe("none");
expect(DEFAULT_PLUGINS.map((d) => d.slug)).toEqual(["mercury", "coinpay", "microsoft-learn"]);
expect(DEFAULT_PLUGINS.map((d) => d.slug)).toEqual(["mercury", "coinpay", "microsoft-learn", "cheapestwayz"]);
// Not a money plugin: no confirmation policy applies.
expect(policyFor(ms.url)).toBeNull();
});
Expand Down
8 changes: 6 additions & 2 deletions test/loop.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,15 @@ describe("seal", () => {
});

describe("catalog + ssrf helpers", () => {
test("catalog has c0mpute and threatcrush, overridable", () => {
test("catalog has c0mpute, threatcrush and cheapestwayz, overridable", () => {
expect(CATALOG.find((e) => e.slug === "c0mpute").url).toBe("https://c0mpute.com/api/mcp");
expect(CATALOG.find((e) => e.slug === "threatcrush").url).toBe("https://threatcrush.com/api/mcp");
const cwz = CATALOG.find((e) => e.slug === "cheapestwayz");
expect(cwz.url).toBe("https://cheapestwayz.com/mcp");
expect(cwz.default).toBe(true);
expect(cwz.auth).toBeUndefined(); // sign-in on first use, never a shared account
const c = makeCatalog([{ slug: "mine", name: "Mine", url: "https://mine.example/mcp" }, { slug: "threatcrush", name: "x", url: "" }]);
expect(c.map((e) => e.slug)).toEqual(["c0mpute", "mine"]);
expect(c.map((e) => e.slug)).toEqual(["c0mpute", "cheapestwayz", "mine"]);
});
test("resolvePluginInput", () => {
expect(resolvePluginInput("c0mpute")).toMatchObject({ slug: "c0mpute", url: "https://c0mpute.com/api/mcp" });
Expand Down
2 changes: 1 addition & 1 deletion test/money.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { applyPolicy, DEFAULT_PLUGINS, describeAction, FINANCE_CATALOG, needsApp

describe("money plugin catalog", () => {
test("Mercury and CoinPay are on by default; moomoo is listed but off", () => {
expect(DEFAULT_PLUGINS.filter((d) => d.auth !== "none").map((d) => d.slug).sort()).toEqual(["coinpay", "mercury"]);
expect(DEFAULT_PLUGINS.filter((d) => d.auth !== "none").map((d) => d.slug).sort()).toEqual(["cheapestwayz", "coinpay", "mercury"]);
const moomoo = FINANCE_CATALOG.find((e) => e.slug === "moomoo");
expect(moomoo.default).toBe(false);
expect(moomoo.description).toContain("you decide");
Expand Down
Loading