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