@anychat-ai/mcp 0.3.0 → 0.3.1
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 +18 -4
- package/dist/routeInventory.d.ts +74 -0
- package/dist/routeInventory.js +256 -0
- package/dist/routeInventory.js.map +1 -0
- package/dist/tools/agents.js +34 -16
- package/dist/tools/agents.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ Flags: `--profile core|full` picks the tool set (default `full`, see [Profiles](
|
|
|
49
49
|
|
|
50
50
|
## Tools
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
107 tools, a 1:1 projection of the [Agent API](https://docs.anychat.ai/reference/agent-api/) grouped as the reference is (orient → Definition → Capabilities → Channels → People → Activity → Org → Docs). `npx -y @anychat-ai/mcp tools` prints the live table.
|
|
53
53
|
|
|
54
54
|
Every tool carries MCP annotations: `read` tools are `readOnlyHint`; `write` tools change configuration; `destructive` tools (deletes, outreach sends to real people, provisioning requests, imports over an existing agent, secret rotation) are `destructiveHint` so your host asks before running them.
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ Every tool carries MCP annotations: `read` tools are `readOnlyHint`; `write` too
|
|
|
57
57
|
|
|
58
58
|
Every tool definition (name, description, input schema) is sent to the model on every call, so a big table has a real per-turn cost. Two profiles trade breadth for weight:
|
|
59
59
|
|
|
60
|
-
- **`full`** (default) — all
|
|
60
|
+
- **`full`** (default) — all 107 tools.
|
|
61
61
|
- **`core`** — 54 tools, the everyday set: `whoami`; agents (list / get / create / update / export / import, apply template, catalogs); the whole Definition (identity, personality, objectives, guardrails, playbooks, message templates); tool bindings (list / upsert); scheduling config; People field definitions; outreach config; product catalog (read); channels (list / get / request / bind); people (list / get / update, send outreach, list segments); conversations / messages / logs / activity; org; docs. About half the tokens of `full`.
|
|
62
62
|
|
|
63
63
|
Pick one with `--profile core` on the CLI or `createServer({ profile: 'core' })` in code; the `Profile` column below shows which set each tool belongs to, and `npx -y @anychat-ai/mcp tools --profile core` lists just that set. Nothing else changes: `full` stays the default, and the `core` set only ever grows.
|
|
@@ -70,6 +70,9 @@ Pick one with `--profile core` on the CLI or `createServer({ profile: 'core' })`
|
|
|
70
70
|
> @anychat-ai/mcp@0.3.0 tools:md
|
|
71
71
|
> node scripts/tool-table.js
|
|
72
72
|
|
|
73
|
+
> @anychat-ai/mcp@0.3.0 tools:md
|
|
74
|
+
> node scripts/tool-table.js
|
|
75
|
+
|
|
73
76
|
| Tool | Kind | Scope | Profile | Purpose |
|
|
74
77
|
| ----------------------------- | ----------- | ---------------------- | ------- | --------------------------------------------------- |
|
|
75
78
|
| `whoami` | read | `(any)` | core | Who am I |
|
|
@@ -81,8 +84,9 @@ Pick one with `--profile core` on the CLI or `createServer({ profile: 'core' })`
|
|
|
81
84
|
| `export_agent` | read | `agents:read` | core | Export agent |
|
|
82
85
|
| `import_agent` | destructive | `agents:write` | core | Import agent document |
|
|
83
86
|
| `apply_agent_template` | destructive | `templates:apply` | core | Apply agent template |
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
87
|
+
| `get_template_update` | read | `agents:read` | full | Check for a template update |
|
|
88
|
+
| `preview_template_update` | read | `agents:read` | full | Preview a template update (three-way merge) |
|
|
89
|
+
| `apply_template_update` | destructive | `agents:write` | full | Apply a template update |
|
|
86
90
|
| `list_catalog_items` | read | `catalogs:read` | core | List a system catalog |
|
|
87
91
|
| `get_catalog_item` | read | `catalogs:read` | core | Get a catalog item |
|
|
88
92
|
| `get_identity` | read | `agents:read` | core | Get agent identity |
|
|
@@ -181,6 +185,16 @@ Pick one with `--profile core` on the CLI or `createServer({ profile: 'core' })`
|
|
|
181
185
|
|
|
182
186
|
</details>
|
|
183
187
|
|
|
188
|
+
## Contract drift check
|
|
189
|
+
|
|
190
|
+
The tool table is a 1:1 projection of the [Agent API reference](https://docs.anychat.ai/reference/agent-api/), so a route added to the reference without a matching tool is drift. `npm run drift` (after `npm run build`) fetches the live reference, parses its `| Method | Path |` route tables, reads the route each tool declares in its description (`Maps to GET /v1/…`), and reports:
|
|
191
|
+
|
|
192
|
+
- **Missing** — documented routes with no tool. Fails (exit 1) unless the route has a reasoned entry in [`drift-allowlist.json`](drift-allowlist.json).
|
|
193
|
+
- **Undocumented** — tool routes the reference doesn't list. Warning only.
|
|
194
|
+
- **Stale allowlist** — entries that no longer match anything. Warning from the script; the test suite fails on them.
|
|
195
|
+
|
|
196
|
+
`--file <path>` checks a local copy of the reference, `--json` prints the report as JSON. The [nightly workflow](.github/workflows/contract-drift.yml) runs it against docs.anychat.ai and opens (or refreshes) an issue titled "Contract drift: documented /v1 routes without MCP tools" when it fails.
|
|
197
|
+
|
|
184
198
|
## Programmatic use
|
|
185
199
|
|
|
186
200
|
```ts
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { AnyTool } from './tool';
|
|
2
|
+
export type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
3
|
+
export interface Route {
|
|
4
|
+
method: Method;
|
|
5
|
+
/** Normalized: no `/v1` prefix, no query string, every `{param}` → `:p`. */
|
|
6
|
+
path: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DocumentedRoute extends Route {
|
|
9
|
+
/** Nearest preceding `##`/`###` heading, e.g. `Playbooks`. */
|
|
10
|
+
section: string;
|
|
11
|
+
/** Sections whose heading says "(retired …)" are documented but not part of the contract. */
|
|
12
|
+
retired: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ToolRoute extends Route {
|
|
15
|
+
tool: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AllowlistEntry {
|
|
18
|
+
method: Method;
|
|
19
|
+
path: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
}
|
|
22
|
+
export interface Allowlist {
|
|
23
|
+
/** Documented routes deliberately left without a tool. */
|
|
24
|
+
missing: AllowlistEntry[];
|
|
25
|
+
/** Tool routes deliberately absent from the reference. */
|
|
26
|
+
undocumented: AllowlistEntry[];
|
|
27
|
+
}
|
|
28
|
+
export interface DriftReport {
|
|
29
|
+
/** Documented (non-retired) routes with no tool and no allowlist entry → drift. */
|
|
30
|
+
missing: DocumentedRoute[];
|
|
31
|
+
/** Tool routes not in the reference and not allowlisted → warning. */
|
|
32
|
+
undocumented: ToolRoute[];
|
|
33
|
+
/** Allowlist entries that no longer match anything → stale config. */
|
|
34
|
+
staleAllowlist: AllowlistEntry[];
|
|
35
|
+
/** Documented routes covered by at least one tool. */
|
|
36
|
+
covered: number;
|
|
37
|
+
documented: number;
|
|
38
|
+
retired: DocumentedRoute[];
|
|
39
|
+
allowlistedMissing: DocumentedRoute[];
|
|
40
|
+
allowlistedUndocumented: ToolRoute[];
|
|
41
|
+
}
|
|
42
|
+
export declare const REFERENCE_URL = "https://docs.anychat.ai/reference/agent-api/index.md";
|
|
43
|
+
export declare function routeKey(r: Route): string;
|
|
44
|
+
/** `/v1/orgs/{org}/agents/{agent}/x?y=1` → `/orgs/:p/agents/:p/x`. */
|
|
45
|
+
export declare function normalizePath(raw: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Parse the reference markdown. Only rows of `| Method | Path | … |` tables
|
|
48
|
+
* count — that's what the reference calls the contract; prose mentions
|
|
49
|
+
* (`GET /catalogs/{kind}`) do not.
|
|
50
|
+
*/
|
|
51
|
+
export declare function parseReferenceRoutes(markdown: string): DocumentedRoute[];
|
|
52
|
+
/**
|
|
53
|
+
* Extract every `Maps to <METHOD> /v1/…` clause from a tool description.
|
|
54
|
+
* A clause may list sibling routes that differ only in the last segment:
|
|
55
|
+
* `Maps to POST /v1/…/tool-bindings/{toolId}/_enable or …/_disable`.
|
|
56
|
+
* Several clauses in one description are fine.
|
|
57
|
+
*/
|
|
58
|
+
export declare function extractMapsTo(description: string): Route[];
|
|
59
|
+
/** True for tools that don't call the Anychat API at all (docs tools). */
|
|
60
|
+
export declare function isApiTool(tool: AnyTool): boolean;
|
|
61
|
+
export declare function toolRoutes(tools?: readonly AnyTool[]): ToolRoute[];
|
|
62
|
+
export declare const ALLOWLIST_PATH: string;
|
|
63
|
+
export declare function loadAllowlist(file?: string): Allowlist;
|
|
64
|
+
export declare function compareRoutes(documented: readonly DocumentedRoute[], tools: readonly ToolRoute[], allowlist?: Allowlist): DriftReport;
|
|
65
|
+
/** Fetch the reference (or read `--file`), compare against the tool table. */
|
|
66
|
+
export declare function checkContractDrift(opts: {
|
|
67
|
+
markdown?: string;
|
|
68
|
+
url?: string;
|
|
69
|
+
allowlist?: Allowlist;
|
|
70
|
+
tools?: readonly AnyTool[];
|
|
71
|
+
fetchImpl?: typeof fetch;
|
|
72
|
+
}): Promise<DriftReport & {
|
|
73
|
+
source: string;
|
|
74
|
+
}>;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ALLOWLIST_PATH = exports.REFERENCE_URL = void 0;
|
|
37
|
+
exports.routeKey = routeKey;
|
|
38
|
+
exports.normalizePath = normalizePath;
|
|
39
|
+
exports.parseReferenceRoutes = parseReferenceRoutes;
|
|
40
|
+
exports.extractMapsTo = extractMapsTo;
|
|
41
|
+
exports.isApiTool = isApiTool;
|
|
42
|
+
exports.toolRoutes = toolRoutes;
|
|
43
|
+
exports.loadAllowlist = loadAllowlist;
|
|
44
|
+
exports.compareRoutes = compareRoutes;
|
|
45
|
+
exports.checkContractDrift = checkContractDrift;
|
|
46
|
+
/*
|
|
47
|
+
* Contract-drift inventory: which documented `/v1` routes have an MCP tool.
|
|
48
|
+
*
|
|
49
|
+
* Two sources are compared:
|
|
50
|
+
* - the public API reference (`docs/docs/reference/agent-api.md` in the docs
|
|
51
|
+
* repo, published at https://docs.anychat.ai/reference/agent-api/index.md),
|
|
52
|
+
* whose resource sections carry `| Method | Path | … |` route tables;
|
|
53
|
+
* - the tool table, where every tool that calls the API says
|
|
54
|
+
* "Maps to <METHOD> /v1/…" in its description (enforced by
|
|
55
|
+
* test/routeInventory.spec.ts).
|
|
56
|
+
*
|
|
57
|
+
* `scripts/contract-drift.js` (`npm run drift`) drives this against the live
|
|
58
|
+
* docs; `drift-allowlist.json` at the repo root records deliberate omissions.
|
|
59
|
+
*/
|
|
60
|
+
const fs = __importStar(require("node:fs"));
|
|
61
|
+
const path = __importStar(require("node:path"));
|
|
62
|
+
const tools_1 = require("./tools");
|
|
63
|
+
const METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'];
|
|
64
|
+
exports.REFERENCE_URL = 'https://docs.anychat.ai/reference/agent-api/index.md';
|
|
65
|
+
function routeKey(r) {
|
|
66
|
+
return `${r.method} ${r.path}`;
|
|
67
|
+
}
|
|
68
|
+
/** `/v1/orgs/{org}/agents/{agent}/x?y=1` → `/orgs/:p/agents/:p/x`. */
|
|
69
|
+
function normalizePath(raw) {
|
|
70
|
+
let p = raw.trim().replace(/^`|`$/g, '');
|
|
71
|
+
p = p.replace(/[?#].*$/, '');
|
|
72
|
+
if (p.startsWith('/v1/'))
|
|
73
|
+
p = p.slice(3);
|
|
74
|
+
else if (p === '/v1')
|
|
75
|
+
p = '/';
|
|
76
|
+
p = p.replace(/\{[^}]*\}/g, ':p').replace(/:[A-Za-z_][A-Za-z0-9_]*/g, ':p');
|
|
77
|
+
if (p.length > 1)
|
|
78
|
+
p = p.replace(/\/+$/, '');
|
|
79
|
+
return p;
|
|
80
|
+
}
|
|
81
|
+
function asMethod(s) {
|
|
82
|
+
const m = s.trim().replace(/`/g, '').toUpperCase();
|
|
83
|
+
return METHODS.includes(m) ? m : undefined;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Parse the reference markdown. Only rows of `| Method | Path | … |` tables
|
|
87
|
+
* count — that's what the reference calls the contract; prose mentions
|
|
88
|
+
* (`GET /catalogs/{kind}`) do not.
|
|
89
|
+
*/
|
|
90
|
+
function parseReferenceRoutes(markdown) {
|
|
91
|
+
const out = new Map();
|
|
92
|
+
let section = '';
|
|
93
|
+
let inRouteTable = false;
|
|
94
|
+
for (const line of markdown.split(/\r?\n/)) {
|
|
95
|
+
const heading = /^#{2,4}\s+(.*?)\s*$/.exec(line);
|
|
96
|
+
if (heading) {
|
|
97
|
+
section = heading[1].trim();
|
|
98
|
+
inRouteTable = false;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (!line.startsWith('|')) {
|
|
102
|
+
inRouteTable = false;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
const cells = line
|
|
106
|
+
.slice(1)
|
|
107
|
+
.replace(/\|\s*$/, '')
|
|
108
|
+
.split('|')
|
|
109
|
+
.map(c => c.trim());
|
|
110
|
+
if (/^method$/i.test(cells[0] ?? '') && /^path$/i.test(cells[1] ?? '')) {
|
|
111
|
+
inRouteTable = true;
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
if (!inRouteTable || /^-+$/.test(cells[0] ?? ''))
|
|
115
|
+
continue;
|
|
116
|
+
const method = asMethod(cells[0] ?? '');
|
|
117
|
+
const rawPath = (cells[1] ?? '').replace(/`/g, '').trim();
|
|
118
|
+
if (!method || !rawPath.startsWith('/'))
|
|
119
|
+
continue;
|
|
120
|
+
const route = {
|
|
121
|
+
method,
|
|
122
|
+
path: normalizePath(rawPath),
|
|
123
|
+
section,
|
|
124
|
+
retired: /\bretired\b/i.test(section),
|
|
125
|
+
};
|
|
126
|
+
const key = routeKey(route);
|
|
127
|
+
if (!out.has(key))
|
|
128
|
+
out.set(key, route);
|
|
129
|
+
}
|
|
130
|
+
return [...out.values()];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Extract every `Maps to <METHOD> /v1/…` clause from a tool description.
|
|
134
|
+
* A clause may list sibling routes that differ only in the last segment:
|
|
135
|
+
* `Maps to POST /v1/…/tool-bindings/{toolId}/_enable or …/_disable`.
|
|
136
|
+
* Several clauses in one description are fine.
|
|
137
|
+
*/
|
|
138
|
+
function extractMapsTo(description) {
|
|
139
|
+
const routes = [];
|
|
140
|
+
const clause = /Maps to (GET|POST|PUT|PATCH|DELETE) (\/v1\/[^\s"'`,;)]*)((?:\s+or\s+…\/[A-Za-z0-9_\-{}:]+)*)/g;
|
|
141
|
+
for (const m of description.matchAll(clause)) {
|
|
142
|
+
const method = m[1];
|
|
143
|
+
const primary = normalizePath(m[2].replace(/\.$/, ''));
|
|
144
|
+
routes.push({ method, path: primary });
|
|
145
|
+
for (const sib of m[3].matchAll(/…\/([A-Za-z0-9_\-{}:]+)/g)) {
|
|
146
|
+
const parent = primary.slice(0, primary.lastIndexOf('/'));
|
|
147
|
+
routes.push({ method, path: normalizePath(`${parent}/${sib[1]}`) });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return routes;
|
|
151
|
+
}
|
|
152
|
+
/** True for tools that don't call the Anychat API at all (docs tools). */
|
|
153
|
+
function isApiTool(tool) {
|
|
154
|
+
return !tool.scope.startsWith('(none');
|
|
155
|
+
}
|
|
156
|
+
function toolRoutes(tools = tools_1.allTools) {
|
|
157
|
+
const out = [];
|
|
158
|
+
for (const t of tools) {
|
|
159
|
+
for (const r of extractMapsTo(t.description))
|
|
160
|
+
out.push({ ...r, tool: t.name });
|
|
161
|
+
}
|
|
162
|
+
return out;
|
|
163
|
+
}
|
|
164
|
+
exports.ALLOWLIST_PATH = path.resolve(__dirname, '..', 'drift-allowlist.json');
|
|
165
|
+
function loadAllowlist(file = exports.ALLOWLIST_PATH) {
|
|
166
|
+
const raw = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
167
|
+
const norm = (entries, where) => (entries ?? []).map(e => {
|
|
168
|
+
const method = asMethod(e.method);
|
|
169
|
+
if (!method || typeof e.path !== 'string' || !e.reason?.trim()) {
|
|
170
|
+
throw new Error(`drift-allowlist.json ${where}: bad entry ${JSON.stringify(e)}`);
|
|
171
|
+
}
|
|
172
|
+
return { method, path: normalizePath(e.path), reason: e.reason };
|
|
173
|
+
});
|
|
174
|
+
return {
|
|
175
|
+
missing: norm(raw.missing, 'missing'),
|
|
176
|
+
undocumented: norm(raw.undocumented, 'undocumented'),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function compareRoutes(documented, tools, allowlist = { missing: [], undocumented: [] }) {
|
|
180
|
+
const toolKeys = new Set(tools.map(routeKey));
|
|
181
|
+
const docKeys = new Set(documented.filter(d => !d.retired).map(routeKey));
|
|
182
|
+
const normEntry = (e) => ({
|
|
183
|
+
...e,
|
|
184
|
+
path: normalizePath(e.path),
|
|
185
|
+
});
|
|
186
|
+
const allowMissingList = allowlist.missing.map(normEntry);
|
|
187
|
+
const allowUndocList = allowlist.undocumented.map(normEntry);
|
|
188
|
+
const allowMissing = new Set(allowMissingList.map(routeKey));
|
|
189
|
+
const allowUndoc = new Set(allowUndocList.map(routeKey));
|
|
190
|
+
const missing = [];
|
|
191
|
+
const allowlistedMissing = [];
|
|
192
|
+
let covered = 0;
|
|
193
|
+
const live = documented.filter(d => !d.retired);
|
|
194
|
+
for (const d of live) {
|
|
195
|
+
const key = routeKey(d);
|
|
196
|
+
if (toolKeys.has(key))
|
|
197
|
+
covered++;
|
|
198
|
+
else if (allowMissing.has(key))
|
|
199
|
+
allowlistedMissing.push(d);
|
|
200
|
+
else
|
|
201
|
+
missing.push(d);
|
|
202
|
+
}
|
|
203
|
+
const undocumented = [];
|
|
204
|
+
const allowlistedUndocumented = [];
|
|
205
|
+
const seen = new Set();
|
|
206
|
+
for (const t of tools) {
|
|
207
|
+
const key = routeKey(t);
|
|
208
|
+
if (docKeys.has(key))
|
|
209
|
+
continue;
|
|
210
|
+
const dedupe = `${t.tool} ${key}`;
|
|
211
|
+
if (seen.has(dedupe))
|
|
212
|
+
continue;
|
|
213
|
+
seen.add(dedupe);
|
|
214
|
+
if (allowUndoc.has(key))
|
|
215
|
+
allowlistedUndocumented.push(t);
|
|
216
|
+
else
|
|
217
|
+
undocumented.push(t);
|
|
218
|
+
}
|
|
219
|
+
const usedMissing = new Set(allowlistedMissing.map(routeKey));
|
|
220
|
+
const usedUndoc = new Set(allowlistedUndocumented.map(routeKey));
|
|
221
|
+
const staleAllowlist = [
|
|
222
|
+
...allowMissingList.filter(e => !usedMissing.has(routeKey(e))),
|
|
223
|
+
...allowUndocList.filter(e => !usedUndoc.has(routeKey(e))),
|
|
224
|
+
];
|
|
225
|
+
return {
|
|
226
|
+
missing,
|
|
227
|
+
undocumented,
|
|
228
|
+
staleAllowlist,
|
|
229
|
+
covered,
|
|
230
|
+
documented: live.length,
|
|
231
|
+
retired: documented.filter(d => d.retired),
|
|
232
|
+
allowlistedMissing,
|
|
233
|
+
allowlistedUndocumented,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/** Fetch the reference (or read `--file`), compare against the tool table. */
|
|
237
|
+
async function checkContractDrift(opts) {
|
|
238
|
+
let markdown = opts.markdown;
|
|
239
|
+
let source = 'inline';
|
|
240
|
+
if (markdown === undefined) {
|
|
241
|
+
const url = opts.url ?? exports.REFERENCE_URL;
|
|
242
|
+
const res = await (opts.fetchImpl ?? fetch)(url);
|
|
243
|
+
if (!res.ok)
|
|
244
|
+
throw new Error(`fetch ${url} → ${res.status}`);
|
|
245
|
+
markdown = await res.text();
|
|
246
|
+
source = url;
|
|
247
|
+
}
|
|
248
|
+
const documented = parseReferenceRoutes(markdown);
|
|
249
|
+
if (documented.length === 0)
|
|
250
|
+
throw new Error(`no route tables found in ${source}`);
|
|
251
|
+
return {
|
|
252
|
+
source,
|
|
253
|
+
...compareRoutes(documented, toolRoutes(opts.tools), opts.allowlist ?? loadAllowlist()),
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=routeInventory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeInventory.js","sourceRoot":"","sources":["../src/routeInventory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,4BAEC;AAGD,sCAQC;AAYD,oDAsCC;AAQD,sCAcC;AAGD,8BAEC;AAED,gCAMC;AAID,sCAcC;AAED,sCAyDC;AAGD,gDA0BC;AAjRD;;;;;;;;;;;;;GAaG;AACH,4CAA8B;AAC9B,gDAAkC;AAElC,mCAAmC;AAGnC,MAAM,OAAO,GAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE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AAG,CAAC;IACf,CAAC;IACD,MAAM,UAAU,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAClD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,MAAM,EAAE,CAAC,CAAC;IACnF,OAAO;QACL,MAAM;QACN,GAAG,aAAa,CACd,UAAU,EACV,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EACtB,IAAI,CAAC,SAAS,IAAI,aAAa,EAAE,CAClC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/agents.js
CHANGED
|
@@ -174,7 +174,7 @@ exports.agentTools = [
|
|
|
174
174
|
(0, tool_1.defineTool)({
|
|
175
175
|
name: 'apply_agent_template',
|
|
176
176
|
title: 'Apply agent template',
|
|
177
|
-
description: 'Stand an agent up from a catalog AgentTemplate (list_catalog_items kind "agent-templates"): imports its Definition + Capabilities section by section (omitted sections untouched; bindings and secrets never touched) and stamps templateRef so
|
|
177
|
+
description: 'Stand an agent up from a catalog AgentTemplate (list_catalog_items kind "agent-templates"): imports its Definition + Capabilities section by section (omitted sections untouched; bindings and secrets never touched) and stamps templateRef so get_template_update can detect newer versions. Maps to POST /v1/orgs/{org}/agents/{agent}/apply-template.',
|
|
178
178
|
kind: 'destructive',
|
|
179
179
|
scope: 'templates:apply',
|
|
180
180
|
roleFloor: 'editor',
|
|
@@ -190,35 +190,53 @@ exports.agentTools = [
|
|
|
190
190
|
}),
|
|
191
191
|
}),
|
|
192
192
|
(0, tool_1.defineTool)({
|
|
193
|
-
name: '
|
|
194
|
-
title: '
|
|
195
|
-
description: 'Report
|
|
193
|
+
name: 'get_template_update',
|
|
194
|
+
title: 'Check for a template update',
|
|
195
|
+
description: 'Report whether the catalog has published a newer version of the AgentTemplate this agent was created from: { templateRef, latestVersion, latestName, updateAvailable, baseAvailable } (templateRef null when not template-derived; baseAvailable false means every difference will show as a conflict). Nothing changes. Maps to GET /v1/orgs/{org}/agents/{agent}/template-update.',
|
|
196
196
|
kind: 'read',
|
|
197
197
|
scope: 'agents:read',
|
|
198
198
|
roleFloor: 'viewer',
|
|
199
199
|
input: {
|
|
200
200
|
agentId: zod_1.z.string(),
|
|
201
201
|
},
|
|
202
|
-
run: async ({ client }, { agentId }) => client.get(await client.orgPath(agentPath(agentId, '/
|
|
202
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(agentPath(agentId, '/template-update'))),
|
|
203
203
|
}),
|
|
204
204
|
(0, tool_1.defineTool)({
|
|
205
|
-
name: '
|
|
206
|
-
title: '
|
|
207
|
-
description:
|
|
208
|
-
kind: '
|
|
205
|
+
name: 'preview_template_update',
|
|
206
|
+
title: 'Preview a template update (three-way merge)',
|
|
207
|
+
description: 'List the merge items between the template version the agent came from, the latest template version, and the agent as it is now. Each item: path (e.g. definition.playbooks), key (for array sections), label, base/theirs/mine, and status incoming|added|removed (default: take template), local (default: keep yours), conflict (must choose). Read this before apply_template_update. Maps to GET /v1/orgs/{org}/agents/{agent}/template-update/preview.',
|
|
208
|
+
kind: 'read',
|
|
209
|
+
scope: 'agents:read',
|
|
210
|
+
roleFloor: 'viewer',
|
|
211
|
+
input: {
|
|
212
|
+
agentId: zod_1.z.string(),
|
|
213
|
+
},
|
|
214
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(agentPath(agentId, '/template-update/preview'))),
|
|
215
|
+
}),
|
|
216
|
+
(0, tool_1.defineTool)({
|
|
217
|
+
name: 'apply_template_update',
|
|
218
|
+
title: 'Apply a template update',
|
|
219
|
+
description: 'Apply the newer template version as a reviewed merge: unlisted non-conflict items get their default resolution, every conflict from preview_template_update must be resolved (else 422). 409 = the catalog moved past toVersion — preview again. Re-stamps templateRef and returns the updated agent. Overwrites agent content where "template" is chosen — confirm the resolutions with the user first. Maps to POST /v1/orgs/{org}/agents/{agent}/template-update/apply.',
|
|
220
|
+
kind: 'destructive',
|
|
209
221
|
scope: 'agents:write',
|
|
210
222
|
roleFloor: 'editor',
|
|
211
223
|
input: {
|
|
212
224
|
agentId: zod_1.z.string(),
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
.
|
|
225
|
+
toVersion: zod_1.z.string().describe('latestVersion from get_template_update'),
|
|
226
|
+
resolutions: zod_1.z
|
|
227
|
+
.array(zod_1.z.object({
|
|
228
|
+
path: zod_1.z
|
|
229
|
+
.string()
|
|
230
|
+
.describe('Item path from the preview, e.g. definition.playbooks'),
|
|
231
|
+
key: zod_1.z.string().optional().describe('Item key for array sections'),
|
|
232
|
+
choice: zod_1.z.enum(['template', 'mine']),
|
|
233
|
+
}))
|
|
216
234
|
.optional()
|
|
217
|
-
.describe('
|
|
235
|
+
.describe('Choices for conflicts (required) and any non-conflict item you want to override'),
|
|
218
236
|
},
|
|
219
|
-
run: async ({ client }, { agentId,
|
|
220
|
-
|
|
221
|
-
...(
|
|
237
|
+
run: async ({ client }, { agentId, toVersion, resolutions }) => client.post(await client.orgPath(agentPath(agentId, '/template-update/apply')), {
|
|
238
|
+
toVersion,
|
|
239
|
+
...(resolutions ? { resolutions } : {}),
|
|
222
240
|
}),
|
|
223
241
|
}),
|
|
224
242
|
(0, tool_1.defineTool)({
|
package/dist/tools/agents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/tools/agents.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kCAAqC;AAErC;;;;;;GAMG;AAEH,4DAA4D;AAC5D,MAAM,aAAa,GAAG;IACpB,iBAAiB;IACjB,oBAAoB;IACpB,iBAAiB;IACjB,qBAAqB;IACrB,uBAAuB;IACvB,qBAAqB;IACrB,OAAO;IACP,OAAO;IACP,UAAU;IACV,YAAY;IACZ,gBAAgB;CACR,CAAC;AAEX,MAAM,WAAW,GAAG,OAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAEnE,MAAM,SAAS,GAAG,OAAC,CAAC,MAAM,CAA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AC,CAAC,CAAC,EAAE,CAAC;SACxC,CAAC;KACL,CAAC;IAEF,IAAA,iBAAU,EAAC;QACT,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,miBAAmiB;QACriB,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE;YACL,IAAI,EAAE,WAAW;SAClB;QACD,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;KACrE,CAAC;IAEF,IAAA,iBAAU,EAAC;QACT,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,kNAAkN;QACpN,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE;YACL,IAAI,EAAE,WAAW;YACjB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;SACzD;QACD,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CACtC,MAAM,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC;KAC5D,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anychat-ai/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Anychat MCP server — drive your Anychat workspace (agents, playbooks, channels, people, outreach) from Claude Code, Claude Desktop, Cursor, or any MCP host.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anychat",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"test": "TS_NODE_PROJECT=tsconfig.test.json TS_NODE_TRANSPILE_ONLY=true mocha",
|
|
51
51
|
"tools:md": "node scripts/tool-table.js",
|
|
52
52
|
"tokens": "node scripts/tool-tokens.js",
|
|
53
|
+
"drift": "node scripts/contract-drift.js",
|
|
53
54
|
"test:e2e": "ANYCHAT_E2E=1 TS_NODE_PROJECT=tsconfig.test.json TS_NODE_TRANSPILE_ONLY=true mocha 'test/e2e/**/*.spec.ts'"
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|