@avallon-labs/mcp 70.2.0-staging.1509 → 70.4.0-staging.1511
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
|
@@ -3053,6 +3053,28 @@ var createIntake = async (createIntakeBody, options) => {
|
|
|
3053
3053
|
const data = body ? JSON.parse(body) : {};
|
|
3054
3054
|
return { data, status: res.status, headers: res.headers };
|
|
3055
3055
|
};
|
|
3056
|
+
var getListIntakesUrl = (params) => {
|
|
3057
|
+
const normalizedParams = new URLSearchParams();
|
|
3058
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
3059
|
+
if (value !== void 0) {
|
|
3060
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3061
|
+
}
|
|
3062
|
+
});
|
|
3063
|
+
const stringifiedParams = normalizedParams.toString();
|
|
3064
|
+
return stringifiedParams.length > 0 ? `/v1/intakes?${stringifiedParams}` : `/v1/intakes`;
|
|
3065
|
+
};
|
|
3066
|
+
var listIntakes = async (params, options) => {
|
|
3067
|
+
const res = await fetch(
|
|
3068
|
+
getListIntakesUrl(params),
|
|
3069
|
+
{
|
|
3070
|
+
...options,
|
|
3071
|
+
method: "GET"
|
|
3072
|
+
}
|
|
3073
|
+
);
|
|
3074
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
3075
|
+
const data = body ? JSON.parse(body) : {};
|
|
3076
|
+
return { data, status: res.status, headers: res.headers };
|
|
3077
|
+
};
|
|
3056
3078
|
var getGetIntakeUrl = (intakeId) => {
|
|
3057
3079
|
return `/v1/intakes/${intakeId}`;
|
|
3058
3080
|
};
|
|
@@ -4019,6 +4041,21 @@ var getCaseTypeVersion = async (caseTypeSlug, version, options) => {
|
|
|
4019
4041
|
const data = body ? JSON.parse(body) : {};
|
|
4020
4042
|
return { data, status: res.status, headers: res.headers };
|
|
4021
4043
|
};
|
|
4044
|
+
var getGetCaseTypeViewTemplateUrl = (caseTypeSlug, version) => {
|
|
4045
|
+
return `/v1/case-types/${caseTypeSlug}/versions/${version}/view-template`;
|
|
4046
|
+
};
|
|
4047
|
+
var getCaseTypeViewTemplate = async (caseTypeSlug, version, options) => {
|
|
4048
|
+
const res = await fetch(
|
|
4049
|
+
getGetCaseTypeViewTemplateUrl(caseTypeSlug, version),
|
|
4050
|
+
{
|
|
4051
|
+
...options,
|
|
4052
|
+
method: "GET"
|
|
4053
|
+
}
|
|
4054
|
+
);
|
|
4055
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
4056
|
+
const data = body ? JSON.parse(body) : {};
|
|
4057
|
+
return { data, status: res.status, headers: res.headers };
|
|
4058
|
+
};
|
|
4022
4059
|
var getPromoteCaseTypeVersionUrl = (caseTypeSlug, version) => {
|
|
4023
4060
|
return `/v1/case-types/${caseTypeSlug}/versions/${version}/promote`;
|
|
4024
4061
|
};
|
|
@@ -8103,6 +8140,29 @@ var createIntakeHandler = async (args, options) => {
|
|
|
8103
8140
|
structuredContent: res.data
|
|
8104
8141
|
};
|
|
8105
8142
|
};
|
|
8143
|
+
var listIntakesHandler = async (args, options) => {
|
|
8144
|
+
const res = await listIntakes(args.queryParams, options);
|
|
8145
|
+
if (res.status >= 400) {
|
|
8146
|
+
return {
|
|
8147
|
+
content: [
|
|
8148
|
+
{
|
|
8149
|
+
type: "text",
|
|
8150
|
+
text: JSON.stringify(res.data ?? null)
|
|
8151
|
+
}
|
|
8152
|
+
],
|
|
8153
|
+
isError: true
|
|
8154
|
+
};
|
|
8155
|
+
}
|
|
8156
|
+
return {
|
|
8157
|
+
content: [
|
|
8158
|
+
{
|
|
8159
|
+
type: "text",
|
|
8160
|
+
text: JSON.stringify(res.data ?? null)
|
|
8161
|
+
}
|
|
8162
|
+
],
|
|
8163
|
+
structuredContent: res.data
|
|
8164
|
+
};
|
|
8165
|
+
};
|
|
8106
8166
|
var getIntakeHandler = async (args, options) => {
|
|
8107
8167
|
const res = await getIntake(args.pathParams.intakeId, options);
|
|
8108
8168
|
if (res.status >= 400) {
|
|
@@ -9253,6 +9313,29 @@ var getCaseTypeVersionHandler = async (args, options) => {
|
|
|
9253
9313
|
structuredContent: res.data
|
|
9254
9314
|
};
|
|
9255
9315
|
};
|
|
9316
|
+
var getCaseTypeViewTemplateHandler = async (args, options) => {
|
|
9317
|
+
const res = await getCaseTypeViewTemplate(args.pathParams.caseTypeSlug, args.pathParams.version, options);
|
|
9318
|
+
if (res.status >= 400) {
|
|
9319
|
+
return {
|
|
9320
|
+
content: [
|
|
9321
|
+
{
|
|
9322
|
+
type: "text",
|
|
9323
|
+
text: JSON.stringify(res.data ?? null)
|
|
9324
|
+
}
|
|
9325
|
+
],
|
|
9326
|
+
isError: true
|
|
9327
|
+
};
|
|
9328
|
+
}
|
|
9329
|
+
return {
|
|
9330
|
+
content: [
|
|
9331
|
+
{
|
|
9332
|
+
type: "text",
|
|
9333
|
+
text: JSON.stringify(res.data ?? null)
|
|
9334
|
+
}
|
|
9335
|
+
],
|
|
9336
|
+
structuredContent: res.data
|
|
9337
|
+
};
|
|
9338
|
+
};
|
|
9256
9339
|
var promoteCaseTypeVersionHandler = async (args, options) => {
|
|
9257
9340
|
const res = await promoteCaseTypeVersion(args.pathParams.caseTypeSlug, args.pathParams.version, args.bodyParams, options);
|
|
9258
9341
|
if (res.status >= 400) {
|
|
@@ -14596,6 +14679,44 @@ var CreateIntakeResponse = zod.object({
|
|
|
14596
14679
|
}),
|
|
14597
14680
|
"message": zod.string()
|
|
14598
14681
|
});
|
|
14682
|
+
var listIntakesQueryCountDefault = 50;
|
|
14683
|
+
var listIntakesQueryCountMax = 100;
|
|
14684
|
+
var listIntakesQueryOffsetDefault = 0;
|
|
14685
|
+
var listIntakesQueryOffsetMin = 0;
|
|
14686
|
+
var listIntakesQuerySortByDefault = `created_at`;
|
|
14687
|
+
var listIntakesQuerySortOrderDefault = `desc`;
|
|
14688
|
+
var ListIntakesQueryParams = zod.object({
|
|
14689
|
+
"count": zod.number().min(1).max(listIntakesQueryCountMax).default(listIntakesQueryCountDefault),
|
|
14690
|
+
"offset": zod.number().min(listIntakesQueryOffsetMin).default(listIntakesQueryOffsetDefault),
|
|
14691
|
+
"sort_by": zod.enum(["created_at"]).default(listIntakesQuerySortByDefault),
|
|
14692
|
+
"sort_order": zod.enum(["asc", "desc"]).default(listIntakesQuerySortOrderDefault)
|
|
14693
|
+
});
|
|
14694
|
+
var ListIntakesResponse = zod.object({
|
|
14695
|
+
"data": zod.array(zod.object({
|
|
14696
|
+
"id": zod.string(),
|
|
14697
|
+
"name": zod.string(),
|
|
14698
|
+
"version": zod.number(),
|
|
14699
|
+
"versions": zod.object({
|
|
14700
|
+
"latest": zod.number(),
|
|
14701
|
+
"live": zod.number(),
|
|
14702
|
+
"test": zod.number()
|
|
14703
|
+
}),
|
|
14704
|
+
"dry_run": zod.boolean().describe("When true, routed items are not handed to their route's worker."),
|
|
14705
|
+
"routes": zod.array(zod.object({
|
|
14706
|
+
"id": zod.string(),
|
|
14707
|
+
"name": zod.string(),
|
|
14708
|
+
"description": zod.string(),
|
|
14709
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
14710
|
+
"processor_id": zod.string()
|
|
14711
|
+
})),
|
|
14712
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
14713
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
14714
|
+
})),
|
|
14715
|
+
"message": zod.string(),
|
|
14716
|
+
"meta": zod.object({
|
|
14717
|
+
"total": zod.number()
|
|
14718
|
+
})
|
|
14719
|
+
});
|
|
14599
14720
|
var GetIntakeParams = zod.object({
|
|
14600
14721
|
"intakeId": zod.string().uuid()
|
|
14601
14722
|
});
|
|
@@ -14618,7 +14739,8 @@ var GetIntakeResponse = zod.object({
|
|
|
14618
14739
|
"processor_id": zod.string()
|
|
14619
14740
|
})),
|
|
14620
14741
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
14621
|
-
"updated_at": zod.string().datetime({ "offset": true })
|
|
14742
|
+
"updated_at": zod.string().datetime({ "offset": true }),
|
|
14743
|
+
"worker_id": zod.union([zod.string(), zod.null()]).describe("Worker that routes the intake's items.")
|
|
14622
14744
|
}),
|
|
14623
14745
|
"message": zod.string()
|
|
14624
14746
|
});
|
|
@@ -15804,7 +15926,8 @@ var UpdateCaseTypeParams = zod.object({
|
|
|
15804
15926
|
"caseTypeSlug": zod.string()
|
|
15805
15927
|
});
|
|
15806
15928
|
var UpdateCaseTypeBody = zod.object({
|
|
15807
|
-
"name": zod.string().min(1).optional()
|
|
15929
|
+
"name": zod.string().min(1).optional(),
|
|
15930
|
+
"view_template": zod.union([zod.string().min(1), zod.null()]).optional()
|
|
15808
15931
|
});
|
|
15809
15932
|
var UpdateCaseTypeResponse = zod.object({
|
|
15810
15933
|
"data": zod.object({
|
|
@@ -15892,6 +16015,18 @@ var GetCaseTypeVersionResponse = zod.object({
|
|
|
15892
16015
|
}),
|
|
15893
16016
|
"message": zod.string()
|
|
15894
16017
|
});
|
|
16018
|
+
var getCaseTypeViewTemplatePathVersionMax = 9007199254740991;
|
|
16019
|
+
var GetCaseTypeViewTemplateParams = zod.object({
|
|
16020
|
+
"caseTypeSlug": zod.string(),
|
|
16021
|
+
"version": zod.number().int().min(1).max(getCaseTypeViewTemplatePathVersionMax)
|
|
16022
|
+
});
|
|
16023
|
+
var GetCaseTypeViewTemplateResponse = zod.object({
|
|
16024
|
+
"data": zod.object({
|
|
16025
|
+
"version": zod.number(),
|
|
16026
|
+
"view_template": zod.union([zod.string(), zod.null()])
|
|
16027
|
+
}),
|
|
16028
|
+
"message": zod.string()
|
|
16029
|
+
});
|
|
15895
16030
|
var PromoteCaseTypeVersionParams = zod.object({
|
|
15896
16031
|
"caseTypeSlug": zod.string(),
|
|
15897
16032
|
"version": zod.number()
|
|
@@ -19211,6 +19346,22 @@ var createMcpServer = (options) => {
|
|
|
19211
19346
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
19212
19347
|
})
|
|
19213
19348
|
);
|
|
19349
|
+
tools.listIntakes = server2.registerTool(
|
|
19350
|
+
"listIntakes",
|
|
19351
|
+
{
|
|
19352
|
+
title: "List intakes",
|
|
19353
|
+
description: "List intakes with their routes at the newest version.",
|
|
19354
|
+
inputSchema: {
|
|
19355
|
+
queryParams: ListIntakesQueryParams
|
|
19356
|
+
},
|
|
19357
|
+
outputSchema: ListIntakesResponse,
|
|
19358
|
+
annotations: { readOnlyHint: true }
|
|
19359
|
+
},
|
|
19360
|
+
(args, ctx) => listIntakesHandler(args, {
|
|
19361
|
+
...options,
|
|
19362
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
19363
|
+
})
|
|
19364
|
+
);
|
|
19214
19365
|
tools.getIntake = server2.registerTool(
|
|
19215
19366
|
"getIntake",
|
|
19216
19367
|
{
|
|
@@ -19961,7 +20112,7 @@ var createMcpServer = (options) => {
|
|
|
19961
20112
|
"updateCaseType",
|
|
19962
20113
|
{
|
|
19963
20114
|
title: "Update case type",
|
|
19964
|
-
description: "Update a case type. Its fields are changed through `/v1/case-types/{caseTypeSlug}/fields`.",
|
|
20115
|
+
description: "Update a case type. Its fields are changed through `/v1/case-types/{caseTypeSlug}/fields`. Setting `view_template`, or removing it with null, creates a new version; its placeholders must name fields of the case type.",
|
|
19965
20116
|
inputSchema: {
|
|
19966
20117
|
pathParams: UpdateCaseTypeParams,
|
|
19967
20118
|
bodyParams: UpdateCaseTypeBody.optional()
|
|
@@ -20007,6 +20158,22 @@ var createMcpServer = (options) => {
|
|
|
20007
20158
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
20008
20159
|
})
|
|
20009
20160
|
);
|
|
20161
|
+
tools.getCaseTypeViewTemplate = server2.registerTool(
|
|
20162
|
+
"getCaseTypeViewTemplate",
|
|
20163
|
+
{
|
|
20164
|
+
title: "Get case type view template",
|
|
20165
|
+
description: "Retrieve the Overview template of a case type at a specific version, or null when it has none.",
|
|
20166
|
+
inputSchema: {
|
|
20167
|
+
pathParams: GetCaseTypeViewTemplateParams
|
|
20168
|
+
},
|
|
20169
|
+
outputSchema: GetCaseTypeViewTemplateResponse,
|
|
20170
|
+
annotations: { readOnlyHint: true }
|
|
20171
|
+
},
|
|
20172
|
+
(args, ctx) => getCaseTypeViewTemplateHandler(args, {
|
|
20173
|
+
...options,
|
|
20174
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
20175
|
+
})
|
|
20176
|
+
);
|
|
20010
20177
|
tools.promoteCaseTypeVersion = server2.registerTool(
|
|
20011
20178
|
"promoteCaseTypeVersion",
|
|
20012
20179
|
{
|
|
@@ -20575,4 +20742,4 @@ var transport = new StdioServerTransport();
|
|
|
20575
20742
|
server.connect(transport).then(() => {
|
|
20576
20743
|
console.error("MCP server running on stdio");
|
|
20577
20744
|
}).catch(console.error);
|
|
20578
|
-
//# sourceMappingURL=server-
|
|
20745
|
+
//# sourceMappingURL=server-MCY7RYOU.js.map
|