@avallon-labs/mcp 56.0.0 → 57.1.0-staging.1289
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/dist/index.js
CHANGED
|
@@ -2914,6 +2914,59 @@ var deleteSecret = async (secretId, options) => {
|
|
|
2914
2914
|
const data = body ? JSON.parse(body) : {};
|
|
2915
2915
|
return { data, status: res.status, headers: res.headers };
|
|
2916
2916
|
};
|
|
2917
|
+
var getCreateEvaluatorUrl = () => {
|
|
2918
|
+
return `/v1/evaluators`;
|
|
2919
|
+
};
|
|
2920
|
+
var createEvaluator = async (createEvaluatorBody, options) => {
|
|
2921
|
+
const getHeaders = (h) => {
|
|
2922
|
+
if (!h) return {};
|
|
2923
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2924
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2925
|
+
return h;
|
|
2926
|
+
};
|
|
2927
|
+
const res = await fetch(
|
|
2928
|
+
getCreateEvaluatorUrl(),
|
|
2929
|
+
{
|
|
2930
|
+
...options,
|
|
2931
|
+
method: "POST",
|
|
2932
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
2933
|
+
body: JSON.stringify(createEvaluatorBody)
|
|
2934
|
+
}
|
|
2935
|
+
);
|
|
2936
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2937
|
+
const data = body ? JSON.parse(body) : {};
|
|
2938
|
+
return { data, status: res.status, headers: res.headers };
|
|
2939
|
+
};
|
|
2940
|
+
var getListEvaluatorsUrl = () => {
|
|
2941
|
+
return `/v1/evaluators`;
|
|
2942
|
+
};
|
|
2943
|
+
var listEvaluators = async (options) => {
|
|
2944
|
+
const res = await fetch(
|
|
2945
|
+
getListEvaluatorsUrl(),
|
|
2946
|
+
{
|
|
2947
|
+
...options,
|
|
2948
|
+
method: "GET"
|
|
2949
|
+
}
|
|
2950
|
+
);
|
|
2951
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2952
|
+
const data = body ? JSON.parse(body) : {};
|
|
2953
|
+
return { data, status: res.status, headers: res.headers };
|
|
2954
|
+
};
|
|
2955
|
+
var getGetEvaluatorUrl = (evaluatorSlug) => {
|
|
2956
|
+
return `/v1/evaluators/${evaluatorSlug}`;
|
|
2957
|
+
};
|
|
2958
|
+
var getEvaluator = async (evaluatorSlug, options) => {
|
|
2959
|
+
const res = await fetch(
|
|
2960
|
+
getGetEvaluatorUrl(evaluatorSlug),
|
|
2961
|
+
{
|
|
2962
|
+
...options,
|
|
2963
|
+
method: "GET"
|
|
2964
|
+
}
|
|
2965
|
+
);
|
|
2966
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2967
|
+
const data = body ? JSON.parse(body) : {};
|
|
2968
|
+
return { data, status: res.status, headers: res.headers };
|
|
2969
|
+
};
|
|
2917
2970
|
var getCreateScheduleUrl = () => {
|
|
2918
2971
|
return `/v1/schedules`;
|
|
2919
2972
|
};
|
|
@@ -7137,6 +7190,75 @@ var deleteSecretHandler = async (args, options) => {
|
|
|
7137
7190
|
structuredContent: res.data
|
|
7138
7191
|
};
|
|
7139
7192
|
};
|
|
7193
|
+
var createEvaluatorHandler = async (args, options) => {
|
|
7194
|
+
const res = await createEvaluator(args.bodyParams, options);
|
|
7195
|
+
if (res.status >= 400) {
|
|
7196
|
+
return {
|
|
7197
|
+
content: [
|
|
7198
|
+
{
|
|
7199
|
+
type: "text",
|
|
7200
|
+
text: JSON.stringify(res.data ?? null)
|
|
7201
|
+
}
|
|
7202
|
+
],
|
|
7203
|
+
isError: true
|
|
7204
|
+
};
|
|
7205
|
+
}
|
|
7206
|
+
return {
|
|
7207
|
+
content: [
|
|
7208
|
+
{
|
|
7209
|
+
type: "text",
|
|
7210
|
+
text: JSON.stringify(res.data ?? null)
|
|
7211
|
+
}
|
|
7212
|
+
],
|
|
7213
|
+
structuredContent: res.data
|
|
7214
|
+
};
|
|
7215
|
+
};
|
|
7216
|
+
var listEvaluatorsHandler = async (options) => {
|
|
7217
|
+
const res = await listEvaluators(options);
|
|
7218
|
+
if (res.status >= 400) {
|
|
7219
|
+
return {
|
|
7220
|
+
content: [
|
|
7221
|
+
{
|
|
7222
|
+
type: "text",
|
|
7223
|
+
text: JSON.stringify(res.data ?? null)
|
|
7224
|
+
}
|
|
7225
|
+
],
|
|
7226
|
+
isError: true
|
|
7227
|
+
};
|
|
7228
|
+
}
|
|
7229
|
+
return {
|
|
7230
|
+
content: [
|
|
7231
|
+
{
|
|
7232
|
+
type: "text",
|
|
7233
|
+
text: JSON.stringify(res.data ?? null)
|
|
7234
|
+
}
|
|
7235
|
+
],
|
|
7236
|
+
structuredContent: res.data
|
|
7237
|
+
};
|
|
7238
|
+
};
|
|
7239
|
+
var getEvaluatorHandler = async (args, options) => {
|
|
7240
|
+
const res = await getEvaluator(args.pathParams.evaluatorSlug, options);
|
|
7241
|
+
if (res.status >= 400) {
|
|
7242
|
+
return {
|
|
7243
|
+
content: [
|
|
7244
|
+
{
|
|
7245
|
+
type: "text",
|
|
7246
|
+
text: JSON.stringify(res.data ?? null)
|
|
7247
|
+
}
|
|
7248
|
+
],
|
|
7249
|
+
isError: true
|
|
7250
|
+
};
|
|
7251
|
+
}
|
|
7252
|
+
return {
|
|
7253
|
+
content: [
|
|
7254
|
+
{
|
|
7255
|
+
type: "text",
|
|
7256
|
+
text: JSON.stringify(res.data ?? null)
|
|
7257
|
+
}
|
|
7258
|
+
],
|
|
7259
|
+
structuredContent: res.data
|
|
7260
|
+
};
|
|
7261
|
+
};
|
|
7140
7262
|
var createScheduleHandler = async (args, options) => {
|
|
7141
7263
|
const res = await createSchedule(args.bodyParams, options);
|
|
7142
7264
|
if (res.status >= 400) {
|
|
@@ -8418,6 +8540,8 @@ var updateVoiceAgentBodyTtsVoiceIdMax = 256;
|
|
|
8418
8540
|
var updateVoiceAgentBodyTtsVoiceIdRegExp = new RegExp("^[^\\u0000-\\u001f\\u007f]+$");
|
|
8419
8541
|
var updateVoiceAgentBodyFallbackTtsVoiceIdOneMax = 256;
|
|
8420
8542
|
var updateVoiceAgentBodyFallbackTtsVoiceIdOneRegExp = new RegExp("^[^\\u0000-\\u001f\\u007f]+$");
|
|
8543
|
+
var updateVoiceAgentBodyEvaluatorSlugOneMax = 100;
|
|
8544
|
+
var updateVoiceAgentBodyEvaluatorSlugOneRegExp = new RegExp("^[a-z0-9]+(?:[-_][a-z0-9]+)*$");
|
|
8421
8545
|
var UpdateVoiceAgentBody = zod.object({
|
|
8422
8546
|
"name": zod.string().min(1).optional(),
|
|
8423
8547
|
"call_processor_id": zod.union([zod.string().uuid(), zod.null()]).optional(),
|
|
@@ -8441,6 +8565,7 @@ var UpdateVoiceAgentBody = zod.object({
|
|
|
8441
8565
|
"dial_pad": zod.boolean().optional().describe("Allow the caller to send dial pad (DTMF) input."),
|
|
8442
8566
|
"end_call": zod.boolean().optional().describe("Allow the agent to hang up the call."),
|
|
8443
8567
|
"transfer_phone_number": zod.union([zod.string(), zod.null()]).optional().describe("Phone number calls are transferred to. null removes it."),
|
|
8568
|
+
"evaluator_slug": zod.union([zod.string().max(updateVoiceAgentBodyEvaluatorSlugOneMax).regex(updateVoiceAgentBodyEvaluatorSlugOneRegExp), zod.null()]).optional().describe("Evaluator that scores this agent's calls, created with `POST /v1/evaluators`. null detaches it. Omit to leave unchanged."),
|
|
8444
8569
|
"prompt": zod.string().min(1).optional().describe("System prompt. Requires the `prompts:write` permission."),
|
|
8445
8570
|
"greeting": zod.union([zod.string().min(1), zod.null()]).optional().describe("Greeting spoken at the start of the call. null removes it. Requires the `prompts:write` permission.")
|
|
8446
8571
|
});
|
|
@@ -12046,6 +12171,67 @@ var DeleteSecretResponse = zod.object({
|
|
|
12046
12171
|
"data": zod.object({}),
|
|
12047
12172
|
"message": zod.string()
|
|
12048
12173
|
});
|
|
12174
|
+
var createEvaluatorBodySlugMax = 100;
|
|
12175
|
+
var createEvaluatorBodySlugRegExp = new RegExp("^[a-z0-9]+(?:[-_][a-z0-9]+)*$");
|
|
12176
|
+
var createEvaluatorBodyMetricsItemSlugMax = 100;
|
|
12177
|
+
var createEvaluatorBodyMetricsItemSlugRegExp = new RegExp("^[a-z0-9]+(?:[-_][a-z0-9]+)*$");
|
|
12178
|
+
var createEvaluatorBodyMetricsItemNameMax = 200;
|
|
12179
|
+
var createEvaluatorBodyMetricsItemQuestionMax = 1e4;
|
|
12180
|
+
var createEvaluatorBodyMetricsMax = 50;
|
|
12181
|
+
var CreateEvaluatorBody = zod.object({
|
|
12182
|
+
"slug": zod.string().max(createEvaluatorBodySlugMax).regex(createEvaluatorBodySlugRegExp).describe("Unique evaluator slug within the tenant, e.g. `support-quality-v1`"),
|
|
12183
|
+
"metrics": zod.array(zod.object({
|
|
12184
|
+
"slug": zod.string().max(createEvaluatorBodyMetricsItemSlugMax).regex(createEvaluatorBodyMetricsItemSlugRegExp).describe("Stable metric identifier"),
|
|
12185
|
+
"name": zod.string().min(1).max(createEvaluatorBodyMetricsItemNameMax),
|
|
12186
|
+
"question": zod.string().min(1).max(createEvaluatorBodyMetricsItemQuestionMax).describe("The exact criterion and scoring rubric the judge receives. Score 0 to 1; 0.5 or higher passes.")
|
|
12187
|
+
})).min(1).max(createEvaluatorBodyMetricsMax)
|
|
12188
|
+
});
|
|
12189
|
+
var CreateEvaluatorResponse = zod.object({
|
|
12190
|
+
"data": zod.object({
|
|
12191
|
+
"slug": zod.string().describe("Evaluator slug"),
|
|
12192
|
+
"metrics": zod.array(zod.object({
|
|
12193
|
+
"id": zod.string(),
|
|
12194
|
+
"slug": zod.string(),
|
|
12195
|
+
"name": zod.string(),
|
|
12196
|
+
"question": zod.string().describe("Criterion and scoring rubric passed to the judge"),
|
|
12197
|
+
"created_at": zod.string().datetime({ "offset": true })
|
|
12198
|
+
}))
|
|
12199
|
+
}),
|
|
12200
|
+
"message": zod.string()
|
|
12201
|
+
});
|
|
12202
|
+
var ListEvaluatorsResponse = zod.object({
|
|
12203
|
+
"data": zod.object({
|
|
12204
|
+
"evaluators": zod.array(zod.object({
|
|
12205
|
+
"slug": zod.string().describe("Evaluator slug"),
|
|
12206
|
+
"metrics": zod.array(zod.object({
|
|
12207
|
+
"id": zod.string(),
|
|
12208
|
+
"slug": zod.string(),
|
|
12209
|
+
"name": zod.string(),
|
|
12210
|
+
"question": zod.string().describe("Criterion and scoring rubric passed to the judge"),
|
|
12211
|
+
"created_at": zod.string().datetime({ "offset": true })
|
|
12212
|
+
}))
|
|
12213
|
+
}))
|
|
12214
|
+
}),
|
|
12215
|
+
"message": zod.string()
|
|
12216
|
+
});
|
|
12217
|
+
var getEvaluatorPathEvaluatorSlugMax = 100;
|
|
12218
|
+
var getEvaluatorPathEvaluatorSlugRegExp = new RegExp("^[a-z0-9]+(?:[-_][a-z0-9]+)*$");
|
|
12219
|
+
var GetEvaluatorParams = zod.object({
|
|
12220
|
+
"evaluatorSlug": zod.string().max(getEvaluatorPathEvaluatorSlugMax).regex(getEvaluatorPathEvaluatorSlugRegExp)
|
|
12221
|
+
});
|
|
12222
|
+
var GetEvaluatorResponse = zod.object({
|
|
12223
|
+
"data": zod.object({
|
|
12224
|
+
"slug": zod.string().describe("Evaluator slug"),
|
|
12225
|
+
"metrics": zod.array(zod.object({
|
|
12226
|
+
"id": zod.string(),
|
|
12227
|
+
"slug": zod.string(),
|
|
12228
|
+
"name": zod.string(),
|
|
12229
|
+
"question": zod.string().describe("Criterion and scoring rubric passed to the judge"),
|
|
12230
|
+
"created_at": zod.string().datetime({ "offset": true })
|
|
12231
|
+
}))
|
|
12232
|
+
}),
|
|
12233
|
+
"message": zod.string()
|
|
12234
|
+
});
|
|
12049
12235
|
var createScheduleBodyRuleTwoPatternsItemMinuteMin = 0;
|
|
12050
12236
|
var createScheduleBodyRuleTwoPatternsItemMinuteMax = 59;
|
|
12051
12237
|
var createScheduleBodyRuleTwoPatternsItemHoursOneItemMin = 0;
|
|
@@ -12058,11 +12244,14 @@ var createScheduleBodyRuleTwoPatternsItemWeekdaysDefault = null;
|
|
|
12058
12244
|
var createScheduleBodyRuleTwoPatternsMax = 10;
|
|
12059
12245
|
var createScheduleBodyNameMax = 200;
|
|
12060
12246
|
var CreateScheduleBody = zod.object({
|
|
12061
|
-
"action": zod.object({
|
|
12247
|
+
"action": zod.union([zod.object({
|
|
12062
12248
|
"type": zod.literal("trigger_worker"),
|
|
12063
12249
|
"worker_id": zod.string().uuid(),
|
|
12064
12250
|
"scope": zod.union([zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean(), zod.null()])), zod.null()]).optional().describe("Scope of the runs this schedule creates. Omit or send null to run without artifacts.")
|
|
12065
|
-
}).
|
|
12251
|
+
}), zod.object({
|
|
12252
|
+
"type": zod.literal("execute_tool"),
|
|
12253
|
+
"tool_id": zod.string().uuid()
|
|
12254
|
+
})]).describe("What the schedule does every time it fires"),
|
|
12066
12255
|
"rule": zod.union([zod.object({
|
|
12067
12256
|
"type": zod.literal("once"),
|
|
12068
12257
|
"at": zod.string().datetime({ "offset": true }).describe('The moment it fires, in UTC, e.g. "2026-09-01T14:00:00Z"')
|
|
@@ -12075,7 +12264,7 @@ var CreateScheduleBody = zod.object({
|
|
|
12075
12264
|
"weekdays": zod.union([zod.array(zod.number().int().min(1).max(createScheduleBodyRuleTwoPatternsItemWeekdaysOneItemMax).describe("ISO-8601 weekday, 1 = Monday through 7 = Sunday")).min(1).max(createScheduleBodyRuleTwoPatternsItemWeekdaysOneMax), zod.null()]).default(createScheduleBodyRuleTwoPatternsItemWeekdaysDefault).describe("Local ISO-8601 weekdays the pattern may fire on. Omit or send null to fire every day.")
|
|
12076
12265
|
}).describe("One set of local times a schedule fires at")).min(1).max(createScheduleBodyRuleTwoPatternsMax).describe("The schedule fires whenever any of these patterns comes round, all read in the rule's time zone.")
|
|
12077
12266
|
})]).describe("When the schedule fires"),
|
|
12078
|
-
"environments": zod.array(zod.enum(["live", "test"])).optional().describe("Environments the schedule fires in. `live` resolves the worker at its live version, `test` at its test version. Listing both fires every occurrence twice, once per version."),
|
|
12267
|
+
"environments": zod.array(zod.enum(["live", "test"])).optional().describe("Environments the schedule fires in. `live` resolves the worker or tool at its live version, `test` at its test version. Listing both fires every occurrence twice, once per version."),
|
|
12079
12268
|
"name": zod.string().min(1).max(createScheduleBodyNameMax).optional().describe('Human-readable name, e.g. "Nightly claim sweep"'),
|
|
12080
12269
|
"enabled": zod.boolean().optional().describe("Whether the schedule starts firing right away. Defaults to true. Must be omitted or true for `once` rules.")
|
|
12081
12270
|
});
|
|
@@ -12093,11 +12282,14 @@ var CreateScheduleResponse = zod.object({
|
|
|
12093
12282
|
"data": zod.object({
|
|
12094
12283
|
"id": zod.string().describe("Unique identifier for the schedule"),
|
|
12095
12284
|
"name": zod.union([zod.string(), zod.null()]).describe("Optional human-readable name"),
|
|
12096
|
-
"action": zod.object({
|
|
12285
|
+
"action": zod.union([zod.object({
|
|
12097
12286
|
"type": zod.literal("trigger_worker"),
|
|
12098
12287
|
"worker_id": zod.string().uuid(),
|
|
12099
12288
|
"scope": zod.union([zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean(), zod.null()])), zod.null()]).optional().describe("Scope of the runs this schedule creates. Omit or send null to run without artifacts.")
|
|
12100
|
-
}).
|
|
12289
|
+
}), zod.object({
|
|
12290
|
+
"type": zod.literal("execute_tool"),
|
|
12291
|
+
"tool_id": zod.string().uuid()
|
|
12292
|
+
})]).describe("What the schedule does every time it fires"),
|
|
12101
12293
|
"rule": zod.union([zod.object({
|
|
12102
12294
|
"type": zod.literal("once"),
|
|
12103
12295
|
"at": zod.string().datetime({ "offset": true }).describe('The moment it fires, in UTC, e.g. "2026-09-01T14:00:00Z"')
|
|
@@ -12149,11 +12341,14 @@ var ListSchedulesResponse = zod.object({
|
|
|
12149
12341
|
"data": zod.array(zod.object({
|
|
12150
12342
|
"id": zod.string().describe("Unique identifier for the schedule"),
|
|
12151
12343
|
"name": zod.union([zod.string(), zod.null()]).describe("Optional human-readable name"),
|
|
12152
|
-
"action": zod.object({
|
|
12344
|
+
"action": zod.union([zod.object({
|
|
12153
12345
|
"type": zod.literal("trigger_worker"),
|
|
12154
12346
|
"worker_id": zod.string().uuid(),
|
|
12155
12347
|
"scope": zod.union([zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean(), zod.null()])), zod.null()]).optional().describe("Scope of the runs this schedule creates. Omit or send null to run without artifacts.")
|
|
12156
|
-
}).
|
|
12348
|
+
}), zod.object({
|
|
12349
|
+
"type": zod.literal("execute_tool"),
|
|
12350
|
+
"tool_id": zod.string().uuid()
|
|
12351
|
+
})]).describe("What the schedule does every time it fires"),
|
|
12157
12352
|
"rule": zod.union([zod.object({
|
|
12158
12353
|
"type": zod.literal("once"),
|
|
12159
12354
|
"at": zod.string().datetime({ "offset": true }).describe('The moment it fires, in UTC, e.g. "2026-09-01T14:00:00Z"')
|
|
@@ -12195,11 +12390,14 @@ var GetScheduleResponse = zod.object({
|
|
|
12195
12390
|
"data": zod.object({
|
|
12196
12391
|
"id": zod.string().describe("Unique identifier for the schedule"),
|
|
12197
12392
|
"name": zod.union([zod.string(), zod.null()]).describe("Optional human-readable name"),
|
|
12198
|
-
"action": zod.object({
|
|
12393
|
+
"action": zod.union([zod.object({
|
|
12199
12394
|
"type": zod.literal("trigger_worker"),
|
|
12200
12395
|
"worker_id": zod.string().uuid(),
|
|
12201
12396
|
"scope": zod.union([zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean(), zod.null()])), zod.null()]).optional().describe("Scope of the runs this schedule creates. Omit or send null to run without artifacts.")
|
|
12202
|
-
}).
|
|
12397
|
+
}), zod.object({
|
|
12398
|
+
"type": zod.literal("execute_tool"),
|
|
12399
|
+
"tool_id": zod.string().uuid()
|
|
12400
|
+
})]).describe("What the schedule does every time it fires"),
|
|
12203
12401
|
"rule": zod.union([zod.object({
|
|
12204
12402
|
"type": zod.literal("once"),
|
|
12205
12403
|
"at": zod.string().datetime({ "offset": true }).describe('The moment it fires, in UTC, e.g. "2026-09-01T14:00:00Z"')
|
|
@@ -12248,7 +12446,7 @@ var UpdateScheduleBody = zod.object({
|
|
|
12248
12446
|
"weekdays": zod.union([zod.array(zod.number().int().min(1).max(updateScheduleBodyRuleTwoPatternsItemWeekdaysOneItemMax).describe("ISO-8601 weekday, 1 = Monday through 7 = Sunday")).min(1).max(updateScheduleBodyRuleTwoPatternsItemWeekdaysOneMax), zod.null()]).default(updateScheduleBodyRuleTwoPatternsItemWeekdaysDefault).describe("Local ISO-8601 weekdays the pattern may fire on. Omit or send null to fire every day.")
|
|
12249
12447
|
}).describe("One set of local times a schedule fires at")).min(1).max(updateScheduleBodyRuleTwoPatternsMax).describe("The schedule fires whenever any of these patterns comes round, all read in the rule's time zone.")
|
|
12250
12448
|
})]).optional().describe("When the schedule fires"),
|
|
12251
|
-
"environments": zod.array(zod.enum(["live", "test"])).optional().describe("Environments the schedule fires in. `live` resolves the worker at its live version, `test` at its test version. Listing both fires every occurrence twice, once per version."),
|
|
12449
|
+
"environments": zod.array(zod.enum(["live", "test"])).optional().describe("Environments the schedule fires in. `live` resolves the worker or tool at its live version, `test` at its test version. Listing both fires every occurrence twice, once per version."),
|
|
12252
12450
|
"name": zod.union([zod.string().min(1).max(updateScheduleBodyNameOneMax), zod.null()]).optional().describe("Human-readable name. Send null to clear it."),
|
|
12253
12451
|
"enabled": zod.boolean().optional().describe("Whether the schedule fires. Disabled never fires. Must be omitted or true for `once` rules.")
|
|
12254
12452
|
});
|
|
@@ -12266,11 +12464,14 @@ var UpdateScheduleResponse = zod.object({
|
|
|
12266
12464
|
"data": zod.object({
|
|
12267
12465
|
"id": zod.string().describe("Unique identifier for the schedule"),
|
|
12268
12466
|
"name": zod.union([zod.string(), zod.null()]).describe("Optional human-readable name"),
|
|
12269
|
-
"action": zod.object({
|
|
12467
|
+
"action": zod.union([zod.object({
|
|
12270
12468
|
"type": zod.literal("trigger_worker"),
|
|
12271
12469
|
"worker_id": zod.string().uuid(),
|
|
12272
12470
|
"scope": zod.union([zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean(), zod.null()])), zod.null()]).optional().describe("Scope of the runs this schedule creates. Omit or send null to run without artifacts.")
|
|
12273
|
-
}).
|
|
12471
|
+
}), zod.object({
|
|
12472
|
+
"type": zod.literal("execute_tool"),
|
|
12473
|
+
"tool_id": zod.string().uuid()
|
|
12474
|
+
})]).describe("What the schedule does every time it fires"),
|
|
12274
12475
|
"rule": zod.union([zod.object({
|
|
12275
12476
|
"type": zod.literal("once"),
|
|
12276
12477
|
"at": zod.string().datetime({ "offset": true }).describe('The moment it fires, in UTC, e.g. "2026-09-01T14:00:00Z"')
|
|
@@ -12323,7 +12524,7 @@ var ListDispatchesResponse = zod.object({
|
|
|
12323
12524
|
"id": zod.string()
|
|
12324
12525
|
}),
|
|
12325
12526
|
"target": zod.union([zod.object({
|
|
12326
|
-
"type": zod.enum(["worker_run", "extractor_job"]),
|
|
12527
|
+
"type": zod.enum(["worker_run", "extractor_job", "tool_call"]),
|
|
12327
12528
|
"id": zod.string()
|
|
12328
12529
|
}), zod.null()]),
|
|
12329
12530
|
"due_at": zod.string().datetime({ "offset": true }),
|
|
@@ -13790,7 +13991,7 @@ var createMcpServer = (options) => {
|
|
|
13790
13991
|
"updateVoiceAgent",
|
|
13791
13992
|
{
|
|
13792
13993
|
title: "Update voice agent",
|
|
13793
|
-
description: "Update a voice agent. Only the fields you send change; omitted fields keep their current value.\n\nTo change the processor assignment, `call_processor_id` and `call_processor_type` must be provided together. Set `call_processor_id` to `null` to detach (`call_processor_type` is still required).\n\nModel fields (`llm_model`, `tts_provider`, `tts_model`, `tts_voice_id`, `stt_model`, `language` and their `fallback_*` counterparts) are validated against the agent's resulting configuration, so a single field such as `tts_voice_id` can be sent on its own as long as it fits the current provider and model.\n\nSet `voice_mail_detection` to `true` to have the agent listen for a voicemail beep tone. Detection only runs on `OUTBOUND` agents; enabling it on an `INBOUND` agent is stored but has no effect.\n\nSet `max_call_duration_seconds` to change how long a call may run before the agent ends it (default 1800).\n\nSet `noise_cancellation` to choose the noise cancellation mode applied to the caller audio.\n\nSet `tool_ids` to replace the agent's attached tool set. This is the supported way to manage tool attachments; the dedicated add and remove endpoints are deprecated.\n\nSetting `prompt` or `greeting` requires the `prompts:write` permission.\n\nAll changes in one request create a single new voice agent config version. The live and test releases keep pointing at their current versions until the new version is promoted.",
|
|
13994
|
+
description: "Update a voice agent. Only the fields you send change; omitted fields keep their current value.\n\nTo change the processor assignment, `call_processor_id` and `call_processor_type` must be provided together. Set `call_processor_id` to `null` to detach (`call_processor_type` is still required).\n\nModel fields (`llm_model`, `tts_provider`, `tts_model`, `tts_voice_id`, `stt_model`, `language` and their `fallback_*` counterparts) are validated against the agent's resulting configuration, so a single field such as `tts_voice_id` can be sent on its own as long as it fits the current provider and model.\n\nSet `voice_mail_detection` to `true` to have the agent listen for a voicemail beep tone. Detection only runs on `OUTBOUND` agents; enabling it on an `INBOUND` agent is stored but has no effect.\n\nSet `max_call_duration_seconds` to change how long a call may run before the agent ends it (default 1800).\n\nSet `noise_cancellation` to choose the noise cancellation mode applied to the caller audio.\n\nSet `tool_ids` to replace the agent's attached tool set. This is the supported way to manage tool attachments; the dedicated add and remove endpoints are deprecated.\n\nSet `evaluator_slug` to score the agent's calls with that evaluator. Calls only use it once the new version is promoted, because a call is evaluated with the version it ran on.\n\nSetting `prompt` or `greeting` requires the `prompts:write` permission.\n\nAll changes in one request create a single new voice agent config version. The live and test releases keep pointing at their current versions until the new version is promoted.",
|
|
13794
13995
|
inputSchema: {
|
|
13795
13996
|
pathParams: UpdateVoiceAgentParams,
|
|
13796
13997
|
bodyParams: UpdateVoiceAgentBody.optional()
|
|
@@ -16025,11 +16226,56 @@ var createMcpServer = (options) => {
|
|
|
16025
16226
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16026
16227
|
})
|
|
16027
16228
|
);
|
|
16229
|
+
tools.createEvaluator = server2.registerTool(
|
|
16230
|
+
"createEvaluator",
|
|
16231
|
+
{
|
|
16232
|
+
title: "Create an evaluator",
|
|
16233
|
+
description: "Create an evaluator: a named set of metrics that an LLM judge scores every call of the voice agents it is attached to.\n\nEvaluators can't be changed after creation, so past call scores keep their meaning. To change the criteria, create a new evaluator (e.g. `support-quality-v2`) and attach that instead. A slug that already exists returns 409.\n\nAttach it to a voice agent with `PATCH /v1/voice-agents/{voiceAgentId}` (`evaluator_slug`), then promote that version. Requires the `voice-agents:write` permission.",
|
|
16234
|
+
inputSchema: {
|
|
16235
|
+
bodyParams: CreateEvaluatorBody.optional()
|
|
16236
|
+
},
|
|
16237
|
+
outputSchema: CreateEvaluatorResponse,
|
|
16238
|
+
annotations: { destructiveHint: true }
|
|
16239
|
+
},
|
|
16240
|
+
(args, ctx) => createEvaluatorHandler(args, {
|
|
16241
|
+
...options,
|
|
16242
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16243
|
+
})
|
|
16244
|
+
);
|
|
16245
|
+
tools.listEvaluators = server2.registerTool(
|
|
16246
|
+
"listEvaluators",
|
|
16247
|
+
{
|
|
16248
|
+
title: "List evaluators",
|
|
16249
|
+
description: "List all evaluators of the tenant with their metrics.",
|
|
16250
|
+
outputSchema: ListEvaluatorsResponse,
|
|
16251
|
+
annotations: { readOnlyHint: true }
|
|
16252
|
+
},
|
|
16253
|
+
(ctx) => listEvaluatorsHandler({
|
|
16254
|
+
...options,
|
|
16255
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16256
|
+
})
|
|
16257
|
+
);
|
|
16258
|
+
tools.getEvaluator = server2.registerTool(
|
|
16259
|
+
"getEvaluator",
|
|
16260
|
+
{
|
|
16261
|
+
title: "Get an evaluator",
|
|
16262
|
+
description: "Retrieve an evaluator and the metrics its judge scores.",
|
|
16263
|
+
inputSchema: {
|
|
16264
|
+
pathParams: GetEvaluatorParams
|
|
16265
|
+
},
|
|
16266
|
+
outputSchema: GetEvaluatorResponse,
|
|
16267
|
+
annotations: { readOnlyHint: true }
|
|
16268
|
+
},
|
|
16269
|
+
(args, ctx) => getEvaluatorHandler(args, {
|
|
16270
|
+
...options,
|
|
16271
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
16272
|
+
})
|
|
16273
|
+
);
|
|
16028
16274
|
tools.createSchedule = server2.registerTool(
|
|
16029
16275
|
"createSchedule",
|
|
16030
16276
|
{
|
|
16031
16277
|
title: "Create a schedule",
|
|
16032
|
-
description: "Create a schedule that performs an action, either repeatedly or once.\n\n`action` describes **what** happens
|
|
16278
|
+
description: "Create a schedule that performs an action, either repeatedly or once.\n\n`action` describes **what** happens: `trigger_worker` starts a worker run with the given scope, and `execute_tool` executes a tool without parameters. `rule` describes **when**: `recurring` carries one or more `patterns`, and fires whenever any of them comes round. A pattern fires every hour at `minute`, narrowed by `hours` and `weekdays` \u2014 so `hours: [9]` is daily at 09:00, `hours: [12], weekdays: [1]` is Mondays at noon, and `hours: [9, 13, 17], weekdays: [1, 2, 3, 4, 5]` is three times a day on weekdays. Give a second pattern to mix cadences: hourly on weekdays plus 09:00, 11:00 and 18:00 at weekends is two patterns on one schedule. Patterns overlap harmlessly \u2014 two that land on the same minute fire once. Every set is read in the schedule's own time zone \u2014 an IANA identifier such as `America/Chicago`, resolved across DST transitions. `once` fires a single time at a UTC instant.\n\n`environments` says **which version** of the worker or tool each occurrence runs: `live` resolves it at its live version, `test` at its test version. Give both to soak a candidate version on the same cadence as production \u2014 every occurrence then fires twice, once per environment. Omit it to fire in `live` only.\n\nThe response's `next_run_at` is the first occurrence strictly after the moment of creation; a rule that resolves to no such occurrence is rejected. Create with `enabled: false` to stage a recurring schedule without letting it fire. A one-off is always enabled: delete it to cancel it, and its `next_run_at` becomes null once it has fired.\n\nRequires the `schedules:write` permission, and `tools:execute` for an `execute_tool` action.",
|
|
16033
16279
|
inputSchema: {
|
|
16034
16280
|
bodyParams: CreateScheduleBody.optional()
|
|
16035
16281
|
},
|
|
@@ -16110,7 +16356,7 @@ var createMcpServer = (options) => {
|
|
|
16110
16356
|
"listDispatches",
|
|
16111
16357
|
{
|
|
16112
16358
|
title: "List dispatches",
|
|
16113
|
-
description: "List the organization's dispatches, newest occurrence first.\n\nA dispatch is one occurrence of a trigger in one environment, carried out on its own: a schedule produces one per environment it runs in every time it fires, an inbound email produces one for the environment its inbox received it in, a resolved information request produces one that restarts the worker that asked, an ended call produces one that runs its voice agent's post-call processor once its transcript is ready, and creating a worker run through the API produces a `manual` one, carried out before the request returns. Listing them shows what a trigger has actually done, including occurrences that never produced anything.\n\n- `pending` \u2014 not carried out yet: waiting to be picked up, in flight, or waiting on a retry after an earlier pickup did not complete.\n- `dispatched` \u2014 carried out.\n- `abandoned` \u2014 gave up, because the occurrence passed its `expires_at` deadline before it could be carried out, or, for a `manual` dispatch, because the request that created it failed.\n\n`attempts` counts how many times the occurrence has been picked up, not how many times it failed: a dispatch carried out on the first pickup ends at `attempts: 1`, and a higher count means earlier pickups did not complete.\n\n`target` is what the occurrence produced
|
|
16359
|
+
description: "List the organization's dispatches, newest occurrence first.\n\nA dispatch is one occurrence of a trigger in one environment, carried out on its own: a schedule produces one per environment it runs in every time it fires, an inbound email produces one for the environment its inbox received it in, a resolved information request produces one that restarts the worker that asked, an ended call produces one that runs its voice agent's post-call processor once its transcript is ready, and creating a worker run through the API produces a `manual` one, carried out before the request returns. Listing them shows what a trigger has actually done, including occurrences that never produced anything.\n\n- `pending` \u2014 not carried out yet: waiting to be picked up, in flight, or waiting on a retry after an earlier pickup did not complete.\n- `dispatched` \u2014 carried out.\n- `abandoned` \u2014 gave up, because the occurrence passed its `expires_at` deadline before it could be carried out, or, for a `manual` dispatch, because the request that created it failed.\n\n`attempts` counts how many times the occurrence has been picked up, not how many times it failed: a dispatch carried out on the first pickup ends at `attempts: 1`, and a higher count means earlier pickups did not complete.\n\n`target` is what the occurrence produced: a worker run, an extractor job (for an email whose inbox extracts or a call whose voice agent extracts), or a tool call (for an `execute_tool` schedule). It is null until the dispatch is carried out, and for a tool call until the tool has run.\n\nNarrow to one trigger with `trigger_type` and `trigger_id` \u2014 the schedule's ID for a schedule, the email's ID for an email, the request's ID for an information request, the call's ID for a call. `trigger_id` requires `trigger_type`.",
|
|
16114
16360
|
inputSchema: {
|
|
16115
16361
|
queryParams: ListDispatchesQueryParams
|
|
16116
16362
|
},
|
|
@@ -16819,4 +17065,4 @@ var transport = new StdioServerTransport();
|
|
|
16819
17065
|
server.connect(transport).then(() => {
|
|
16820
17066
|
console.error("MCP server running on stdio");
|
|
16821
17067
|
}).catch(console.error);
|
|
16822
|
-
//# sourceMappingURL=server-
|
|
17068
|
+
//# sourceMappingURL=server-3JZUJX4G.js.map
|