katman-mcp 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -37
- package/dist/cli.js +27 -14
- package/dist/license.js +139 -95
- package/dist/meta.js +16 -6
- package/dist/plans.js +47 -0
- package/dist/tools/account/account.js +51 -30
- package/dist/tools/account/cli.js +4 -2
- package/dist/tools/account/index.js +7 -7
- package/dist/tools/account/sync.js +2 -2
- package/dist/tools/account/upsell.js +305 -117
- package/dist/tools/crawl/cli.js +1 -1
- package/dist/tools/crawl/index.js +16 -13
- package/dist/tools/method/core/start.js +1 -1
- package/dist/tools/method/index.js +27 -17
- package/dist/tools/method/mcp/prompts.js +6 -6
- package/dist/tools/method/mcp/resources.js +19 -16
- package/dist/tools/visibility/index.js +9 -9
- package/dist/tools/visibility/monitoring.js +3 -3
- package/package.json +1 -1
- package/server.json +4 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
// Account module: katman_account (
|
|
2
|
-
// (Pro: sends aggregates to the katman.pro dashboard; dry run first).
|
|
1
|
+
// Account module: katman_account (always open: plan, days left, features, how to get a key or upgrade) and
|
|
2
|
+
// katman_sync (Katman Pro: sends aggregates to the katman.pro dashboard; dry run first).
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { resolveRoot, rootWarning } from "../../context.js";
|
|
5
|
-
import {
|
|
5
|
+
import { licenseOf, tierNote, withPlan } from "../../license.js";
|
|
6
6
|
import { fail, ok } from "../../util.js";
|
|
7
7
|
import { runAccount } from "./account.js";
|
|
8
8
|
import { runSync } from "./sync.js";
|
|
9
9
|
export function registerAccountTools(server, ctx) {
|
|
10
10
|
server.registerTool("katman_account", {
|
|
11
11
|
title: "Katman account and plan",
|
|
12
|
-
description: "
|
|
12
|
+
description: "Always works, even without a key. Shows the Katman plan behind KATMAN_KEY (none, Audit Week with the days left, or Katman Pro), the tools it unlocks, the account email (masked), when the key was last checked, and how to get a key or upgrade (the plans at katman.pro/pricing, with the exact MCP config snippet per editor). Checks the key with katman.pro at most once a day; refresh: true re-checks now (e.g. right after buying). Never shows the key.",
|
|
13
13
|
inputSchema: {
|
|
14
|
-
refresh: z.boolean().optional().describe("Re-check the key with katman.pro now instead of using today's cached answer (e.g. right after upgrading)."),
|
|
14
|
+
refresh: z.boolean().optional().describe("Re-check the key with katman.pro now instead of using today's cached answer (e.g. right after buying or upgrading)."),
|
|
15
15
|
},
|
|
16
16
|
annotations: { title: "Katman account", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
17
17
|
}, async ({ refresh }) => {
|
|
@@ -26,13 +26,13 @@ export function registerAccountTools(server, ctx) {
|
|
|
26
26
|
server.registerTool("katman_sync", {
|
|
27
27
|
title: "Sync progress to the katman.pro dashboard",
|
|
28
28
|
description: "Sends this project's progress to the user's katman.pro dashboard: name and domain, gate pass counts from the latest audit, visibility rates by assistant and language from the latest run, plan progress, the top 10 issue titles, dates and the Katman version. Never code, file contents, AI answers, questions or prompts. dry_run (default true) shows the exact JSON and sends nothing; dry_run: false sends it and returns the dashboard link." +
|
|
29
|
-
|
|
29
|
+
tierNote("sync"),
|
|
30
30
|
inputSchema: {
|
|
31
31
|
project_root: z.string().optional().describe("Absolute path of the project (where .katman/ lives)."),
|
|
32
32
|
dry_run: z.boolean().optional().describe("Default true: show the exact payload, send nothing. false = send it to katman.pro."),
|
|
33
33
|
},
|
|
34
34
|
annotations: { title: "Sync to katman.pro", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
35
|
-
},
|
|
35
|
+
}, withPlan(ctx, "sync", async ({ project_root, dry_run }) => {
|
|
36
36
|
try {
|
|
37
37
|
const root = await resolveRoot(ctx, project_root);
|
|
38
38
|
const out = await runSync(root, licenseOf(ctx), { dry_run }, { version: ctx.version });
|
|
@@ -127,8 +127,8 @@ export async function runSync(root, provider, args, opts) {
|
|
|
127
127
|
}
|
|
128
128
|
const why = res.error === "invalid_key" || res.error === "revoked" || res.error === "no_key"
|
|
129
129
|
? `katman.pro did not accept KATMAN_KEY (${res.error}). Create a key at ${KEYS_URL}, put it in the MCP config as KATMAN_KEY and restart the server.`
|
|
130
|
-
: res.error === "not_pro" || res.status === 402 || res.status === 403
|
|
131
|
-
? `katman.pro says this account has no active Katman Pro plan
|
|
130
|
+
: res.error === "pro_required" || res.error === "not_pro" || res.status === 402 || res.status === 403
|
|
131
|
+
? `katman.pro says this account has no active Katman Pro plan (${res.error}); the dashboard sync is part of Katman Pro. Upgrade at ${BILLING_URL}, then call katman_account with refresh: true.`
|
|
132
132
|
: res.status === 0
|
|
133
133
|
? `Couldn't reach katman.pro (${res.message ?? res.error ?? "network error"}). Nothing was sent; try again later.`
|
|
134
134
|
: res.status === 429
|