@anychat-ai/mcp 0.17.0 → 0.19.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 +42 -3
- package/dist/tools/evaluations.d.ts +6 -0
- package/dist/tools/evaluations.js +579 -0
- package/dist/tools/evaluations.js.map +1 -0
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +4 -2
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -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
|
+
168 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 → Campaigns → Evaluations → Testers → 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 166 tools.
|
|
61
61
|
- **`core`** — 62 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, `lint_agent`); the media library (list / add / update / delete); tool bindings (list / upsert); scheduling config; People field definitions; outreach config; product catalog (read); business info (read / replace); channels (list / get / request / bind); people (list / get / update, send outreach, list segments); testers (list); 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.
|
|
@@ -83,6 +83,8 @@ Pick one with `--profile core` on the CLI or `createServer({ profile: 'core' })`
|
|
|
83
83
|
| `apply_template_update` | destructive | `agents:write` | full | Apply a template update |
|
|
84
84
|
| `list_catalog_items` | read | `catalogs:read` | core | List a system catalog |
|
|
85
85
|
| `get_catalog_item` | read | `catalogs:read` | core | Get a catalog item |
|
|
86
|
+
| `set_agent_sandbox` | write | `agents:write` | full | Set sandbox mode |
|
|
87
|
+
| `create_synthetic_people` | write | `people:write` | full | Create synthetic people |
|
|
86
88
|
| `get_identity` | read | `agents:read` | core | Get agent identity |
|
|
87
89
|
| `update_identity` | write | `agents:write` | core | Update agent identity |
|
|
88
90
|
| `get_personality` | read | `agents:read` | core | Get agent personality |
|
|
@@ -174,13 +176,50 @@ Pick one with `--profile core` on the CLI or `createServer({ profile: 'core' })`
|
|
|
174
176
|
| `create_segment` | write | `people:write` | full | Create a people segment |
|
|
175
177
|
| `update_segment` | write | `people:write` | full | Replace a people segment |
|
|
176
178
|
| `delete_segment` | destructive | `people:write` | full | Delete a people segment |
|
|
179
|
+
| `create_campaign` | write | `agents:write` | full | Create campaign |
|
|
180
|
+
| `list_campaigns` | read | `agents:read` | full | List campaigns |
|
|
181
|
+
| `get_campaign` | read | `agents:read` | full | Get campaign |
|
|
182
|
+
| `update_campaign` | write | `agents:write` | full | Update campaign |
|
|
183
|
+
| `delete_campaign` | write | `agents:write` | full | Delete campaign |
|
|
184
|
+
| `stage_campaign` | write | `agents:write` | full | Stage campaign |
|
|
185
|
+
| `list_campaign_recipients` | read | `agents:read` | full | List campaign recipients |
|
|
186
|
+
| `start_campaign` | destructive | `agents:write` | full | Start campaign |
|
|
187
|
+
| `pause_campaign` | write | `agents:write` | full | Pause campaign |
|
|
188
|
+
| `resume_campaign` | write | `agents:write` | full | Resume campaign |
|
|
189
|
+
| `cancel_campaign` | destructive | `agents:write` | full | Cancel campaign |
|
|
190
|
+
| `get_campaign_report` | read | `agents:read` | full | Get campaign report |
|
|
191
|
+
| `preview_campaign_message` | read | `agents:read` | full | Preview campaign message |
|
|
192
|
+
| `list_evaluation_suites` | read | `agents:read` | full | List evaluation suites |
|
|
193
|
+
| `get_evaluation_suite` | read | `agents:read` | full | Get evaluation suite |
|
|
194
|
+
| `create_evaluation_suite` | write | `agents:write` | full | Create evaluation suite |
|
|
195
|
+
| `update_evaluation_suite` | write | `agents:write` | full | Update evaluation suite |
|
|
196
|
+
| `delete_evaluation_suite` | destructive | `agents:write` | full | Delete evaluation suite |
|
|
197
|
+
| `list_evaluation_cases` | read | `agents:read` | full | List evaluation cases |
|
|
198
|
+
| `get_evaluation_case` | read | `agents:read` | full | Get evaluation case |
|
|
199
|
+
| `create_evaluation_case` | write | `agents:write` | full | Create evaluation case |
|
|
200
|
+
| `update_evaluation_case` | write | `agents:write` | full | Update evaluation case |
|
|
201
|
+
| `delete_evaluation_case` | destructive | `agents:write` | full | Delete evaluation case |
|
|
202
|
+
| `generate_evaluation_cases` | write | `agents:write` | full | Generate evaluation cases |
|
|
203
|
+
| `compile_evaluation_case` | write | `agents:write` | full | Compile evaluation case |
|
|
204
|
+
| `preview_evaluation_case` | read | `agents:read` | full | Preview evaluation case |
|
|
205
|
+
| `start_evaluation_run` | write | `agents:write` | full | Start evaluation run |
|
|
206
|
+
| `pause_evaluation_run` | write | `agents:write` | full | Pause evaluation run |
|
|
207
|
+
| `resume_evaluation_run` | write | `agents:write` | full | Resume evaluation run |
|
|
208
|
+
| `cancel_evaluation_run` | write | `agents:write` | full | Cancel evaluation run |
|
|
209
|
+
| `pin_evaluation_run` | write | `agents:write` | full | Pin or unpin evaluation run |
|
|
210
|
+
| `list_evaluation_runs` | read | `agents:read` | full | List evaluation runs |
|
|
211
|
+
| `get_evaluation_run` | read | `agents:read` | full | Get evaluation run |
|
|
212
|
+
| `list_evaluation_results` | read | `agents:read` | full | List evaluation results |
|
|
213
|
+
| `get_evaluation_result` | read | `agents:read` | full | Get evaluation result |
|
|
214
|
+
| `get_evaluation_quota` | read | `agents:read` | full | Get evaluation quota |
|
|
215
|
+
| `get_evaluation_case_history` | read | `agents:read` | full | Get evaluation case history |
|
|
177
216
|
| `list_testers` | read | `agents:read` | core | List testers |
|
|
178
217
|
| `invite_tester` | destructive | `agents:write` | full | Invite tester |
|
|
179
218
|
| `set_tester_disabled` | write | `agents:write` | full | Disable or enable tester |
|
|
180
219
|
| `regenerate_tester_link` | destructive | `agents:write` | full | Regenerate tester sign-in link |
|
|
181
220
|
| `remove_tester` | destructive | `agents:write` | full | Remove tester |
|
|
182
221
|
| `list_messages` | read | `messages:read` | core | List messages |
|
|
183
|
-
| `
|
|
222
|
+
| `list_sessions` | read | `messages:read` | core | List sessions |
|
|
184
223
|
| `list_users` | read | `messages:read` | full | List users |
|
|
185
224
|
| `list_logs` | read | `messages:read` | core | List runtime logs |
|
|
186
225
|
| `list_turns` | read | `messages:read` | full | List turn traces |
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evaluations — suites of authored cases run through the agent's real
|
|
3
|
+
* production pipeline against an ephemeral person, scored by deterministic
|
|
4
|
+
* checks and an LLM judge. Runs spend the agent's daily evaluation units.
|
|
5
|
+
*/
|
|
6
|
+
export declare const evaluationTools: import("../tool").AnyTool[];
|
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.evaluationTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tool_1 = require("../tool");
|
|
6
|
+
const evalPath = (agentId, sub = '') => `/agents/${encodeURIComponent(agentId)}/evaluations${sub}`;
|
|
7
|
+
const suitePath = (agentId, suiteId, sub = '') => evalPath(agentId, `/suites/${encodeURIComponent(suiteId)}${sub}`);
|
|
8
|
+
const casePath = (agentId, suiteId, caseId, sub = '') => suitePath(agentId, suiteId, `/cases/${encodeURIComponent(caseId)}${sub}`);
|
|
9
|
+
const runPath = (agentId, runId, sub = '') => evalPath(agentId, `/runs/${encodeURIComponent(runId)}${sub}`);
|
|
10
|
+
/*
|
|
11
|
+
* The case document — a hand-written zod mirror of the agent's
|
|
12
|
+
* `evaluation-case.schema.json` (draft-07). Closed objects are strict so a
|
|
13
|
+
* typo in a check key fails at the tool boundary, exactly as the API's lint
|
|
14
|
+
* would reject it.
|
|
15
|
+
*/
|
|
16
|
+
const systemEvent = zod_1.z.enum(['optOut', 'optIn', 'subscribed', 'unsubscribed']);
|
|
17
|
+
const fallback = zod_1.z
|
|
18
|
+
.string()
|
|
19
|
+
.max(4000)
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('Text sent instead when the expected UI element is absent');
|
|
22
|
+
const personFixture = zod_1.z.strictObject({
|
|
23
|
+
fullName: zod_1.z.string().max(200).optional(),
|
|
24
|
+
firstName: zod_1.z.string().max(100).optional(),
|
|
25
|
+
lastName: zod_1.z.string().max(100).optional(),
|
|
26
|
+
email: zod_1.z.string().max(300).optional(),
|
|
27
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
28
|
+
company: zod_1.z.string().max(200).optional(),
|
|
29
|
+
title: zod_1.z.string().max(200).optional(),
|
|
30
|
+
productInterest: zod_1.z.string().max(200).optional(),
|
|
31
|
+
status: zod_1.z.enum(['new', 'contacted', 'qualified', 'converted', 'lost']).optional(),
|
|
32
|
+
source: zod_1.z.string().max(200).optional(),
|
|
33
|
+
customFields: zod_1.z.record(zod_1.z.string(), zod_1.z.string().max(2000)).optional(),
|
|
34
|
+
assignedRepresentativeId: zod_1.z.string().max(200).optional(),
|
|
35
|
+
consent: zod_1.z
|
|
36
|
+
.strictObject({ status: zod_1.z.enum(['granted', 'denied', 'unknown']) })
|
|
37
|
+
.optional(),
|
|
38
|
+
tags: zod_1.z.array(zod_1.z.string().max(60)).optional(),
|
|
39
|
+
notes: zod_1.z.string().max(5000).optional(),
|
|
40
|
+
});
|
|
41
|
+
const scenarioSchema = zod_1.z
|
|
42
|
+
.strictObject({
|
|
43
|
+
channel: zod_1.z.enum(['rcs', 'sms', 'whatsapp', 'appleMessages', 'webchat']).optional(),
|
|
44
|
+
provider: zod_1.z.string().max(40).optional(),
|
|
45
|
+
person: personFixture
|
|
46
|
+
.nullable()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('The person the agent already knows (null = a stranger)'),
|
|
49
|
+
appointments: zod_1.z
|
|
50
|
+
.array(zod_1.z.strictObject({
|
|
51
|
+
startsIn: zod_1.z
|
|
52
|
+
.string()
|
|
53
|
+
.regex(/^-?P(?!$)(\d+D)?(T(\d+H)?(\d+M)?)?$/)
|
|
54
|
+
.describe('ISO-8601 duration from now, e.g. PT15M, P2D, -P1D'),
|
|
55
|
+
durationMinutes: zod_1.z.number().int().min(5).max(480).optional(),
|
|
56
|
+
representativeId: zod_1.z.string().max(200).optional(),
|
|
57
|
+
status: zod_1.z.enum(['scheduled', 'cancelled', 'completed']).optional(),
|
|
58
|
+
}))
|
|
59
|
+
.max(5)
|
|
60
|
+
.optional(),
|
|
61
|
+
start: zod_1.z
|
|
62
|
+
.strictObject({
|
|
63
|
+
inbound: zod_1.z.boolean().optional().describe('The person writes first (default)'),
|
|
64
|
+
outreach: zod_1.z
|
|
65
|
+
.strictObject({
|
|
66
|
+
playbookId: zod_1.z.string().max(200).optional(),
|
|
67
|
+
greetingTemplateId: zod_1.z.string().max(200).optional(),
|
|
68
|
+
formData: zod_1.z.record(zod_1.z.string(), zod_1.z.string().max(2000)).optional(),
|
|
69
|
+
campaign: zod_1.z.boolean().optional().describe('Template-only campaign opener'),
|
|
70
|
+
})
|
|
71
|
+
.optional()
|
|
72
|
+
.describe('Operator-originated opening'),
|
|
73
|
+
reminder: zod_1.z.boolean().optional().describe('Opens from an appointment reminder'),
|
|
74
|
+
resume: zod_1.z
|
|
75
|
+
.strictObject({ activePlaybook: zod_1.z.string().max(200) })
|
|
76
|
+
.optional()
|
|
77
|
+
.describe('Mid-conversation: prior history + this active playbook'),
|
|
78
|
+
})
|
|
79
|
+
.optional(),
|
|
80
|
+
history: zod_1.z
|
|
81
|
+
.array(zod_1.z.strictObject({
|
|
82
|
+
role: zod_1.z.enum(['user', 'assistant']),
|
|
83
|
+
content: zod_1.z.string().max(4000),
|
|
84
|
+
}))
|
|
85
|
+
.max(40)
|
|
86
|
+
.optional(),
|
|
87
|
+
clock: zod_1.z
|
|
88
|
+
.strictObject({
|
|
89
|
+
now: zod_1.z.string().optional().describe('Absolute ISO-8601 instant'),
|
|
90
|
+
weekday: zod_1.z
|
|
91
|
+
.enum([
|
|
92
|
+
'monday',
|
|
93
|
+
'tuesday',
|
|
94
|
+
'wednesday',
|
|
95
|
+
'thursday',
|
|
96
|
+
'friday',
|
|
97
|
+
'saturday',
|
|
98
|
+
'sunday',
|
|
99
|
+
])
|
|
100
|
+
.optional(),
|
|
101
|
+
time: zod_1.z
|
|
102
|
+
.string()
|
|
103
|
+
.regex(/^([01]\d|2[0-3]):[0-5]\d$/)
|
|
104
|
+
.optional()
|
|
105
|
+
.describe('HH:mm in timezone'),
|
|
106
|
+
timezone: zod_1.z.string().max(100).optional(),
|
|
107
|
+
})
|
|
108
|
+
.optional(),
|
|
109
|
+
stubs: zod_1.z
|
|
110
|
+
.record(zod_1.z.string(), zod_1.z.unknown())
|
|
111
|
+
.optional()
|
|
112
|
+
.describe('Stubbed custom-integration responses, keyed by tool id'),
|
|
113
|
+
})
|
|
114
|
+
.describe('The world the case runs in');
|
|
115
|
+
const turnSchema = zod_1.z.union([
|
|
116
|
+
zod_1.z.string().min(1).max(4000).describe('Free text the person sends'),
|
|
117
|
+
zod_1.z.strictObject({ chip: zod_1.z.string().max(200), fallback }),
|
|
118
|
+
zod_1.z.strictObject({ slot: zod_1.z.number().int().min(0).max(50), fallback }),
|
|
119
|
+
zod_1.z.strictObject({ confirm: zod_1.z.boolean(), fallback }),
|
|
120
|
+
zod_1.z.strictObject({ system: systemEvent }),
|
|
121
|
+
zod_1.z.strictObject({
|
|
122
|
+
action: zod_1.z.enum(['calendar', 'dial', 'url', 'viewLocation']),
|
|
123
|
+
label: zod_1.z.string().max(200).optional(),
|
|
124
|
+
}),
|
|
125
|
+
zod_1.z.strictObject({
|
|
126
|
+
media: zod_1.z.enum(['image', 'video']),
|
|
127
|
+
url: zod_1.z.string().max(2000),
|
|
128
|
+
text: zod_1.z.string().max(4000).optional(),
|
|
129
|
+
}),
|
|
130
|
+
zod_1.z.strictObject({
|
|
131
|
+
simulate: zod_1.z.strictObject({
|
|
132
|
+
goal: zod_1.z.string().max(2000),
|
|
133
|
+
persona: zod_1.z.string().max(2000).optional(),
|
|
134
|
+
knows: zod_1.z.array(zod_1.z.string().max(500)).max(20).optional(),
|
|
135
|
+
until: zod_1.z.string().max(1000).optional(),
|
|
136
|
+
maxTurns: zod_1.z.number().int().min(1).max(20).optional(),
|
|
137
|
+
}),
|
|
138
|
+
}),
|
|
139
|
+
]);
|
|
140
|
+
const checksSchema = zod_1.z.strictObject({
|
|
141
|
+
finalReplyNonEmpty: zod_1.z.boolean().optional(),
|
|
142
|
+
pickerShown: zod_1.z.boolean().optional(),
|
|
143
|
+
appointmentCreated: zod_1.z.boolean().optional(),
|
|
144
|
+
activeAppointments: zod_1.z.number().int().min(0).optional(),
|
|
145
|
+
outcomes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
146
|
+
activePlaybookAtEnd: zod_1.z.string().optional(),
|
|
147
|
+
personFields: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
148
|
+
chipsOnAnyTurn: zod_1.z.array(zod_1.z.string()).optional(),
|
|
149
|
+
chipsOnLastMessage: zod_1.z.boolean().optional(),
|
|
150
|
+
textIncludes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
151
|
+
textExcludes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
152
|
+
textMatches: zod_1.z.array(zod_1.z.string()).optional(),
|
|
153
|
+
toolsCalled: zod_1.z.record(zod_1.z.string(), zod_1.z.number().int().min(0)).optional(),
|
|
154
|
+
toolsNotCalled: zod_1.z.array(zod_1.z.string()).optional(),
|
|
155
|
+
noWarnings: zod_1.z.boolean().optional(),
|
|
156
|
+
maxModelCallsPerTurn: zod_1.z.number().int().min(1).optional(),
|
|
157
|
+
maxTurnsToOutcome: zod_1.z.number().int().min(1).optional(),
|
|
158
|
+
replyCount: zod_1.z
|
|
159
|
+
.strictObject({
|
|
160
|
+
min: zod_1.z.number().int().min(0).optional(),
|
|
161
|
+
max: zod_1.z.number().int().min(0).optional(),
|
|
162
|
+
})
|
|
163
|
+
.optional(),
|
|
164
|
+
noReplyTo: zod_1.z.array(systemEvent).optional(),
|
|
165
|
+
});
|
|
166
|
+
const judgeSchema = zod_1.z.strictObject({
|
|
167
|
+
criteria: zod_1.z
|
|
168
|
+
.array(zod_1.z.strictObject({
|
|
169
|
+
id: zod_1.z.string().regex(/^[a-z0-9][a-z0-9-]{0,58}$/),
|
|
170
|
+
text: zod_1.z.string().min(1).max(1000),
|
|
171
|
+
}))
|
|
172
|
+
.max(20)
|
|
173
|
+
.optional()
|
|
174
|
+
.describe('Pass/fail statements about the transcript'),
|
|
175
|
+
});
|
|
176
|
+
/** The use case in English — the primary authoring surface. */
|
|
177
|
+
const briefSchema = zod_1.z
|
|
178
|
+
.strictObject({
|
|
179
|
+
scenario: zod_1.z
|
|
180
|
+
.string()
|
|
181
|
+
.min(1)
|
|
182
|
+
.max(2000)
|
|
183
|
+
.describe('Who the person is, what the agent already knows about them, how the conversation starts, what they say'),
|
|
184
|
+
expected: zod_1.z
|
|
185
|
+
.string()
|
|
186
|
+
.min(1)
|
|
187
|
+
.max(2000)
|
|
188
|
+
.describe('What must be true of the agent’s behavior'),
|
|
189
|
+
})
|
|
190
|
+
.describe('The case in English; the structure below is compiled from it');
|
|
191
|
+
/** The authored case document (ids live outside it). */
|
|
192
|
+
const caseDocumentShape = {
|
|
193
|
+
key: zod_1.z
|
|
194
|
+
.string()
|
|
195
|
+
.regex(/^[a-z0-9][a-z0-9-]{0,118}$/)
|
|
196
|
+
.optional()
|
|
197
|
+
.describe('Slug, unique within the suite'),
|
|
198
|
+
title: zod_1.z.string().min(1).max(300),
|
|
199
|
+
brief: briefSchema.optional(),
|
|
200
|
+
notes: zod_1.z.string().max(4000).optional(),
|
|
201
|
+
tags: zod_1.z.array(zod_1.z.string().max(60)).max(20).optional(),
|
|
202
|
+
scenario: scenarioSchema.optional(),
|
|
203
|
+
turns: zod_1.z
|
|
204
|
+
.array(turnSchema)
|
|
205
|
+
.max(40)
|
|
206
|
+
.describe('The person’s side, one per turn; [] = a brief-only draft (not runnable yet)'),
|
|
207
|
+
expect: zod_1.z
|
|
208
|
+
.strictObject({ checks: checksSchema.optional(), judge: judgeSchema.optional() })
|
|
209
|
+
.optional(),
|
|
210
|
+
samples: zod_1.z
|
|
211
|
+
.number()
|
|
212
|
+
.int()
|
|
213
|
+
.min(1)
|
|
214
|
+
.max(5)
|
|
215
|
+
.optional()
|
|
216
|
+
.describe('Repetitions per run; the case passes only if every sample passes'),
|
|
217
|
+
origin: zod_1.z
|
|
218
|
+
.strictObject({
|
|
219
|
+
conversationId: zod_1.z.string().optional(),
|
|
220
|
+
userId: zod_1.z.string().optional(),
|
|
221
|
+
recordedAt: zod_1.z.string().optional(),
|
|
222
|
+
generatedFrom: zod_1.z.string().max(4000).optional(),
|
|
223
|
+
generatedAt: zod_1.z.string().optional(),
|
|
224
|
+
})
|
|
225
|
+
.optional()
|
|
226
|
+
.describe('Set by the platform when recorded from a conversation or generated'),
|
|
227
|
+
};
|
|
228
|
+
const caseDocumentSchema = zod_1.z.strictObject(caseDocumentShape);
|
|
229
|
+
const suiteDefaultsSchema = zod_1.z
|
|
230
|
+
.strictObject({
|
|
231
|
+
scenario: zod_1.z
|
|
232
|
+
.strictObject({
|
|
233
|
+
channel: zod_1.z
|
|
234
|
+
.enum(['rcs', 'sms', 'whatsapp', 'appleMessages', 'webchat'])
|
|
235
|
+
.optional(),
|
|
236
|
+
provider: zod_1.z.string().max(40).optional(),
|
|
237
|
+
})
|
|
238
|
+
.optional(),
|
|
239
|
+
samples: zod_1.z.number().int().min(1).max(5).optional(),
|
|
240
|
+
})
|
|
241
|
+
.describe('Merged UNDER every case in the suite (the case always wins)');
|
|
242
|
+
/** What a model needs to author a case; carried once, on create_evaluation_case. */
|
|
243
|
+
const CASE_DOCUMENT_GUIDE = 'A case is one situation the agent must handle well. Write the BRIEF first (scenario + expected, in English); then either compile it with compile_evaluation_case and save the returned document, or supply the structure yourself. ' +
|
|
244
|
+
'BRIEF.scenario = who the person is, what the agent already knows about them (only facts the agent’s Brief renders: name, email, phone, company, title, product interest, declared custom fields, an assigned representative, an existing appointment), how the conversation starts, what they say; BRIEF.expected = what must be true of the agent’s behavior. A brief with turns: [] is a draft (lint warning, not runnable). ' +
|
|
245
|
+
'STRUCTURE (the Advanced view): SCENARIO = the world it runs in: channel, the person the agent already knows (a People fixture, or null for a stranger), existing appointments (startsIn relative to now), how the conversation opens (start.inbound | start.outreach | start.reminder | start.resume), prior history, clock, and stubbed custom-integration responses. ' +
|
|
246
|
+
'TURNS = the person’s side, one directive per turn (1–6 is typical): a plain string; { chip } taps a suggestion; { slot } picks the Nth offered time slot; { confirm } answers yes/no; { system: optOut|optIn|subscribed|unsubscribed } raises a channel event; { action: calendar|dial|url|viewLocation } taps a rich action; { media: image|video, url } sends an attachment; { simulate: { goal, persona?, knows?, until?, maxTurns? } } hands the rest to an LLM-played person (not available yet — do not use). Every chip / slot / confirm carries a fallback the person would plausibly type. ' +
|
|
247
|
+
'EXPECT.CHECKS is a CLOSED vocabulary (unknown keys are rejected): finalReplyNonEmpty (last agent turn has text); pickerShown (a time-slot picker was offered); appointmentCreated; activeAppointments (count at end, seeded ones included); outcomes (ordered flow outcome ids); activePlaybookAtEnd; personFields (People fields set to these values); chipsOnAnyTurn (these suggestions offered at least once); chipsOnLastMessage; textIncludes / textExcludes (substrings across agent text); textMatches (regexes); toolsCalled (capability id → exact call count); toolsNotCalled; noWarnings (no runtime warnings); maxModelCallsPerTurn; maxTurnsToOutcome; replyCount { min, max } (agent messages per person turn); noReplyTo (the agent stays silent on these system events). ' +
|
|
248
|
+
'EXPECT.JUDGE = criteria [{ id, text }] an LLM judge grades pass/fail with quoted evidence; each criterion names one observable fact and, when it matters, the turn (“the first reply …”). ' +
|
|
249
|
+
'Rules: prefer a deterministic check over a criterion whenever one can express the expectation (a cancellation → toolsCalled + activeAppointments; a booking → appointmentCreated; a picker → pickerShown; a forbidden claim → textExcludes) and keep criteria for what only a reader can judge (tone, not re-asking known facts, no over-promising); relative dates only (“next Tuesday”), never absolute; reference only playbook ids, template ids, representative ids and People field keys that exist on this agent; a reminder start needs an upcoming scenario.appointments entry; leave samples at 1. ' +
|
|
250
|
+
'samples (1–5) repeats the case; it passes only if every sample passes. Suite defaults (channel/provider, samples) merge under the document.';
|
|
251
|
+
/**
|
|
252
|
+
* Evaluations — suites of authored cases run through the agent's real
|
|
253
|
+
* production pipeline against an ephemeral person, scored by deterministic
|
|
254
|
+
* checks and an LLM judge. Runs spend the agent's daily evaluation units.
|
|
255
|
+
*/
|
|
256
|
+
exports.evaluationTools = [
|
|
257
|
+
(0, tool_1.defineTool)({
|
|
258
|
+
name: 'list_evaluation_suites',
|
|
259
|
+
title: 'List evaluation suites',
|
|
260
|
+
description: 'List an agent’s evaluation suites with caseCount and lastRun (status + pass/fail counts). Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/suites.',
|
|
261
|
+
kind: 'read',
|
|
262
|
+
scope: 'agents:read',
|
|
263
|
+
roleFloor: 'viewer',
|
|
264
|
+
input: { agentId: zod_1.z.string().describe('Agent id') },
|
|
265
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(evalPath(agentId, '/suites'))),
|
|
266
|
+
}),
|
|
267
|
+
(0, tool_1.defineTool)({
|
|
268
|
+
name: 'get_evaluation_suite',
|
|
269
|
+
title: 'Get evaluation suite',
|
|
270
|
+
description: 'Fetch one evaluation suite: name, description, defaults (merged under every case), tags. Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}.',
|
|
271
|
+
kind: 'read',
|
|
272
|
+
scope: 'agents:read',
|
|
273
|
+
roleFloor: 'viewer',
|
|
274
|
+
input: { agentId: zod_1.z.string(), suiteId: zod_1.z.string() },
|
|
275
|
+
run: async ({ client }, { agentId, suiteId }) => client.get(await client.orgPath(suitePath(agentId, suiteId))),
|
|
276
|
+
}),
|
|
277
|
+
(0, tool_1.defineTool)({
|
|
278
|
+
name: 'create_evaluation_suite',
|
|
279
|
+
title: 'Create evaluation suite',
|
|
280
|
+
description: 'Create an evaluation suite, optionally seeded with case documents (same shape as create_evaluation_case; each returned case carries its lint findings). Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/suites.',
|
|
281
|
+
kind: 'write',
|
|
282
|
+
scope: 'agents:write',
|
|
283
|
+
roleFloor: 'editor',
|
|
284
|
+
input: {
|
|
285
|
+
agentId: zod_1.z.string(),
|
|
286
|
+
name: zod_1.z.string().min(1).max(120),
|
|
287
|
+
description: zod_1.z.string().max(2000).optional(),
|
|
288
|
+
defaults: suiteDefaultsSchema.optional(),
|
|
289
|
+
tags: zod_1.z.array(zod_1.z.string().max(60)).max(20).optional(),
|
|
290
|
+
cases: zod_1.z.array(caseDocumentSchema).optional(),
|
|
291
|
+
},
|
|
292
|
+
run: async ({ client }, { agentId, ...body }) => client.post(await client.orgPath(evalPath(agentId, '/suites')), body),
|
|
293
|
+
}),
|
|
294
|
+
(0, tool_1.defineTool)({
|
|
295
|
+
name: 'update_evaluation_suite',
|
|
296
|
+
title: 'Update evaluation suite',
|
|
297
|
+
description: 'Edit a suite’s name, description, defaults, or tags (fields omitted are unchanged; cases are managed with the case tools). Maps to PATCH /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}.',
|
|
298
|
+
kind: 'write',
|
|
299
|
+
scope: 'agents:write',
|
|
300
|
+
roleFloor: 'editor',
|
|
301
|
+
input: {
|
|
302
|
+
agentId: zod_1.z.string(),
|
|
303
|
+
suiteId: zod_1.z.string(),
|
|
304
|
+
name: zod_1.z.string().min(1).max(120).optional(),
|
|
305
|
+
description: zod_1.z.string().max(2000).optional(),
|
|
306
|
+
defaults: suiteDefaultsSchema.optional(),
|
|
307
|
+
tags: zod_1.z.array(zod_1.z.string().max(60)).max(20).optional(),
|
|
308
|
+
},
|
|
309
|
+
run: async ({ client }, { agentId, suiteId, ...body }) => client.patch(await client.orgPath(suitePath(agentId, suiteId)), body),
|
|
310
|
+
}),
|
|
311
|
+
(0, tool_1.defineTool)({
|
|
312
|
+
name: 'delete_evaluation_suite',
|
|
313
|
+
title: 'Delete evaluation suite',
|
|
314
|
+
description: 'Delete a suite and every case in it. Past runs and results are kept for history. Maps to DELETE /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}.',
|
|
315
|
+
kind: 'destructive',
|
|
316
|
+
scope: 'agents:write',
|
|
317
|
+
roleFloor: 'editor',
|
|
318
|
+
input: { agentId: zod_1.z.string(), suiteId: zod_1.z.string() },
|
|
319
|
+
run: async ({ client }, { agentId, suiteId }) => client.delete(await client.orgPath(suitePath(agentId, suiteId))),
|
|
320
|
+
}),
|
|
321
|
+
(0, tool_1.defineTool)({
|
|
322
|
+
name: 'list_evaluation_cases',
|
|
323
|
+
title: 'List evaluation cases',
|
|
324
|
+
description: 'List the cases in a suite (key, title, tags, lastVerdict from the most recent run). Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases.',
|
|
325
|
+
kind: 'read',
|
|
326
|
+
scope: 'agents:read',
|
|
327
|
+
roleFloor: 'viewer',
|
|
328
|
+
input: { agentId: zod_1.z.string(), suiteId: zod_1.z.string() },
|
|
329
|
+
run: async ({ client }, { agentId, suiteId }) => client.get(await client.orgPath(suitePath(agentId, suiteId, '/cases'))),
|
|
330
|
+
}),
|
|
331
|
+
(0, tool_1.defineTool)({
|
|
332
|
+
name: 'get_evaluation_case',
|
|
333
|
+
title: 'Get evaluation case',
|
|
334
|
+
description: 'Fetch one case: the full document plus its lint findings (severity, code, path, message). Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases/{case}.',
|
|
335
|
+
kind: 'read',
|
|
336
|
+
scope: 'agents:read',
|
|
337
|
+
roleFloor: 'viewer',
|
|
338
|
+
input: { agentId: zod_1.z.string(), suiteId: zod_1.z.string(), caseId: zod_1.z.string() },
|
|
339
|
+
run: async ({ client }, { agentId, suiteId, caseId }) => client.get(await client.orgPath(casePath(agentId, suiteId, caseId))),
|
|
340
|
+
}),
|
|
341
|
+
(0, tool_1.defineTool)({
|
|
342
|
+
name: 'create_evaluation_case',
|
|
343
|
+
title: 'Create evaluation case',
|
|
344
|
+
description: `Add a case to a suite; the input is the case document. ${CASE_DOCUMENT_GUIDE} ` +
|
|
345
|
+
'Returns the stored case with lint findings (a brief without turns saves as a draft with a case.brief.not-compiled warning); a document that fails validation is rejected with 422 and the findings. To have the model write several cases from one description, use generate_evaluation_cases instead. Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases.',
|
|
346
|
+
kind: 'write',
|
|
347
|
+
scope: 'agents:write',
|
|
348
|
+
roleFloor: 'editor',
|
|
349
|
+
input: { agentId: zod_1.z.string(), suiteId: zod_1.z.string(), ...caseDocumentShape },
|
|
350
|
+
run: async ({ client }, { agentId, suiteId, ...document }) => client.post(await client.orgPath(suitePath(agentId, suiteId, '/cases')), document),
|
|
351
|
+
}),
|
|
352
|
+
(0, tool_1.defineTool)({
|
|
353
|
+
name: 'update_evaluation_case',
|
|
354
|
+
title: 'Update evaluation case',
|
|
355
|
+
description: 'Replace a case’s document whole (same input as create_evaluation_case — send the complete document, not a patch). Write the brief first (scenario + expected, in English); then either compile it with compile_evaluation_case (pass caseId and the current structure so advanced edits survive) and save the returned document here, or supply the structure yourself. Returns the stored case with lint findings. Maps to PUT /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases/{case}.',
|
|
356
|
+
kind: 'write',
|
|
357
|
+
scope: 'agents:write',
|
|
358
|
+
roleFloor: 'editor',
|
|
359
|
+
input: {
|
|
360
|
+
agentId: zod_1.z.string(),
|
|
361
|
+
suiteId: zod_1.z.string(),
|
|
362
|
+
caseId: zod_1.z.string(),
|
|
363
|
+
...caseDocumentShape,
|
|
364
|
+
},
|
|
365
|
+
run: async ({ client }, { agentId, suiteId, caseId, ...document }) => client.put(await client.orgPath(casePath(agentId, suiteId, caseId)), document),
|
|
366
|
+
}),
|
|
367
|
+
(0, tool_1.defineTool)({
|
|
368
|
+
name: 'delete_evaluation_case',
|
|
369
|
+
title: 'Delete evaluation case',
|
|
370
|
+
description: 'Delete a case from its suite; past results for it are kept. Maps to DELETE /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases/{case}.',
|
|
371
|
+
kind: 'destructive',
|
|
372
|
+
scope: 'agents:write',
|
|
373
|
+
roleFloor: 'editor',
|
|
374
|
+
input: { agentId: zod_1.z.string(), suiteId: zod_1.z.string(), caseId: zod_1.z.string() },
|
|
375
|
+
run: async ({ client }, { agentId, suiteId, caseId }) => client.delete(await client.orgPath(casePath(agentId, suiteId, caseId))),
|
|
376
|
+
}),
|
|
377
|
+
(0, tool_1.defineTool)({
|
|
378
|
+
name: 'generate_evaluation_cases',
|
|
379
|
+
title: 'Generate evaluation cases',
|
|
380
|
+
description: 'Have the platform’s authoring model write several distinct cases (brief + compiled structure) for a situation described in English, and add them to the suite. Give the description (what to test, e.g. “a person replying to an appointment reminder”), roughly how many cases (1–15; the model covers the happy path, a terse person, a digression, a refusal, an edge), and optional tags. Existing cases in the suite are not duplicated. Returns 201 { cases (each with lint), dropped (drafts that failed lint after one repair, with findings), usage }; each case carries origin.generatedFrom / generatedAt. Spends model tokens on the org’s assist meter, not evaluation units; a long call (allow up to ~3 minutes). 422 for an empty description or count out of range; 503 authoring_unavailable when the deployment has no authoring model. Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases/generate.',
|
|
381
|
+
kind: 'write',
|
|
382
|
+
scope: 'agents:write',
|
|
383
|
+
roleFloor: 'editor',
|
|
384
|
+
input: {
|
|
385
|
+
agentId: zod_1.z.string(),
|
|
386
|
+
suiteId: zod_1.z.string(),
|
|
387
|
+
description: zod_1.z
|
|
388
|
+
.string()
|
|
389
|
+
.min(1)
|
|
390
|
+
.max(4000)
|
|
391
|
+
.describe('The situation to test, in English'),
|
|
392
|
+
count: zod_1.z.number().int().min(1).max(15).describe('Roughly how many cases'),
|
|
393
|
+
tags: zod_1.z
|
|
394
|
+
.array(zod_1.z.string().max(60))
|
|
395
|
+
.max(20)
|
|
396
|
+
.optional()
|
|
397
|
+
.describe('Applied to every case'),
|
|
398
|
+
},
|
|
399
|
+
run: async ({ client }, { agentId, suiteId, ...body }) => client.post(await client.orgPath(suitePath(agentId, suiteId, '/cases/generate')), body),
|
|
400
|
+
}),
|
|
401
|
+
(0, tool_1.defineTool)({
|
|
402
|
+
name: 'compile_evaluation_case',
|
|
403
|
+
title: 'Compile evaluation case',
|
|
404
|
+
description: 'Turn a brief (scenario + expected, in English) into a full case document — scenario, turns, checks and judge criteria — using the platform’s authoring model. Persists nothing: save the returned document with create_evaluation_case or update_evaluation_case. Pass current (the structured part of an existing document) and caseId when re-compiling an edited brief so the model makes the smallest change and keeps advanced edits the brief does not contradict. Returns { document, lint, usage, caveat? } — caveat is the model’s one line on anything the brief asked for that a case cannot express. Spends model tokens on the org’s assist meter, not evaluation units. 422 for half a brief; 503 authoring_unavailable when the deployment has no authoring model. Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases/compile.',
|
|
405
|
+
kind: 'write',
|
|
406
|
+
scope: 'agents:write',
|
|
407
|
+
roleFloor: 'editor',
|
|
408
|
+
input: {
|
|
409
|
+
agentId: zod_1.z.string(),
|
|
410
|
+
suiteId: zod_1.z.string(),
|
|
411
|
+
brief: briefSchema,
|
|
412
|
+
current: caseDocumentSchema
|
|
413
|
+
.optional()
|
|
414
|
+
.describe('The existing document to keep where the brief allows'),
|
|
415
|
+
caseId: zod_1.z.string().optional().describe('The stored case being re-compiled'),
|
|
416
|
+
},
|
|
417
|
+
run: async ({ client }, { agentId, suiteId, ...body }) => client.post(await client.orgPath(suitePath(agentId, suiteId, '/cases/compile')), body),
|
|
418
|
+
}),
|
|
419
|
+
(0, tool_1.defineTool)({
|
|
420
|
+
name: 'preview_evaluation_case',
|
|
421
|
+
title: 'Preview evaluation case',
|
|
422
|
+
description: 'Resolve a case WITHOUT running it: suite defaults applied, the scenario as the runner would build it (person fixture, opening, clock), the turn script, the checks and judge criteria in force, the unit estimate, and lint findings. Pass caseId for a stored case, or document (an unsaved case document, same shape as create_evaluation_case) to preview before saving. Spends no units. Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases/{case}/preview; with document, Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/suites/{suite}/cases/preview.',
|
|
423
|
+
kind: 'read',
|
|
424
|
+
scope: 'agents:read',
|
|
425
|
+
roleFloor: 'viewer',
|
|
426
|
+
input: {
|
|
427
|
+
agentId: zod_1.z.string(),
|
|
428
|
+
suiteId: zod_1.z.string(),
|
|
429
|
+
caseId: zod_1.z.string().optional().describe('A stored case'),
|
|
430
|
+
document: caseDocumentSchema.optional().describe('An unsaved case document'),
|
|
431
|
+
},
|
|
432
|
+
run: async ({ client }, { agentId, suiteId, caseId, document }) => {
|
|
433
|
+
if (caseId) {
|
|
434
|
+
return client.post(await client.orgPath(casePath(agentId, suiteId, caseId, '/preview')), {});
|
|
435
|
+
}
|
|
436
|
+
if (!document)
|
|
437
|
+
throw new Error('preview_evaluation_case: pass caseId or document');
|
|
438
|
+
return client.post(await client.orgPath(suitePath(agentId, suiteId, '/cases/preview')), document);
|
|
439
|
+
},
|
|
440
|
+
}),
|
|
441
|
+
(0, tool_1.defineTool)({
|
|
442
|
+
name: 'start_evaluation_run',
|
|
443
|
+
title: 'Start evaluation run',
|
|
444
|
+
description: 'Run cases through the agent’s real pipeline (ephemeral person, side effects contained). Select by suiteIds, caseIds, and/or tags; nothing selected = every case. This SPENDS the agent’s daily evaluation units (one per case sample turn; check get_evaluation_quota first). Returns 202 with the run view (status, counts, estimate, pending, inFlight) — poll get_evaluation_run. 409 run_active when a run is already queued/running/paused (body carries activeRunId); 429 quota_exceeded with estimate, remaining, resetsAt and a suggestion (e.g. narrower selection or fewer samples) when the estimate exceeds what is left. Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/runs.',
|
|
445
|
+
kind: 'write',
|
|
446
|
+
scope: 'agents:write',
|
|
447
|
+
roleFloor: 'editor',
|
|
448
|
+
input: {
|
|
449
|
+
agentId: zod_1.z.string(),
|
|
450
|
+
suiteIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
451
|
+
caseIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
452
|
+
tags: zod_1.z.array(zod_1.z.string()).optional().describe('Cases carrying any of these tags'),
|
|
453
|
+
samplesOverride: zod_1.z
|
|
454
|
+
.number()
|
|
455
|
+
.int()
|
|
456
|
+
.min(1)
|
|
457
|
+
.max(5)
|
|
458
|
+
.optional()
|
|
459
|
+
.describe('Repetitions per case for this run only'),
|
|
460
|
+
},
|
|
461
|
+
run: async ({ client }, { agentId, ...body }) => client.post(await client.orgPath(evalPath(agentId, '/runs')), body),
|
|
462
|
+
}),
|
|
463
|
+
(0, tool_1.defineTool)({
|
|
464
|
+
name: 'pause_evaluation_run',
|
|
465
|
+
title: 'Pause evaluation run',
|
|
466
|
+
description: 'Pause a queued or running evaluation run; in-flight cases finish, nothing new starts, units already spent are not refunded. Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/runs/{run}/pause.',
|
|
467
|
+
kind: 'write',
|
|
468
|
+
scope: 'agents:write',
|
|
469
|
+
roleFloor: 'editor',
|
|
470
|
+
input: { agentId: zod_1.z.string(), runId: zod_1.z.string() },
|
|
471
|
+
run: async ({ client }, { agentId, runId }) => client.post(await client.orgPath(runPath(agentId, runId, '/pause')), {}),
|
|
472
|
+
}),
|
|
473
|
+
(0, tool_1.defineTool)({
|
|
474
|
+
name: 'resume_evaluation_run',
|
|
475
|
+
title: 'Resume evaluation run',
|
|
476
|
+
description: 'Resume a paused evaluation run from where it stopped (also the way to continue after a quota pause once units reset). Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/runs/{run}/resume.',
|
|
477
|
+
kind: 'write',
|
|
478
|
+
scope: 'agents:write',
|
|
479
|
+
roleFloor: 'editor',
|
|
480
|
+
input: { agentId: zod_1.z.string(), runId: zod_1.z.string() },
|
|
481
|
+
run: async ({ client }, { agentId, runId }) => client.post(await client.orgPath(runPath(agentId, runId, '/resume')), {}),
|
|
482
|
+
}),
|
|
483
|
+
(0, tool_1.defineTool)({
|
|
484
|
+
name: 'cancel_evaluation_run',
|
|
485
|
+
title: 'Cancel evaluation run',
|
|
486
|
+
description: 'Cancel a queued, running, or paused run: pending cases are not run; finished results stay. A finished run is immutable (409 run_immutable). Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/runs/{run}/cancel.',
|
|
487
|
+
kind: 'write',
|
|
488
|
+
scope: 'agents:write',
|
|
489
|
+
roleFloor: 'editor',
|
|
490
|
+
input: { agentId: zod_1.z.string(), runId: zod_1.z.string() },
|
|
491
|
+
run: async ({ client }, { agentId, runId }) => client.post(await client.orgPath(runPath(agentId, runId, '/cancel')), {}),
|
|
492
|
+
}),
|
|
493
|
+
(0, tool_1.defineTool)({
|
|
494
|
+
name: 'pin_evaluation_run',
|
|
495
|
+
title: 'Pin or unpin evaluation run',
|
|
496
|
+
description: 'Pin a run so it is kept as a reference point (baseline for diffs, exempt from retention); pinned=false unpins. Maps to POST /v1/orgs/{org}/agents/{agent}/evaluations/runs/{run}/pin or …/unpin.',
|
|
497
|
+
kind: 'write',
|
|
498
|
+
scope: 'agents:write',
|
|
499
|
+
roleFloor: 'editor',
|
|
500
|
+
input: {
|
|
501
|
+
agentId: zod_1.z.string(),
|
|
502
|
+
runId: zod_1.z.string(),
|
|
503
|
+
pinned: zod_1.z.boolean().optional().describe('Default true; false unpins'),
|
|
504
|
+
},
|
|
505
|
+
run: async ({ client }, { agentId, runId, pinned }) => client.post(await client.orgPath(runPath(agentId, runId, pinned === false ? '/unpin' : '/pin')), {}),
|
|
506
|
+
}),
|
|
507
|
+
(0, tool_1.defineTool)({
|
|
508
|
+
name: 'list_evaluation_runs',
|
|
509
|
+
title: 'List evaluation runs',
|
|
510
|
+
description: 'List an agent’s evaluation runs, newest first: status, selection, counts (passed / failed / errored / pending), usage, diff vs the previous run, pinned. Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/runs.',
|
|
511
|
+
kind: 'read',
|
|
512
|
+
scope: 'agents:read',
|
|
513
|
+
roleFloor: 'viewer',
|
|
514
|
+
input: { agentId: zod_1.z.string() },
|
|
515
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(evalPath(agentId, '/runs'))),
|
|
516
|
+
}),
|
|
517
|
+
(0, tool_1.defineTool)({
|
|
518
|
+
name: 'get_evaluation_run',
|
|
519
|
+
title: 'Get evaluation run',
|
|
520
|
+
description: 'Fetch one run: status (queued | running | paused | completed | cancelled | failed), pauseReason, counts, estimate vs usage, diff vs the previous run, attribution, plus pending and inFlight case lists while active. Poll this after start_evaluation_run. Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/runs/{run}.',
|
|
521
|
+
kind: 'read',
|
|
522
|
+
scope: 'agents:read',
|
|
523
|
+
roleFloor: 'viewer',
|
|
524
|
+
input: { agentId: zod_1.z.string(), runId: zod_1.z.string() },
|
|
525
|
+
run: async ({ client }, { agentId, runId }) => client.get(await client.orgPath(runPath(agentId, runId))),
|
|
526
|
+
}),
|
|
527
|
+
(0, tool_1.defineTool)({
|
|
528
|
+
name: 'list_evaluation_results',
|
|
529
|
+
title: 'List evaluation results',
|
|
530
|
+
description: 'Page through a run’s per-case-sample results (state filter: passed | failed | errored | pending; caseId filter; cursor via startingAfter; returns { data, hasMore }). Each result carries the verdict, per-check details (expected vs observed), per-criterion judge verdicts with quoted evidence, usage, and the transcript. Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/runs/{run}/results.',
|
|
531
|
+
kind: 'read',
|
|
532
|
+
scope: 'agents:read',
|
|
533
|
+
roleFloor: 'viewer',
|
|
534
|
+
input: {
|
|
535
|
+
agentId: zod_1.z.string(),
|
|
536
|
+
runId: zod_1.z.string(),
|
|
537
|
+
state: zod_1.z.string().optional(),
|
|
538
|
+
caseId: zod_1.z.string().optional(),
|
|
539
|
+
startingAfter: zod_1.z.string().optional(),
|
|
540
|
+
limit: zod_1.z.number().int().min(1).max(200).optional(),
|
|
541
|
+
},
|
|
542
|
+
run: async ({ client }, { agentId, runId, ...params }) => client.get(await client.orgPath(runPath(agentId, runId, '/results')), params),
|
|
543
|
+
}),
|
|
544
|
+
(0, tool_1.defineTool)({
|
|
545
|
+
name: 'get_evaluation_result',
|
|
546
|
+
title: 'Get evaluation result',
|
|
547
|
+
description: 'Fetch one result in full: transcript (user / agent / system lines), every check with its details, every judge criterion with pass/fail and quoted evidence, effects, usage, error, and the userId / turnIds to inspect the turns. Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/runs/{run}/results/{result}.',
|
|
548
|
+
kind: 'read',
|
|
549
|
+
scope: 'agents:read',
|
|
550
|
+
roleFloor: 'viewer',
|
|
551
|
+
input: { agentId: zod_1.z.string(), runId: zod_1.z.string(), resultId: zod_1.z.string() },
|
|
552
|
+
run: async ({ client }, { agentId, runId, resultId }) => client.get(await client.orgPath(runPath(agentId, runId, `/results/${encodeURIComponent(resultId)}`))),
|
|
553
|
+
}),
|
|
554
|
+
(0, tool_1.defineTool)({
|
|
555
|
+
name: 'get_evaluation_quota',
|
|
556
|
+
title: 'Get evaluation quota',
|
|
557
|
+
description: 'The agent’s evaluation units: daily allowance, used, remaining, resetsAt, per-run limits (maxUnitsPerRun, maxCasesPerRun), and the active run if any. Check before start_evaluation_run. Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/quota.',
|
|
558
|
+
kind: 'read',
|
|
559
|
+
scope: 'agents:read',
|
|
560
|
+
roleFloor: 'viewer',
|
|
561
|
+
input: { agentId: zod_1.z.string() },
|
|
562
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(evalPath(agentId, '/quota'))),
|
|
563
|
+
}),
|
|
564
|
+
(0, tool_1.defineTool)({
|
|
565
|
+
name: 'get_evaluation_case_history',
|
|
566
|
+
title: 'Get evaluation case history',
|
|
567
|
+
description: 'A case’s verdicts across past runs, newest first (runId, verdict, failed checks / criteria, usage) — spot flakiness or a regression. Maps to GET /v1/orgs/{org}/agents/{agent}/evaluations/cases/{case}/history.',
|
|
568
|
+
kind: 'read',
|
|
569
|
+
scope: 'agents:read',
|
|
570
|
+
roleFloor: 'viewer',
|
|
571
|
+
input: {
|
|
572
|
+
agentId: zod_1.z.string(),
|
|
573
|
+
caseId: zod_1.z.string(),
|
|
574
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
575
|
+
},
|
|
576
|
+
run: async ({ client }, { agentId, caseId, limit }) => client.get(await client.orgPath(evalPath(agentId, `/cases/${encodeURIComponent(caseId)}/history`)), { limit }),
|
|
577
|
+
}),
|
|
578
|
+
];
|
|
579
|
+
//# sourceMappingURL=evaluations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluations.js","sourceRoot":"","sources":["../../src/tools/evaluations.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kCAAqC;AAErC,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,GAAG,GAAG,EAAE,EAAU,EAAE,CACrD,WAAW,kBAAkB,CAAC,OAAO,CAAC,eAAe,GAAG,EAAE,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,OAAe,EAAE,GAAG,GAAG,EAAE,EAAU,EAAE,CACvE,QAAQ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aAAa;QACpB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE;QAC9B,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CACrC,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;KAChE,CAAC;IAEF,IAAA,iBAAU,EAAC;QACT,IAAI,EAAE,6BAA6B;QACnC,KAAK,EAAE,6BAA6B;QACpC,WAAW,EACT,kNAAkN;QACpN,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE;YACL,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;YACnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;YAClB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;SACnD;QACD,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CACpD,MAAM,CAAC,GAAG,CACR,MAAM,MAAM,CAAC,OAAO,CAClB,QAAQ,CAAC,OAAO,EAAE,UAAU,kBAAkB,CAAC,MAAM,CAAC,UAAU,CAAC,CAClE,EACD,EAAE,KAAK,EAAE,CACV;KACJ,CAAC;CACH,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AnyTool, ToolProfile } from '../tool';
|
|
2
2
|
/**
|
|
3
3
|
* The tool table, in the order hosts list them. Grouped as the API reference
|
|
4
|
-
* is: orient → Definition → Capabilities → Channels → People →
|
|
5
|
-
* Activity → Org → Docs. Names must be unique (enforced by test/tools.spec.ts).
|
|
4
|
+
* is: orient → Definition → Capabilities → Channels → People → Campaigns →
|
|
5
|
+
* Evaluations → Testers → Activity → Org → Docs. Names must be unique (enforced by test/tools.spec.ts).
|
|
6
6
|
*/
|
|
7
7
|
export declare const allTools: AnyTool[];
|
|
8
8
|
export declare const toolsByName: ReadonlyMap<string, AnyTool>;
|
package/dist/tools/index.js
CHANGED
|
@@ -9,6 +9,7 @@ const capabilities_1 = require("./capabilities");
|
|
|
9
9
|
const channels_1 = require("./channels");
|
|
10
10
|
const definition_1 = require("./definition");
|
|
11
11
|
const docs_1 = require("./docs");
|
|
12
|
+
const evaluations_1 = require("./evaluations");
|
|
12
13
|
const media_1 = require("./media");
|
|
13
14
|
const me_1 = require("./me");
|
|
14
15
|
const org_1 = require("./org");
|
|
@@ -16,8 +17,8 @@ const people_1 = require("./people");
|
|
|
16
17
|
const testers_1 = require("./testers");
|
|
17
18
|
/**
|
|
18
19
|
* The tool table, in the order hosts list them. Grouped as the API reference
|
|
19
|
-
* is: orient → Definition → Capabilities → Channels → People →
|
|
20
|
-
* Activity → Org → Docs. Names must be unique (enforced by test/tools.spec.ts).
|
|
20
|
+
* is: orient → Definition → Capabilities → Channels → People → Campaigns →
|
|
21
|
+
* Evaluations → Testers → Activity → Org → Docs. Names must be unique (enforced by test/tools.spec.ts).
|
|
21
22
|
*/
|
|
22
23
|
exports.allTools = [
|
|
23
24
|
...me_1.meTools,
|
|
@@ -28,6 +29,7 @@ exports.allTools = [
|
|
|
28
29
|
...channels_1.channelTools,
|
|
29
30
|
...people_1.peopleTools,
|
|
30
31
|
...campaigns_1.campaignTools,
|
|
32
|
+
...evaluations_1.evaluationTools,
|
|
31
33
|
...testers_1.testerTools,
|
|
32
34
|
...activity_1.activityTools,
|
|
33
35
|
...org_1.orgTools,
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AA4CA,0CAKC;AAhDD,yCAA2C;AAC3C,qCAAsC;AACtC,2CAA4C;AAC5C,iDAAiD;AACjD,yCAA0C;AAC1C,6CAA+C;AAC/C,iCAAmC;AACnC,+CAAgD;AAChD,mCAAqC;AACrC,6BAA+B;AAC/B,+BAAiC;AACjC,qCAAuC;AACvC,uCAAwC;AAExC;;;;GAIG;AACU,QAAA,QAAQ,GAAc;IACjC,GAAG,YAAO;IACV,GAAG,mBAAU;IACb,GAAG,4BAAe;IAClB,GAAG,kBAAU;IACb,GAAG,8BAAe;IAClB,GAAG,uBAAY;IACf,GAAG,oBAAW;IACd,GAAG,yBAAa;IAChB,GAAG,6BAAe;IAClB,GAAG,qBAAW;IACd,GAAG,wBAAa;IAChB,GAAG,cAAQ;IACX,GAAG,gBAAS;CACb,CAAC;AAEW,QAAA,WAAW,GAAiC,IAAI,GAAG,CAC9D,gBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAC/B,CAAC;AAEF;;;GAGG;AACH,SAAgB,eAAe,CAC7B,OAAoB,EACpB,QAA4B,gBAAQ;IAEpC,OAAO,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC;AACnF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anychat-ai/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
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",
|