@avallon-labs/mcp 29.0.0 → 29.1.0-staging.815
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
|
@@ -1701,6 +1701,69 @@ var getCase = async (id, options) => {
|
|
|
1701
1701
|
const data = body ? JSON.parse(body) : {};
|
|
1702
1702
|
return { data, status: res.status, headers: res.headers };
|
|
1703
1703
|
};
|
|
1704
|
+
var getAddCaseLinksUrl = (id) => {
|
|
1705
|
+
return `/v1/cases/${id}/links`;
|
|
1706
|
+
};
|
|
1707
|
+
var addCaseLinks = async (id, addCaseLinksBody, options) => {
|
|
1708
|
+
const res = await fetch(getAddCaseLinksUrl(id), {
|
|
1709
|
+
...options,
|
|
1710
|
+
method: "POST",
|
|
1711
|
+
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
1712
|
+
body: JSON.stringify(addCaseLinksBody)
|
|
1713
|
+
});
|
|
1714
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1715
|
+
const data = body ? JSON.parse(body) : {};
|
|
1716
|
+
return {
|
|
1717
|
+
data,
|
|
1718
|
+
status: res.status,
|
|
1719
|
+
headers: res.headers
|
|
1720
|
+
};
|
|
1721
|
+
};
|
|
1722
|
+
var getListCaseLinksUrl = (id, params) => {
|
|
1723
|
+
const normalizedParams = new URLSearchParams();
|
|
1724
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1725
|
+
if (value !== void 0) {
|
|
1726
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
1727
|
+
for (const [sk, sv] of Object.entries(value)) {
|
|
1728
|
+
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1729
|
+
}
|
|
1730
|
+
} else {
|
|
1731
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
});
|
|
1735
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1736
|
+
return stringifiedParams.length > 0 ? `/v1/cases/${id}/links?${stringifiedParams}` : `/v1/cases/${id}/links`;
|
|
1737
|
+
};
|
|
1738
|
+
var listCaseLinks = async (id, params, options) => {
|
|
1739
|
+
const res = await fetch(getListCaseLinksUrl(id, params), {
|
|
1740
|
+
...options,
|
|
1741
|
+
method: "GET"
|
|
1742
|
+
});
|
|
1743
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1744
|
+
const data = body ? JSON.parse(body) : {};
|
|
1745
|
+
return {
|
|
1746
|
+
data,
|
|
1747
|
+
status: res.status,
|
|
1748
|
+
headers: res.headers
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1751
|
+
var getRemoveCaseLinkUrl = (id, entityType, entityId) => {
|
|
1752
|
+
return `/v1/cases/${id}/links/${entityType}/${entityId}`;
|
|
1753
|
+
};
|
|
1754
|
+
var removeCaseLink = async (id, entityType, entityId, options) => {
|
|
1755
|
+
const res = await fetch(getRemoveCaseLinkUrl(id, entityType, entityId), {
|
|
1756
|
+
...options,
|
|
1757
|
+
method: "DELETE"
|
|
1758
|
+
});
|
|
1759
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1760
|
+
const data = body ? JSON.parse(body) : {};
|
|
1761
|
+
return {
|
|
1762
|
+
data,
|
|
1763
|
+
status: res.status,
|
|
1764
|
+
headers: res.headers
|
|
1765
|
+
};
|
|
1766
|
+
};
|
|
1704
1767
|
var getCreateChatAgentUrl = () => {
|
|
1705
1768
|
return `/v1/chat-agents`;
|
|
1706
1769
|
};
|
|
@@ -3399,6 +3462,43 @@ var getCaseHandler = async (args) => {
|
|
|
3399
3462
|
]
|
|
3400
3463
|
};
|
|
3401
3464
|
};
|
|
3465
|
+
var addCaseLinksHandler = async (args) => {
|
|
3466
|
+
const res = await addCaseLinks(args.pathParams.id, args.bodyParams);
|
|
3467
|
+
return {
|
|
3468
|
+
content: [
|
|
3469
|
+
{
|
|
3470
|
+
type: "text",
|
|
3471
|
+
text: JSON.stringify(res)
|
|
3472
|
+
}
|
|
3473
|
+
]
|
|
3474
|
+
};
|
|
3475
|
+
};
|
|
3476
|
+
var listCaseLinksHandler = async (args) => {
|
|
3477
|
+
const res = await listCaseLinks(args.pathParams.id, args.queryParams);
|
|
3478
|
+
return {
|
|
3479
|
+
content: [
|
|
3480
|
+
{
|
|
3481
|
+
type: "text",
|
|
3482
|
+
text: JSON.stringify(res)
|
|
3483
|
+
}
|
|
3484
|
+
]
|
|
3485
|
+
};
|
|
3486
|
+
};
|
|
3487
|
+
var removeCaseLinkHandler = async (args) => {
|
|
3488
|
+
const res = await removeCaseLink(
|
|
3489
|
+
args.pathParams.id,
|
|
3490
|
+
args.pathParams.entityType,
|
|
3491
|
+
args.pathParams.entityId
|
|
3492
|
+
);
|
|
3493
|
+
return {
|
|
3494
|
+
content: [
|
|
3495
|
+
{
|
|
3496
|
+
type: "text",
|
|
3497
|
+
text: JSON.stringify(res)
|
|
3498
|
+
}
|
|
3499
|
+
]
|
|
3500
|
+
};
|
|
3501
|
+
};
|
|
3402
3502
|
var createChatAgentHandler = async (args) => {
|
|
3403
3503
|
const res = await createChatAgent(args.bodyParams);
|
|
3404
3504
|
return {
|
|
@@ -6466,6 +6566,69 @@ var GetCaseResponse = zod.object({
|
|
|
6466
6566
|
updated_at: zod.string().datetime({})
|
|
6467
6567
|
})
|
|
6468
6568
|
});
|
|
6569
|
+
var AddCaseLinksParams = zod.object({
|
|
6570
|
+
id: zod.string().min(1)
|
|
6571
|
+
});
|
|
6572
|
+
var addCaseLinksBodyEntitiesMax = 100;
|
|
6573
|
+
var AddCaseLinksBody = zod.object({
|
|
6574
|
+
entities: zod.array(
|
|
6575
|
+
zod.object({
|
|
6576
|
+
entity_type: zod.enum([
|
|
6577
|
+
"artifact",
|
|
6578
|
+
"call",
|
|
6579
|
+
"email",
|
|
6580
|
+
"extract",
|
|
6581
|
+
"worker_run"
|
|
6582
|
+
]),
|
|
6583
|
+
entity_id: zod.string().uuid()
|
|
6584
|
+
})
|
|
6585
|
+
).min(1).max(addCaseLinksBodyEntitiesMax)
|
|
6586
|
+
});
|
|
6587
|
+
var AddCaseLinksResponse = zod.object({
|
|
6588
|
+
links: zod.array(
|
|
6589
|
+
zod.object({
|
|
6590
|
+
case_id: zod.string(),
|
|
6591
|
+
entity_type: zod.enum([
|
|
6592
|
+
"artifact",
|
|
6593
|
+
"call",
|
|
6594
|
+
"email",
|
|
6595
|
+
"extract",
|
|
6596
|
+
"worker_run"
|
|
6597
|
+
]),
|
|
6598
|
+
entity_id: zod.string().uuid(),
|
|
6599
|
+
created_at: zod.string().datetime({})
|
|
6600
|
+
})
|
|
6601
|
+
)
|
|
6602
|
+
});
|
|
6603
|
+
var ListCaseLinksParams = zod.object({
|
|
6604
|
+
id: zod.string().min(1)
|
|
6605
|
+
});
|
|
6606
|
+
var listCaseLinksQueryCountDefault = 50;
|
|
6607
|
+
var listCaseLinksQueryCountMax = 100;
|
|
6608
|
+
var listCaseLinksQueryOffsetDefault = 0;
|
|
6609
|
+
var listCaseLinksQueryOffsetMin = 0;
|
|
6610
|
+
var listCaseLinksQuerySortByDefault = `created_at`;
|
|
6611
|
+
var listCaseLinksQuerySortOrderDefault = `desc`;
|
|
6612
|
+
var ListCaseLinksQueryParams = zod.object({
|
|
6613
|
+
entity_type: zod.enum(["artifact", "call", "email", "extract", "worker_run"]).optional().describe("Filter links by entity type."),
|
|
6614
|
+
count: zod.number().min(1).max(listCaseLinksQueryCountMax).default(listCaseLinksQueryCountDefault),
|
|
6615
|
+
offset: zod.number().min(listCaseLinksQueryOffsetMin).default(listCaseLinksQueryOffsetDefault),
|
|
6616
|
+
sort_by: zod.enum(["created_at"]).default(listCaseLinksQuerySortByDefault),
|
|
6617
|
+
sort_order: zod.enum(["asc", "desc"]).default(listCaseLinksQuerySortOrderDefault)
|
|
6618
|
+
});
|
|
6619
|
+
var ListCaseLinksResponseItem = zod.object({
|
|
6620
|
+
case_id: zod.string(),
|
|
6621
|
+
entity_type: zod.enum(["artifact", "call", "email", "extract", "worker_run"]),
|
|
6622
|
+
entity_id: zod.string().uuid(),
|
|
6623
|
+
created_at: zod.string().datetime({})
|
|
6624
|
+
});
|
|
6625
|
+
var ListCaseLinksResponse = zod.array(ListCaseLinksResponseItem);
|
|
6626
|
+
var RemoveCaseLinkParams = zod.object({
|
|
6627
|
+
id: zod.string().min(1),
|
|
6628
|
+
entityType: zod.enum(["artifact", "call", "email", "extract", "worker_run"]),
|
|
6629
|
+
entityId: zod.string().uuid()
|
|
6630
|
+
});
|
|
6631
|
+
var RemoveCaseLinkResponse = zod.object({});
|
|
6469
6632
|
var CreateChatAgentBody = zod.object({
|
|
6470
6633
|
name: zod.string().min(1),
|
|
6471
6634
|
prompt: zod.string().min(1),
|
|
@@ -6724,6 +6887,7 @@ var GetProfileResponse = zod.object({
|
|
|
6724
6887
|
"webhooks:write",
|
|
6725
6888
|
"api-keys:write",
|
|
6726
6889
|
"teams:write",
|
|
6890
|
+
"cases:write",
|
|
6727
6891
|
"claims:write",
|
|
6728
6892
|
"feedback:write",
|
|
6729
6893
|
"outbound-jobs:write",
|
|
@@ -7876,6 +8040,32 @@ server.tool(
|
|
|
7876
8040
|
},
|
|
7877
8041
|
getCaseHandler
|
|
7878
8042
|
);
|
|
8043
|
+
server.tool(
|
|
8044
|
+
"addCaseLinks",
|
|
8045
|
+
"Add case links",
|
|
8046
|
+
{
|
|
8047
|
+
pathParams: AddCaseLinksParams,
|
|
8048
|
+
bodyParams: AddCaseLinksBody
|
|
8049
|
+
},
|
|
8050
|
+
addCaseLinksHandler
|
|
8051
|
+
);
|
|
8052
|
+
server.tool(
|
|
8053
|
+
"listCaseLinks",
|
|
8054
|
+
"List case links",
|
|
8055
|
+
{
|
|
8056
|
+
pathParams: ListCaseLinksParams,
|
|
8057
|
+
queryParams: ListCaseLinksQueryParams
|
|
8058
|
+
},
|
|
8059
|
+
listCaseLinksHandler
|
|
8060
|
+
);
|
|
8061
|
+
server.tool(
|
|
8062
|
+
"removeCaseLink",
|
|
8063
|
+
"Remove case link",
|
|
8064
|
+
{
|
|
8065
|
+
pathParams: RemoveCaseLinkParams
|
|
8066
|
+
},
|
|
8067
|
+
removeCaseLinkHandler
|
|
8068
|
+
);
|
|
7879
8069
|
server.tool(
|
|
7880
8070
|
"createChatAgent",
|
|
7881
8071
|
"Create chat agent",
|
|
@@ -8191,4 +8381,4 @@ var transport = new StdioServerTransport();
|
|
|
8191
8381
|
server.connect(transport).then(() => {
|
|
8192
8382
|
console.error("MCP server running on stdio");
|
|
8193
8383
|
}).catch(console.error);
|
|
8194
|
-
//# sourceMappingURL=server-
|
|
8384
|
+
//# sourceMappingURL=server-QSOJFMSF.js.map
|