@avallon-labs/mcp 23.19.0 → 23.21.0-staging.596
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
|
@@ -1535,6 +1535,147 @@ var listCases = async (params, options) => {
|
|
|
1535
1535
|
headers: res.headers
|
|
1536
1536
|
};
|
|
1537
1537
|
};
|
|
1538
|
+
var getGetCaseUrl = (id, params) => {
|
|
1539
|
+
const normalizedParams = new URLSearchParams();
|
|
1540
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1541
|
+
if (value !== void 0) {
|
|
1542
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
1543
|
+
for (const [sk, sv] of Object.entries(value)) {
|
|
1544
|
+
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1545
|
+
}
|
|
1546
|
+
} else {
|
|
1547
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1552
|
+
return stringifiedParams.length > 0 ? `/v1/cases/${id}?${stringifiedParams}` : `/v1/cases/${id}`;
|
|
1553
|
+
};
|
|
1554
|
+
var getCase = async (id, params, options) => {
|
|
1555
|
+
const res = await fetch(getGetCaseUrl(id, params), {
|
|
1556
|
+
...options,
|
|
1557
|
+
method: "GET"
|
|
1558
|
+
});
|
|
1559
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1560
|
+
const data = body ? JSON.parse(body) : {};
|
|
1561
|
+
return { data, status: res.status, headers: res.headers };
|
|
1562
|
+
};
|
|
1563
|
+
var getListCaseWorkerRunsUrl = (id, params) => {
|
|
1564
|
+
const normalizedParams = new URLSearchParams();
|
|
1565
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1566
|
+
if (value !== void 0) {
|
|
1567
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
1568
|
+
for (const [sk, sv] of Object.entries(value)) {
|
|
1569
|
+
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1570
|
+
}
|
|
1571
|
+
} else {
|
|
1572
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1577
|
+
return stringifiedParams.length > 0 ? `/v1/cases/${id}/worker-runs?${stringifiedParams}` : `/v1/cases/${id}/worker-runs`;
|
|
1578
|
+
};
|
|
1579
|
+
var listCaseWorkerRuns = async (id, params, options) => {
|
|
1580
|
+
const res = await fetch(getListCaseWorkerRunsUrl(id, params), {
|
|
1581
|
+
...options,
|
|
1582
|
+
method: "GET"
|
|
1583
|
+
});
|
|
1584
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1585
|
+
const data = body ? JSON.parse(body) : {};
|
|
1586
|
+
return {
|
|
1587
|
+
data,
|
|
1588
|
+
status: res.status,
|
|
1589
|
+
headers: res.headers
|
|
1590
|
+
};
|
|
1591
|
+
};
|
|
1592
|
+
var getListCaseExtractsUrl = (id, params) => {
|
|
1593
|
+
const normalizedParams = new URLSearchParams();
|
|
1594
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1595
|
+
if (value !== void 0) {
|
|
1596
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
1597
|
+
for (const [sk, sv] of Object.entries(value)) {
|
|
1598
|
+
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1599
|
+
}
|
|
1600
|
+
} else {
|
|
1601
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
});
|
|
1605
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1606
|
+
return stringifiedParams.length > 0 ? `/v1/cases/${id}/extracts?${stringifiedParams}` : `/v1/cases/${id}/extracts`;
|
|
1607
|
+
};
|
|
1608
|
+
var listCaseExtracts = async (id, params, options) => {
|
|
1609
|
+
const res = await fetch(getListCaseExtractsUrl(id, params), {
|
|
1610
|
+
...options,
|
|
1611
|
+
method: "GET"
|
|
1612
|
+
});
|
|
1613
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1614
|
+
const data = body ? JSON.parse(body) : {};
|
|
1615
|
+
return {
|
|
1616
|
+
data,
|
|
1617
|
+
status: res.status,
|
|
1618
|
+
headers: res.headers
|
|
1619
|
+
};
|
|
1620
|
+
};
|
|
1621
|
+
var getListCaseArtifactsUrl = (id, params) => {
|
|
1622
|
+
const normalizedParams = new URLSearchParams();
|
|
1623
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1624
|
+
if (value !== void 0) {
|
|
1625
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
1626
|
+
for (const [sk, sv] of Object.entries(value)) {
|
|
1627
|
+
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1628
|
+
}
|
|
1629
|
+
} else {
|
|
1630
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
});
|
|
1634
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1635
|
+
return stringifiedParams.length > 0 ? `/v1/cases/${id}/artifacts?${stringifiedParams}` : `/v1/cases/${id}/artifacts`;
|
|
1636
|
+
};
|
|
1637
|
+
var listCaseArtifacts = async (id, params, options) => {
|
|
1638
|
+
const res = await fetch(getListCaseArtifactsUrl(id, params), {
|
|
1639
|
+
...options,
|
|
1640
|
+
method: "GET"
|
|
1641
|
+
});
|
|
1642
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1643
|
+
const data = body ? JSON.parse(body) : {};
|
|
1644
|
+
return {
|
|
1645
|
+
data,
|
|
1646
|
+
status: res.status,
|
|
1647
|
+
headers: res.headers
|
|
1648
|
+
};
|
|
1649
|
+
};
|
|
1650
|
+
var getListCaseCallsUrl = (id, params) => {
|
|
1651
|
+
const normalizedParams = new URLSearchParams();
|
|
1652
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1653
|
+
if (value !== void 0) {
|
|
1654
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
1655
|
+
for (const [sk, sv] of Object.entries(value)) {
|
|
1656
|
+
if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
|
|
1657
|
+
}
|
|
1658
|
+
} else {
|
|
1659
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
});
|
|
1663
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1664
|
+
return stringifiedParams.length > 0 ? `/v1/cases/${id}/calls?${stringifiedParams}` : `/v1/cases/${id}/calls`;
|
|
1665
|
+
};
|
|
1666
|
+
var listCaseCalls = async (id, params, options) => {
|
|
1667
|
+
const res = await fetch(getListCaseCallsUrl(id, params), {
|
|
1668
|
+
...options,
|
|
1669
|
+
method: "GET"
|
|
1670
|
+
});
|
|
1671
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1672
|
+
const data = body ? JSON.parse(body) : {};
|
|
1673
|
+
return {
|
|
1674
|
+
data,
|
|
1675
|
+
status: res.status,
|
|
1676
|
+
headers: res.headers
|
|
1677
|
+
};
|
|
1678
|
+
};
|
|
1538
1679
|
var getCreateChatAgentUrl = () => {
|
|
1539
1680
|
return `/v1/chat-agents`;
|
|
1540
1681
|
};
|
|
@@ -3102,6 +3243,61 @@ var listCasesHandler = async (args) => {
|
|
|
3102
3243
|
]
|
|
3103
3244
|
};
|
|
3104
3245
|
};
|
|
3246
|
+
var getCaseHandler = async (args) => {
|
|
3247
|
+
const res = await getCase(args.pathParams.id, args.queryParams);
|
|
3248
|
+
return {
|
|
3249
|
+
content: [
|
|
3250
|
+
{
|
|
3251
|
+
type: "text",
|
|
3252
|
+
text: JSON.stringify(res)
|
|
3253
|
+
}
|
|
3254
|
+
]
|
|
3255
|
+
};
|
|
3256
|
+
};
|
|
3257
|
+
var listCaseWorkerRunsHandler = async (args) => {
|
|
3258
|
+
const res = await listCaseWorkerRuns(args.pathParams.id, args.queryParams);
|
|
3259
|
+
return {
|
|
3260
|
+
content: [
|
|
3261
|
+
{
|
|
3262
|
+
type: "text",
|
|
3263
|
+
text: JSON.stringify(res)
|
|
3264
|
+
}
|
|
3265
|
+
]
|
|
3266
|
+
};
|
|
3267
|
+
};
|
|
3268
|
+
var listCaseExtractsHandler = async (args) => {
|
|
3269
|
+
const res = await listCaseExtracts(args.pathParams.id, args.queryParams);
|
|
3270
|
+
return {
|
|
3271
|
+
content: [
|
|
3272
|
+
{
|
|
3273
|
+
type: "text",
|
|
3274
|
+
text: JSON.stringify(res)
|
|
3275
|
+
}
|
|
3276
|
+
]
|
|
3277
|
+
};
|
|
3278
|
+
};
|
|
3279
|
+
var listCaseArtifactsHandler = async (args) => {
|
|
3280
|
+
const res = await listCaseArtifacts(args.pathParams.id, args.queryParams);
|
|
3281
|
+
return {
|
|
3282
|
+
content: [
|
|
3283
|
+
{
|
|
3284
|
+
type: "text",
|
|
3285
|
+
text: JSON.stringify(res)
|
|
3286
|
+
}
|
|
3287
|
+
]
|
|
3288
|
+
};
|
|
3289
|
+
};
|
|
3290
|
+
var listCaseCallsHandler = async (args) => {
|
|
3291
|
+
const res = await listCaseCalls(args.pathParams.id, args.queryParams);
|
|
3292
|
+
return {
|
|
3293
|
+
content: [
|
|
3294
|
+
{
|
|
3295
|
+
type: "text",
|
|
3296
|
+
text: JSON.stringify(res)
|
|
3297
|
+
}
|
|
3298
|
+
]
|
|
3299
|
+
};
|
|
3300
|
+
};
|
|
3105
3301
|
var createChatAgentHandler = async (args) => {
|
|
3106
3302
|
const res = await createChatAgent(args.bodyParams);
|
|
3107
3303
|
return {
|
|
@@ -6002,6 +6198,258 @@ var ListCasesResponseItem = zod.object({
|
|
|
6002
6198
|
updated_at: zod.string().datetime({})
|
|
6003
6199
|
});
|
|
6004
6200
|
var ListCasesResponse = zod.array(ListCasesResponseItem);
|
|
6201
|
+
var GetCaseParams = zod.object({
|
|
6202
|
+
id: zod.string().min(1)
|
|
6203
|
+
});
|
|
6204
|
+
var getCaseQuerySortOrderDefault = `desc`;
|
|
6205
|
+
var GetCaseQueryParams = zod.object({
|
|
6206
|
+
sort_order: zod.enum(["asc", "desc"]).default(getCaseQuerySortOrderDefault)
|
|
6207
|
+
});
|
|
6208
|
+
var getCaseResponseWorkerRunsItemsItemWorkerVersionMin = -9007199254740991;
|
|
6209
|
+
var getCaseResponseWorkerRunsItemsItemWorkerVersionMax = 9007199254740991;
|
|
6210
|
+
var getCaseResponseWorkerRunsTotalMin = 0;
|
|
6211
|
+
var getCaseResponseWorkerRunsTotalMax = 9007199254740991;
|
|
6212
|
+
var getCaseResponseExtractsItemsItemResultSizeBytesMin = 0;
|
|
6213
|
+
var getCaseResponseExtractsItemsItemResultSizeBytesMax = 9007199254740991;
|
|
6214
|
+
var getCaseResponseExtractsItemsItemResultKeysMin = 0;
|
|
6215
|
+
var getCaseResponseExtractsItemsItemResultKeysMax = 9007199254740991;
|
|
6216
|
+
var getCaseResponseExtractsTotalMin = 0;
|
|
6217
|
+
var getCaseResponseExtractsTotalMax = 9007199254740991;
|
|
6218
|
+
var getCaseResponseArtifactsTotalMin = 0;
|
|
6219
|
+
var getCaseResponseArtifactsTotalMax = 9007199254740991;
|
|
6220
|
+
var getCaseResponseCallsTotalMin = 0;
|
|
6221
|
+
var getCaseResponseCallsTotalMax = 9007199254740991;
|
|
6222
|
+
var GetCaseResponse = zod.object({
|
|
6223
|
+
case: zod.object({
|
|
6224
|
+
id: zod.string(),
|
|
6225
|
+
subject: zod.union([zod.string(), zod.null()]),
|
|
6226
|
+
reporter: zod.union([zod.string(), zod.null()]),
|
|
6227
|
+
created_by: zod.object({
|
|
6228
|
+
type: zod.literal("worker"),
|
|
6229
|
+
id: zod.string()
|
|
6230
|
+
}),
|
|
6231
|
+
created_at: zod.string().datetime({}),
|
|
6232
|
+
updated_at: zod.string().datetime({})
|
|
6233
|
+
}),
|
|
6234
|
+
worker_runs: zod.object({
|
|
6235
|
+
items: zod.array(
|
|
6236
|
+
zod.object({
|
|
6237
|
+
id: zod.string().describe("Unique run identifier"),
|
|
6238
|
+
worker_id: zod.string().describe("ID of the worker"),
|
|
6239
|
+
worker_version: zod.number().min(getCaseResponseWorkerRunsItemsItemWorkerVersionMin).max(getCaseResponseWorkerRunsItemsItemWorkerVersionMax).describe("Version of the worker at run creation time"),
|
|
6240
|
+
worker_name: zod.string().describe("Name of the worker"),
|
|
6241
|
+
status: zod.string().describe("Current run status"),
|
|
6242
|
+
scope: zod.record(zod.string(), zod.unknown()).describe("Run scope metadata (e.g. claim_id, email_id)"),
|
|
6243
|
+
created_at: zod.string().datetime({}).describe("ISO 8601 timestamp when the run was created"),
|
|
6244
|
+
started_at: zod.union([zod.string().datetime({}), zod.null()]).describe("ISO 8601 timestamp when processing started"),
|
|
6245
|
+
completed_at: zod.union([zod.string().datetime({}), zod.null()]).describe("ISO 8601 timestamp when processing finished"),
|
|
6246
|
+
processing_duration_ms: zod.union([zod.number(), zod.null()]).describe("Processing duration in milliseconds"),
|
|
6247
|
+
extract_id: zod.union([zod.string().uuid(), zod.null()]).describe(
|
|
6248
|
+
"Optional extract ID, set only if the worker run created an extract."
|
|
6249
|
+
),
|
|
6250
|
+
error: zod.union([zod.string(), zod.null()])
|
|
6251
|
+
})
|
|
6252
|
+
),
|
|
6253
|
+
total: zod.number().min(getCaseResponseWorkerRunsTotalMin).max(getCaseResponseWorkerRunsTotalMax)
|
|
6254
|
+
}),
|
|
6255
|
+
extracts: zod.object({
|
|
6256
|
+
items: zod.array(
|
|
6257
|
+
zod.object({
|
|
6258
|
+
id: zod.string(),
|
|
6259
|
+
processor_type: zod.string(),
|
|
6260
|
+
processor_id: zod.string(),
|
|
6261
|
+
processor_name: zod.string(),
|
|
6262
|
+
processor_version: zod.number(),
|
|
6263
|
+
processor_scope: zod.record(zod.string(), zod.unknown()),
|
|
6264
|
+
worker_run_id: zod.union([zod.string(), zod.null()]),
|
|
6265
|
+
extractor_job_id: zod.union([zod.string(), zod.null()]),
|
|
6266
|
+
result_size_bytes: zod.number().min(getCaseResponseExtractsItemsItemResultSizeBytesMin).max(getCaseResponseExtractsItemsItemResultSizeBytesMax).describe("UTF-8 byte length of JSON.stringify(result)."),
|
|
6267
|
+
result_keys: zod.number().min(getCaseResponseExtractsItemsItemResultKeysMin).max(getCaseResponseExtractsItemsItemResultKeysMax).describe("Number of top-level keys on the extract's result object."),
|
|
6268
|
+
has_citations: zod.boolean(),
|
|
6269
|
+
created_at: zod.string().datetime({})
|
|
6270
|
+
})
|
|
6271
|
+
),
|
|
6272
|
+
total: zod.number().min(getCaseResponseExtractsTotalMin).max(getCaseResponseExtractsTotalMax)
|
|
6273
|
+
}),
|
|
6274
|
+
artifacts: zod.object({
|
|
6275
|
+
items: zod.array(
|
|
6276
|
+
zod.object({
|
|
6277
|
+
id: zod.string(),
|
|
6278
|
+
document_name: zod.string(),
|
|
6279
|
+
metadata: zod.record(zod.string(), zod.unknown()),
|
|
6280
|
+
created_at: zod.string().datetime({}),
|
|
6281
|
+
created_at_document: zod.union([zod.string(), zod.null()]),
|
|
6282
|
+
updated_at: zod.string().datetime({}),
|
|
6283
|
+
has_content: zod.boolean()
|
|
6284
|
+
})
|
|
6285
|
+
),
|
|
6286
|
+
total: zod.number().min(getCaseResponseArtifactsTotalMin).max(getCaseResponseArtifactsTotalMax)
|
|
6287
|
+
}),
|
|
6288
|
+
calls: zod.object({
|
|
6289
|
+
items: zod.array(
|
|
6290
|
+
zod.object({
|
|
6291
|
+
id: zod.string(),
|
|
6292
|
+
external_call_id: zod.union([zod.string(), zod.null()]),
|
|
6293
|
+
direction: zod.enum(["INBOUND", "OUTBOUND"]),
|
|
6294
|
+
agent_id: zod.string(),
|
|
6295
|
+
job_id: zod.union([zod.string(), zod.null()]),
|
|
6296
|
+
from_phone_number: zod.union([zod.string(), zod.null()]),
|
|
6297
|
+
to_phone_number: zod.union([zod.string(), zod.null()]),
|
|
6298
|
+
started_at: zod.string().datetime({}),
|
|
6299
|
+
ended_at: zod.string().datetime({}),
|
|
6300
|
+
duration_seconds: zod.union([zod.number(), zod.null()]),
|
|
6301
|
+
completion_status: zod.union([zod.string(), zod.null()]),
|
|
6302
|
+
ended_reason: zod.string(),
|
|
6303
|
+
evaluation: zod.union([
|
|
6304
|
+
zod.object({
|
|
6305
|
+
status: zod.string(),
|
|
6306
|
+
score: zod.union([zod.number(), zod.null()]),
|
|
6307
|
+
passed: zod.union([zod.boolean(), zod.null()])
|
|
6308
|
+
}),
|
|
6309
|
+
zod.null()
|
|
6310
|
+
]),
|
|
6311
|
+
created_at: zod.string().datetime({})
|
|
6312
|
+
})
|
|
6313
|
+
),
|
|
6314
|
+
total: zod.number().min(getCaseResponseCallsTotalMin).max(getCaseResponseCallsTotalMax)
|
|
6315
|
+
})
|
|
6316
|
+
});
|
|
6317
|
+
var ListCaseWorkerRunsParams = zod.object({
|
|
6318
|
+
id: zod.string().min(1)
|
|
6319
|
+
});
|
|
6320
|
+
var listCaseWorkerRunsQueryCountDefault = 50;
|
|
6321
|
+
var listCaseWorkerRunsQueryCountMax = 100;
|
|
6322
|
+
var listCaseWorkerRunsQueryOffsetDefault = 0;
|
|
6323
|
+
var listCaseWorkerRunsQueryOffsetMin = 0;
|
|
6324
|
+
var listCaseWorkerRunsQuerySortByDefault = `created_at`;
|
|
6325
|
+
var listCaseWorkerRunsQuerySortOrderDefault = `desc`;
|
|
6326
|
+
var ListCaseWorkerRunsQueryParams = zod.object({
|
|
6327
|
+
count: zod.number().min(1).max(listCaseWorkerRunsQueryCountMax).default(listCaseWorkerRunsQueryCountDefault),
|
|
6328
|
+
offset: zod.number().min(listCaseWorkerRunsQueryOffsetMin).default(listCaseWorkerRunsQueryOffsetDefault),
|
|
6329
|
+
sort_by: zod.enum(["created_at", "started_at", "completed_at"]).default(listCaseWorkerRunsQuerySortByDefault),
|
|
6330
|
+
sort_order: zod.enum(["asc", "desc"]).default(listCaseWorkerRunsQuerySortOrderDefault)
|
|
6331
|
+
});
|
|
6332
|
+
var listCaseWorkerRunsResponseWorkerVersionMin = -9007199254740991;
|
|
6333
|
+
var listCaseWorkerRunsResponseWorkerVersionMax = 9007199254740991;
|
|
6334
|
+
var ListCaseWorkerRunsResponseItem = zod.object({
|
|
6335
|
+
id: zod.string().describe("Unique run identifier"),
|
|
6336
|
+
worker_id: zod.string().describe("ID of the worker"),
|
|
6337
|
+
worker_version: zod.number().min(listCaseWorkerRunsResponseWorkerVersionMin).max(listCaseWorkerRunsResponseWorkerVersionMax).describe("Version of the worker at run creation time"),
|
|
6338
|
+
worker_name: zod.string().describe("Name of the worker"),
|
|
6339
|
+
status: zod.string().describe("Current run status"),
|
|
6340
|
+
scope: zod.record(zod.string(), zod.unknown()).describe("Run scope metadata (e.g. claim_id, email_id)"),
|
|
6341
|
+
created_at: zod.string().datetime({}).describe("ISO 8601 timestamp when the run was created"),
|
|
6342
|
+
started_at: zod.union([zod.string().datetime({}), zod.null()]).describe("ISO 8601 timestamp when processing started"),
|
|
6343
|
+
completed_at: zod.union([zod.string().datetime({}), zod.null()]).describe("ISO 8601 timestamp when processing finished"),
|
|
6344
|
+
processing_duration_ms: zod.union([zod.number(), zod.null()]).describe("Processing duration in milliseconds"),
|
|
6345
|
+
extract_id: zod.union([zod.string().uuid(), zod.null()]).describe(
|
|
6346
|
+
"Optional extract ID, set only if the worker run created an extract."
|
|
6347
|
+
),
|
|
6348
|
+
error: zod.union([zod.string(), zod.null()])
|
|
6349
|
+
});
|
|
6350
|
+
var ListCaseWorkerRunsResponse = zod.array(
|
|
6351
|
+
ListCaseWorkerRunsResponseItem
|
|
6352
|
+
);
|
|
6353
|
+
var ListCaseExtractsParams = zod.object({
|
|
6354
|
+
id: zod.string().min(1)
|
|
6355
|
+
});
|
|
6356
|
+
var listCaseExtractsQueryCountDefault = 50;
|
|
6357
|
+
var listCaseExtractsQueryCountMax = 100;
|
|
6358
|
+
var listCaseExtractsQueryOffsetDefault = 0;
|
|
6359
|
+
var listCaseExtractsQueryOffsetMin = 0;
|
|
6360
|
+
var listCaseExtractsQuerySortByDefault = `created_at`;
|
|
6361
|
+
var listCaseExtractsQuerySortOrderDefault = `desc`;
|
|
6362
|
+
var ListCaseExtractsQueryParams = zod.object({
|
|
6363
|
+
count: zod.number().min(1).max(listCaseExtractsQueryCountMax).default(listCaseExtractsQueryCountDefault),
|
|
6364
|
+
offset: zod.number().min(listCaseExtractsQueryOffsetMin).default(listCaseExtractsQueryOffsetDefault),
|
|
6365
|
+
sort_by: zod.enum(["created_at"]).default(listCaseExtractsQuerySortByDefault),
|
|
6366
|
+
sort_order: zod.enum(["asc", "desc"]).default(listCaseExtractsQuerySortOrderDefault)
|
|
6367
|
+
});
|
|
6368
|
+
var listCaseExtractsResponseResultSizeBytesMin = 0;
|
|
6369
|
+
var listCaseExtractsResponseResultSizeBytesMax = 9007199254740991;
|
|
6370
|
+
var listCaseExtractsResponseResultKeysMin = 0;
|
|
6371
|
+
var listCaseExtractsResponseResultKeysMax = 9007199254740991;
|
|
6372
|
+
var ListCaseExtractsResponseItem = zod.object({
|
|
6373
|
+
id: zod.string(),
|
|
6374
|
+
processor_type: zod.string(),
|
|
6375
|
+
processor_id: zod.string(),
|
|
6376
|
+
processor_name: zod.string(),
|
|
6377
|
+
processor_version: zod.number(),
|
|
6378
|
+
processor_scope: zod.record(zod.string(), zod.unknown()),
|
|
6379
|
+
worker_run_id: zod.union([zod.string(), zod.null()]),
|
|
6380
|
+
extractor_job_id: zod.union([zod.string(), zod.null()]),
|
|
6381
|
+
result_size_bytes: zod.number().min(listCaseExtractsResponseResultSizeBytesMin).max(listCaseExtractsResponseResultSizeBytesMax).describe("UTF-8 byte length of JSON.stringify(result)."),
|
|
6382
|
+
result_keys: zod.number().min(listCaseExtractsResponseResultKeysMin).max(listCaseExtractsResponseResultKeysMax).describe("Number of top-level keys on the extract's result object."),
|
|
6383
|
+
has_citations: zod.boolean(),
|
|
6384
|
+
created_at: zod.string().datetime({})
|
|
6385
|
+
});
|
|
6386
|
+
var ListCaseExtractsResponse = zod.array(ListCaseExtractsResponseItem);
|
|
6387
|
+
var ListCaseArtifactsParams = zod.object({
|
|
6388
|
+
id: zod.string().min(1)
|
|
6389
|
+
});
|
|
6390
|
+
var listCaseArtifactsQueryCountDefault = 50;
|
|
6391
|
+
var listCaseArtifactsQueryCountMax = 100;
|
|
6392
|
+
var listCaseArtifactsQueryOffsetDefault = 0;
|
|
6393
|
+
var listCaseArtifactsQueryOffsetMin = 0;
|
|
6394
|
+
var listCaseArtifactsQuerySortByDefault = `created_at`;
|
|
6395
|
+
var listCaseArtifactsQuerySortOrderDefault = `desc`;
|
|
6396
|
+
var ListCaseArtifactsQueryParams = zod.object({
|
|
6397
|
+
count: zod.number().min(1).max(listCaseArtifactsQueryCountMax).default(listCaseArtifactsQueryCountDefault),
|
|
6398
|
+
offset: zod.number().min(listCaseArtifactsQueryOffsetMin).default(listCaseArtifactsQueryOffsetDefault),
|
|
6399
|
+
sort_by: zod.enum(["created_at", "updated_at", "document_name"]).default(listCaseArtifactsQuerySortByDefault),
|
|
6400
|
+
sort_order: zod.enum(["asc", "desc"]).default(listCaseArtifactsQuerySortOrderDefault)
|
|
6401
|
+
});
|
|
6402
|
+
var ListCaseArtifactsResponseItem = zod.object({
|
|
6403
|
+
id: zod.string(),
|
|
6404
|
+
document_name: zod.string(),
|
|
6405
|
+
metadata: zod.record(zod.string(), zod.unknown()),
|
|
6406
|
+
created_at: zod.string().datetime({}),
|
|
6407
|
+
created_at_document: zod.union([zod.string(), zod.null()]),
|
|
6408
|
+
updated_at: zod.string().datetime({}),
|
|
6409
|
+
has_content: zod.boolean()
|
|
6410
|
+
});
|
|
6411
|
+
var ListCaseArtifactsResponse = zod.array(
|
|
6412
|
+
ListCaseArtifactsResponseItem
|
|
6413
|
+
);
|
|
6414
|
+
var ListCaseCallsParams = zod.object({
|
|
6415
|
+
id: zod.string().min(1)
|
|
6416
|
+
});
|
|
6417
|
+
var listCaseCallsQueryCountDefault = 50;
|
|
6418
|
+
var listCaseCallsQueryCountMax = 100;
|
|
6419
|
+
var listCaseCallsQueryOffsetDefault = 0;
|
|
6420
|
+
var listCaseCallsQueryOffsetMin = 0;
|
|
6421
|
+
var listCaseCallsQuerySortByDefault = `created_at`;
|
|
6422
|
+
var listCaseCallsQuerySortOrderDefault = `desc`;
|
|
6423
|
+
var ListCaseCallsQueryParams = zod.object({
|
|
6424
|
+
count: zod.number().min(1).max(listCaseCallsQueryCountMax).default(listCaseCallsQueryCountDefault),
|
|
6425
|
+
offset: zod.number().min(listCaseCallsQueryOffsetMin).default(listCaseCallsQueryOffsetDefault),
|
|
6426
|
+
sort_by: zod.enum(["created_at", "started_at", "ended_at"]).default(listCaseCallsQuerySortByDefault),
|
|
6427
|
+
sort_order: zod.enum(["asc", "desc"]).default(listCaseCallsQuerySortOrderDefault)
|
|
6428
|
+
});
|
|
6429
|
+
var ListCaseCallsResponseItem = zod.object({
|
|
6430
|
+
id: zod.string(),
|
|
6431
|
+
external_call_id: zod.union([zod.string(), zod.null()]),
|
|
6432
|
+
direction: zod.enum(["INBOUND", "OUTBOUND"]),
|
|
6433
|
+
agent_id: zod.string(),
|
|
6434
|
+
job_id: zod.union([zod.string(), zod.null()]),
|
|
6435
|
+
from_phone_number: zod.union([zod.string(), zod.null()]),
|
|
6436
|
+
to_phone_number: zod.union([zod.string(), zod.null()]),
|
|
6437
|
+
started_at: zod.string().datetime({}),
|
|
6438
|
+
ended_at: zod.string().datetime({}),
|
|
6439
|
+
duration_seconds: zod.union([zod.number(), zod.null()]),
|
|
6440
|
+
completion_status: zod.union([zod.string(), zod.null()]),
|
|
6441
|
+
ended_reason: zod.string(),
|
|
6442
|
+
evaluation: zod.union([
|
|
6443
|
+
zod.object({
|
|
6444
|
+
status: zod.string(),
|
|
6445
|
+
score: zod.union([zod.number(), zod.null()]),
|
|
6446
|
+
passed: zod.union([zod.boolean(), zod.null()])
|
|
6447
|
+
}),
|
|
6448
|
+
zod.null()
|
|
6449
|
+
]),
|
|
6450
|
+
created_at: zod.string().datetime({})
|
|
6451
|
+
});
|
|
6452
|
+
var ListCaseCallsResponse = zod.array(ListCaseCallsResponseItem);
|
|
6005
6453
|
var CreateChatAgentBody = zod.object({
|
|
6006
6454
|
name: zod.string().min(1),
|
|
6007
6455
|
prompt: zod.string().min(1),
|
|
@@ -7329,6 +7777,51 @@ server.tool(
|
|
|
7329
7777
|
},
|
|
7330
7778
|
listCasesHandler
|
|
7331
7779
|
);
|
|
7780
|
+
server.tool(
|
|
7781
|
+
"getCase",
|
|
7782
|
+
"Get case",
|
|
7783
|
+
{
|
|
7784
|
+
pathParams: GetCaseParams,
|
|
7785
|
+
queryParams: GetCaseQueryParams
|
|
7786
|
+
},
|
|
7787
|
+
getCaseHandler
|
|
7788
|
+
);
|
|
7789
|
+
server.tool(
|
|
7790
|
+
"listCaseWorkerRuns",
|
|
7791
|
+
"List worker runs for a case",
|
|
7792
|
+
{
|
|
7793
|
+
pathParams: ListCaseWorkerRunsParams,
|
|
7794
|
+
queryParams: ListCaseWorkerRunsQueryParams
|
|
7795
|
+
},
|
|
7796
|
+
listCaseWorkerRunsHandler
|
|
7797
|
+
);
|
|
7798
|
+
server.tool(
|
|
7799
|
+
"listCaseExtracts",
|
|
7800
|
+
"List extracts for a case",
|
|
7801
|
+
{
|
|
7802
|
+
pathParams: ListCaseExtractsParams,
|
|
7803
|
+
queryParams: ListCaseExtractsQueryParams
|
|
7804
|
+
},
|
|
7805
|
+
listCaseExtractsHandler
|
|
7806
|
+
);
|
|
7807
|
+
server.tool(
|
|
7808
|
+
"listCaseArtifacts",
|
|
7809
|
+
"List artifacts for a case",
|
|
7810
|
+
{
|
|
7811
|
+
pathParams: ListCaseArtifactsParams,
|
|
7812
|
+
queryParams: ListCaseArtifactsQueryParams
|
|
7813
|
+
},
|
|
7814
|
+
listCaseArtifactsHandler
|
|
7815
|
+
);
|
|
7816
|
+
server.tool(
|
|
7817
|
+
"listCaseCalls",
|
|
7818
|
+
"List calls for a case",
|
|
7819
|
+
{
|
|
7820
|
+
pathParams: ListCaseCallsParams,
|
|
7821
|
+
queryParams: ListCaseCallsQueryParams
|
|
7822
|
+
},
|
|
7823
|
+
listCaseCallsHandler
|
|
7824
|
+
);
|
|
7332
7825
|
server.tool(
|
|
7333
7826
|
"createChatAgent",
|
|
7334
7827
|
"Create chat agent",
|
|
@@ -7628,4 +8121,4 @@ var transport = new StdioServerTransport();
|
|
|
7628
8121
|
server.connect(transport).then(() => {
|
|
7629
8122
|
console.error("MCP server running on stdio");
|
|
7630
8123
|
}).catch(console.error);
|
|
7631
|
-
//# sourceMappingURL=server-
|
|
8124
|
+
//# sourceMappingURL=server-SAOL5Q25.js.map
|