@avallon-labs/mcp 69.10.0 → 69.11.0-staging.1499
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
|
@@ -3068,6 +3068,52 @@ var getIntake = async (intakeId, options) => {
|
|
|
3068
3068
|
const data = body ? JSON.parse(body) : {};
|
|
3069
3069
|
return { data, status: res.status, headers: res.headers };
|
|
3070
3070
|
};
|
|
3071
|
+
var getUpdateIntakeUrl = (intakeId) => {
|
|
3072
|
+
return `/v1/intakes/${intakeId}`;
|
|
3073
|
+
};
|
|
3074
|
+
var updateIntake = async (intakeId, updateIntakeBody, options) => {
|
|
3075
|
+
const getHeaders = (h) => {
|
|
3076
|
+
if (!h) return {};
|
|
3077
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3078
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3079
|
+
return h;
|
|
3080
|
+
};
|
|
3081
|
+
const res = await fetch(
|
|
3082
|
+
getUpdateIntakeUrl(intakeId),
|
|
3083
|
+
{
|
|
3084
|
+
...options,
|
|
3085
|
+
method: "PATCH",
|
|
3086
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
3087
|
+
body: JSON.stringify(updateIntakeBody)
|
|
3088
|
+
}
|
|
3089
|
+
);
|
|
3090
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
3091
|
+
const data = body ? JSON.parse(body) : {};
|
|
3092
|
+
return { data, status: res.status, headers: res.headers };
|
|
3093
|
+
};
|
|
3094
|
+
var getPromoteIntakeVersionUrl = (intakeId, version) => {
|
|
3095
|
+
return `/v1/intakes/${intakeId}/versions/${version}/promote`;
|
|
3096
|
+
};
|
|
3097
|
+
var promoteIntakeVersion = async (intakeId, version, promoteIntakeVersionBody, options) => {
|
|
3098
|
+
const getHeaders = (h) => {
|
|
3099
|
+
if (!h) return {};
|
|
3100
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3101
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
3102
|
+
return h;
|
|
3103
|
+
};
|
|
3104
|
+
const res = await fetch(
|
|
3105
|
+
getPromoteIntakeVersionUrl(intakeId, version),
|
|
3106
|
+
{
|
|
3107
|
+
...options,
|
|
3108
|
+
method: "POST",
|
|
3109
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
3110
|
+
body: JSON.stringify(promoteIntakeVersionBody)
|
|
3111
|
+
}
|
|
3112
|
+
);
|
|
3113
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
3114
|
+
const data = body ? JSON.parse(body) : {};
|
|
3115
|
+
return { data, status: res.status, headers: res.headers };
|
|
3116
|
+
};
|
|
3071
3117
|
var getGetExtractUrl = (id) => {
|
|
3072
3118
|
return `/v1/extracts/${id}`;
|
|
3073
3119
|
};
|
|
@@ -8035,6 +8081,52 @@ var getIntakeHandler = async (args, options) => {
|
|
|
8035
8081
|
structuredContent: res.data
|
|
8036
8082
|
};
|
|
8037
8083
|
};
|
|
8084
|
+
var updateIntakeHandler = async (args, options) => {
|
|
8085
|
+
const res = await updateIntake(args.pathParams.intakeId, args.bodyParams, options);
|
|
8086
|
+
if (res.status >= 400) {
|
|
8087
|
+
return {
|
|
8088
|
+
content: [
|
|
8089
|
+
{
|
|
8090
|
+
type: "text",
|
|
8091
|
+
text: JSON.stringify(res.data ?? null)
|
|
8092
|
+
}
|
|
8093
|
+
],
|
|
8094
|
+
isError: true
|
|
8095
|
+
};
|
|
8096
|
+
}
|
|
8097
|
+
return {
|
|
8098
|
+
content: [
|
|
8099
|
+
{
|
|
8100
|
+
type: "text",
|
|
8101
|
+
text: JSON.stringify(res.data ?? null)
|
|
8102
|
+
}
|
|
8103
|
+
],
|
|
8104
|
+
structuredContent: res.data
|
|
8105
|
+
};
|
|
8106
|
+
};
|
|
8107
|
+
var promoteIntakeVersionHandler = async (args, options) => {
|
|
8108
|
+
const res = await promoteIntakeVersion(args.pathParams.intakeId, args.pathParams.version, args.bodyParams, options);
|
|
8109
|
+
if (res.status >= 400) {
|
|
8110
|
+
return {
|
|
8111
|
+
content: [
|
|
8112
|
+
{
|
|
8113
|
+
type: "text",
|
|
8114
|
+
text: JSON.stringify(res.data ?? null)
|
|
8115
|
+
}
|
|
8116
|
+
],
|
|
8117
|
+
isError: true
|
|
8118
|
+
};
|
|
8119
|
+
}
|
|
8120
|
+
return {
|
|
8121
|
+
content: [
|
|
8122
|
+
{
|
|
8123
|
+
type: "text",
|
|
8124
|
+
text: JSON.stringify(res.data ?? null)
|
|
8125
|
+
}
|
|
8126
|
+
],
|
|
8127
|
+
structuredContent: res.data
|
|
8128
|
+
};
|
|
8129
|
+
};
|
|
8038
8130
|
var getExtractHandler = async (args, options) => {
|
|
8039
8131
|
const res = await getExtract(args.pathParams.id, options);
|
|
8040
8132
|
if (res.status >= 400) {
|
|
@@ -14379,8 +14471,10 @@ var GetFormSubmissionResponse = zod.object({
|
|
|
14379
14471
|
}),
|
|
14380
14472
|
"message": zod.string()
|
|
14381
14473
|
});
|
|
14474
|
+
var createIntakeBodyDryRunDefault = false;
|
|
14382
14475
|
var CreateIntakeBody = zod.object({
|
|
14383
14476
|
"name": zod.string().min(1),
|
|
14477
|
+
"dry_run": zod.boolean().default(createIntakeBodyDryRunDefault),
|
|
14384
14478
|
"routes": zod.array(zod.object({
|
|
14385
14479
|
"name": zod.string().min(1),
|
|
14386
14480
|
"description": zod.string().min(1).describe("What the routing worker reads to pick this route."),
|
|
@@ -14392,12 +14486,13 @@ var CreateIntakeResponse = zod.object({
|
|
|
14392
14486
|
"data": zod.object({
|
|
14393
14487
|
"id": zod.string(),
|
|
14394
14488
|
"name": zod.string(),
|
|
14395
|
-
"version": zod.number()
|
|
14489
|
+
"version": zod.number(),
|
|
14396
14490
|
"versions": zod.object({
|
|
14397
14491
|
"latest": zod.number(),
|
|
14398
14492
|
"live": zod.number(),
|
|
14399
14493
|
"test": zod.number()
|
|
14400
14494
|
}),
|
|
14495
|
+
"dry_run": zod.boolean().describe("When true, routed items are not handed to their route's worker."),
|
|
14401
14496
|
"routes": zod.array(zod.object({
|
|
14402
14497
|
"id": zod.string(),
|
|
14403
14498
|
"name": zod.string(),
|
|
@@ -14417,12 +14512,13 @@ var GetIntakeResponse = zod.object({
|
|
|
14417
14512
|
"data": zod.object({
|
|
14418
14513
|
"id": zod.string(),
|
|
14419
14514
|
"name": zod.string(),
|
|
14420
|
-
"version": zod.number()
|
|
14515
|
+
"version": zod.number(),
|
|
14421
14516
|
"versions": zod.object({
|
|
14422
14517
|
"latest": zod.number(),
|
|
14423
14518
|
"live": zod.number(),
|
|
14424
14519
|
"test": zod.number()
|
|
14425
14520
|
}),
|
|
14521
|
+
"dry_run": zod.boolean().describe("When true, routed items are not handed to their route's worker."),
|
|
14426
14522
|
"routes": zod.array(zod.object({
|
|
14427
14523
|
"id": zod.string(),
|
|
14428
14524
|
"name": zod.string(),
|
|
@@ -14435,6 +14531,49 @@ var GetIntakeResponse = zod.object({
|
|
|
14435
14531
|
}),
|
|
14436
14532
|
"message": zod.string()
|
|
14437
14533
|
});
|
|
14534
|
+
var UpdateIntakeParams = zod.object({
|
|
14535
|
+
"intakeId": zod.string().uuid()
|
|
14536
|
+
});
|
|
14537
|
+
var UpdateIntakeBody = zod.object({
|
|
14538
|
+
"dry_run": zod.boolean().optional()
|
|
14539
|
+
});
|
|
14540
|
+
var UpdateIntakeResponse = zod.object({
|
|
14541
|
+
"data": zod.object({
|
|
14542
|
+
"id": zod.string(),
|
|
14543
|
+
"name": zod.string(),
|
|
14544
|
+
"version": zod.number(),
|
|
14545
|
+
"versions": zod.object({
|
|
14546
|
+
"latest": zod.number(),
|
|
14547
|
+
"live": zod.number(),
|
|
14548
|
+
"test": zod.number()
|
|
14549
|
+
}),
|
|
14550
|
+
"dry_run": zod.boolean().describe("When true, routed items are not handed to their route's worker."),
|
|
14551
|
+
"routes": zod.array(zod.object({
|
|
14552
|
+
"id": zod.string(),
|
|
14553
|
+
"name": zod.string(),
|
|
14554
|
+
"description": zod.string(),
|
|
14555
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
14556
|
+
"processor_id": zod.string()
|
|
14557
|
+
})),
|
|
14558
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
14559
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
14560
|
+
}),
|
|
14561
|
+
"message": zod.string()
|
|
14562
|
+
});
|
|
14563
|
+
var PromoteIntakeVersionParams = zod.object({
|
|
14564
|
+
"intakeId": zod.string().uuid(),
|
|
14565
|
+
"version": zod.number()
|
|
14566
|
+
});
|
|
14567
|
+
var PromoteIntakeVersionBody = zod.object({
|
|
14568
|
+
"environment": zod.enum(["live", "test"])
|
|
14569
|
+
});
|
|
14570
|
+
var PromoteIntakeVersionResponse = zod.object({
|
|
14571
|
+
"data": zod.object({
|
|
14572
|
+
"version": zod.number(),
|
|
14573
|
+
"environment": zod.enum(["live", "test"])
|
|
14574
|
+
}),
|
|
14575
|
+
"message": zod.string()
|
|
14576
|
+
});
|
|
14438
14577
|
var GetExtractParams = zod.object({
|
|
14439
14578
|
"id": zod.string().uuid()
|
|
14440
14579
|
});
|
|
@@ -15186,7 +15325,7 @@ var listDispatchesQueryOffsetMin = 0;
|
|
|
15186
15325
|
var listDispatchesQuerySortByDefault = `due_at`;
|
|
15187
15326
|
var listDispatchesQuerySortOrderDefault = `desc`;
|
|
15188
15327
|
var ListDispatchesQueryParams = zod.object({
|
|
15189
|
-
"trigger_type": zod.enum(["schedule", "email", "information_request", "manual", "call", "form_submission"]).optional().describe("Only dispatches produced by this kind of trigger"),
|
|
15328
|
+
"trigger_type": zod.enum(["schedule", "email", "information_request", "manual", "call", "form_submission", "intake_bundle"]).optional().describe("Only dispatches produced by this kind of trigger"),
|
|
15190
15329
|
"trigger_id": zod.string().uuid().optional().describe("Only dispatches produced by this trigger. Requires `trigger_type`."),
|
|
15191
15330
|
"count": zod.number().min(1).max(listDispatchesQueryCountMax).default(listDispatchesQueryCountDefault),
|
|
15192
15331
|
"offset": zod.number().min(listDispatchesQueryOffsetMin).default(listDispatchesQueryOffsetDefault),
|
|
@@ -15199,7 +15338,7 @@ var ListDispatchesResponse = zod.object({
|
|
|
15199
15338
|
"data": zod.array(zod.object({
|
|
15200
15339
|
"id": zod.string(),
|
|
15201
15340
|
"trigger": zod.object({
|
|
15202
|
-
"type": zod.enum(["schedule", "email", "information_request", "manual", "call", "form_submission"]),
|
|
15341
|
+
"type": zod.enum(["schedule", "email", "information_request", "manual", "call", "form_submission", "intake_bundle"]),
|
|
15203
15342
|
"id": zod.string()
|
|
15204
15343
|
}),
|
|
15205
15344
|
"target": zod.union([zod.object({
|
|
@@ -15972,7 +16111,7 @@ var GetToolCallResponse = zod.object({
|
|
|
15972
16111
|
"dispatch": zod.union([zod.object({
|
|
15973
16112
|
"id": zod.string(),
|
|
15974
16113
|
"trigger": zod.object({
|
|
15975
|
-
"type": zod.enum(["schedule", "email", "information_request", "manual", "call", "form_submission"]),
|
|
16114
|
+
"type": zod.enum(["schedule", "email", "information_request", "manual", "call", "form_submission", "intake_bundle"]),
|
|
15976
16115
|
"id": zod.string()
|
|
15977
16116
|
}),
|
|
15978
16117
|
"target": zod.union([zod.object({
|
|
@@ -18896,7 +19035,7 @@ var createMcpServer = (options) => {
|
|
|
18896
19035
|
"createIntake",
|
|
18897
19036
|
{
|
|
18898
19037
|
title: "Create intake",
|
|
18899
|
-
description: "Create an intake with the routes its items can be routed to. The routes become version 1, used by both live and test. A worker routes the intake's items once its config has the `intake_id`, set with `PATCH /v1/workers/{workerId}`. Route names must be unique within the intake, and only workers can process a route.",
|
|
19038
|
+
description: "Create an intake with the routes its items can be routed to. The routes and dry run become version 1, used by both live and test. A worker routes the intake's items once its config has the `intake_id`, set with `PATCH /v1/workers/{workerId}`. Route names must be unique within the intake, and only workers can process a route.",
|
|
18900
19039
|
inputSchema: {
|
|
18901
19040
|
bodyParams: CreateIntakeBody.optional()
|
|
18902
19041
|
},
|
|
@@ -18924,6 +19063,40 @@ var createMcpServer = (options) => {
|
|
|
18924
19063
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
18925
19064
|
})
|
|
18926
19065
|
);
|
|
19066
|
+
tools.updateIntake = server2.registerTool(
|
|
19067
|
+
"updateIntake",
|
|
19068
|
+
{
|
|
19069
|
+
title: "Update intake",
|
|
19070
|
+
description: "Update an intake. A change creates a new version, which live and test use once it is promoted.",
|
|
19071
|
+
inputSchema: {
|
|
19072
|
+
pathParams: UpdateIntakeParams,
|
|
19073
|
+
bodyParams: UpdateIntakeBody.optional()
|
|
19074
|
+
},
|
|
19075
|
+
outputSchema: UpdateIntakeResponse,
|
|
19076
|
+
annotations: { destructiveHint: true }
|
|
19077
|
+
},
|
|
19078
|
+
(args, ctx) => updateIntakeHandler(args, {
|
|
19079
|
+
...options,
|
|
19080
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
19081
|
+
})
|
|
19082
|
+
);
|
|
19083
|
+
tools.promoteIntakeVersion = server2.registerTool(
|
|
19084
|
+
"promoteIntakeVersion",
|
|
19085
|
+
{
|
|
19086
|
+
title: "Promote intake version",
|
|
19087
|
+
description: "Point the live or test environment at a version. Any existing version can be promoted, including an older one.",
|
|
19088
|
+
inputSchema: {
|
|
19089
|
+
pathParams: PromoteIntakeVersionParams,
|
|
19090
|
+
bodyParams: PromoteIntakeVersionBody.optional()
|
|
19091
|
+
},
|
|
19092
|
+
outputSchema: PromoteIntakeVersionResponse,
|
|
19093
|
+
annotations: { destructiveHint: true }
|
|
19094
|
+
},
|
|
19095
|
+
(args, ctx) => promoteIntakeVersionHandler(args, {
|
|
19096
|
+
...options,
|
|
19097
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
19098
|
+
})
|
|
19099
|
+
);
|
|
18927
19100
|
tools.getExtract = server2.registerTool(
|
|
18928
19101
|
"getExtract",
|
|
18929
19102
|
{
|
|
@@ -20204,4 +20377,4 @@ var transport = new StdioServerTransport();
|
|
|
20204
20377
|
server.connect(transport).then(() => {
|
|
20205
20378
|
console.error("MCP server running on stdio");
|
|
20206
20379
|
}).catch(console.error);
|
|
20207
|
-
//# sourceMappingURL=server-
|
|
20380
|
+
//# sourceMappingURL=server-5PI52LBC.js.map
|