@avallon-labs/mcp 69.1.0-staging.1475 → 69.2.0-staging.1477
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
|
@@ -2985,6 +2985,29 @@ var getFormSubmission = async (id, options) => {
|
|
|
2985
2985
|
const data = body ? JSON.parse(body) : {};
|
|
2986
2986
|
return { data, status: res.status, headers: res.headers };
|
|
2987
2987
|
};
|
|
2988
|
+
var getCreateIntakeUrl = () => {
|
|
2989
|
+
return `/v1/intakes`;
|
|
2990
|
+
};
|
|
2991
|
+
var createIntake = async (createIntakeBody, options) => {
|
|
2992
|
+
const getHeaders = (h) => {
|
|
2993
|
+
if (!h) return {};
|
|
2994
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2995
|
+
if (Array.isArray(h)) return Object.fromEntries(h);
|
|
2996
|
+
return h;
|
|
2997
|
+
};
|
|
2998
|
+
const res = await fetch(
|
|
2999
|
+
getCreateIntakeUrl(),
|
|
3000
|
+
{
|
|
3001
|
+
...options,
|
|
3002
|
+
method: "POST",
|
|
3003
|
+
headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
|
|
3004
|
+
body: JSON.stringify(createIntakeBody)
|
|
3005
|
+
}
|
|
3006
|
+
);
|
|
3007
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
3008
|
+
const data = body ? JSON.parse(body) : {};
|
|
3009
|
+
return { data, status: res.status, headers: res.headers };
|
|
3010
|
+
};
|
|
2988
3011
|
var getGetExtractUrl = (id) => {
|
|
2989
3012
|
return `/v1/extracts/${id}`;
|
|
2990
3013
|
};
|
|
@@ -7762,6 +7785,29 @@ var getFormSubmissionHandler = async (args, options) => {
|
|
|
7762
7785
|
structuredContent: res.data
|
|
7763
7786
|
};
|
|
7764
7787
|
};
|
|
7788
|
+
var createIntakeHandler = async (args, options) => {
|
|
7789
|
+
const res = await createIntake(args.bodyParams, options);
|
|
7790
|
+
if (res.status >= 400) {
|
|
7791
|
+
return {
|
|
7792
|
+
content: [
|
|
7793
|
+
{
|
|
7794
|
+
type: "text",
|
|
7795
|
+
text: JSON.stringify(res.data ?? null)
|
|
7796
|
+
}
|
|
7797
|
+
],
|
|
7798
|
+
isError: true
|
|
7799
|
+
};
|
|
7800
|
+
}
|
|
7801
|
+
return {
|
|
7802
|
+
content: [
|
|
7803
|
+
{
|
|
7804
|
+
type: "text",
|
|
7805
|
+
text: JSON.stringify(res.data ?? null)
|
|
7806
|
+
}
|
|
7807
|
+
],
|
|
7808
|
+
structuredContent: res.data
|
|
7809
|
+
};
|
|
7810
|
+
};
|
|
7765
7811
|
var getExtractHandler = async (args, options) => {
|
|
7766
7812
|
const res = await getExtract(args.pathParams.id, options);
|
|
7767
7813
|
if (res.status >= 400) {
|
|
@@ -12461,6 +12507,7 @@ var CreateWorkerResponse = zod.object({
|
|
|
12461
12507
|
"live": zod.number().int().min(createWorkerResponseDataVersionsLiveMin).max(createWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12462
12508
|
"test": zod.number().int().min(createWorkerResponseDataVersionsTestMin).max(createWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12463
12509
|
}),
|
|
12510
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12464
12511
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12465
12512
|
"updated_at": zod.string().datetime({ "offset": true }),
|
|
12466
12513
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
@@ -12507,6 +12554,7 @@ var ListWorkersResponse = zod.object({
|
|
|
12507
12554
|
"live": zod.number().int().min(listWorkersResponseDataItemVersionsLiveMin).max(listWorkersResponseDataItemVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12508
12555
|
"test": zod.number().int().min(listWorkersResponseDataItemVersionsTestMin).max(listWorkersResponseDataItemVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12509
12556
|
}),
|
|
12557
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12510
12558
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12511
12559
|
"updated_at": zod.string().datetime({ "offset": true })
|
|
12512
12560
|
})),
|
|
@@ -12541,6 +12589,7 @@ var GetWorkerResponse = zod.object({
|
|
|
12541
12589
|
"live": zod.number().int().min(getWorkerResponseDataVersionsLiveMin).max(getWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12542
12590
|
"test": zod.number().int().min(getWorkerResponseDataVersionsTestMin).max(getWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12543
12591
|
}),
|
|
12592
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12544
12593
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12545
12594
|
"updated_at": zod.string().datetime({ "offset": true }),
|
|
12546
12595
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
@@ -12575,7 +12624,8 @@ var UpdateWorkerBody = zod.object({
|
|
|
12575
12624
|
"schema": zod.record(zod.string(), zod.unknown()).optional(),
|
|
12576
12625
|
"tools": zod.array(zod.string().uuid()).optional().describe("Replace the worker's attached tool set. Omit to leave unchanged; pass [] to clear."),
|
|
12577
12626
|
"secrets": zod.array(zod.string().uuid()).optional().describe("Replace the worker's attached secret set. Omit to leave unchanged; pass [] to detach all."),
|
|
12578
|
-
"permissions": zod.array(zod.enum(["inboxes:send", "artifacts:write", "outbound-jobs:schedule", "cases:write", "schedules:write", "information-requests:write", "forms:request"])).optional().describe("Permissions granted to the worker on each run")
|
|
12627
|
+
"permissions": zod.array(zod.enum(["inboxes:send", "artifacts:write", "outbound-jobs:schedule", "cases:write", "schedules:write", "information-requests:write", "forms:request"])).optional().describe("Permissions granted to the worker on each run"),
|
|
12628
|
+
"intake_id": zod.union([zod.string().uuid(), zod.null()]).optional().describe("Intake whose items the worker routes. Omit to leave unchanged; pass null to clear. Saved as a new config version.")
|
|
12579
12629
|
});
|
|
12580
12630
|
var updateWorkerResponseDataVersionMin = 0;
|
|
12581
12631
|
var updateWorkerResponseDataVersionsLatestMin = -9007199254740991;
|
|
@@ -12600,6 +12650,7 @@ var UpdateWorkerResponse = zod.object({
|
|
|
12600
12650
|
"live": zod.number().int().min(updateWorkerResponseDataVersionsLiveMin).max(updateWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12601
12651
|
"test": zod.number().int().min(updateWorkerResponseDataVersionsTestMin).max(updateWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12602
12652
|
}),
|
|
12653
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12603
12654
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12604
12655
|
"updated_at": zod.string().datetime({ "offset": true }),
|
|
12605
12656
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
@@ -12676,6 +12727,7 @@ var UpdateWorkerMcpsResponse = zod.object({
|
|
|
12676
12727
|
"live": zod.number().int().min(updateWorkerMcpsResponseDataVersionsLiveMin).max(updateWorkerMcpsResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12677
12728
|
"test": zod.number().int().min(updateWorkerMcpsResponseDataVersionsTestMin).max(updateWorkerMcpsResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12678
12729
|
}),
|
|
12730
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12679
12731
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12680
12732
|
"updated_at": zod.string().datetime({ "offset": true }),
|
|
12681
12733
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
@@ -12800,6 +12852,7 @@ var GetWorkerVersionResponse = zod.object({
|
|
|
12800
12852
|
"max_concurrent_runs": zod.union([zod.number().int().min(getWorkerVersionResponseDataMaxConcurrentRunsOneMin).max(getWorkerVersionResponseDataMaxConcurrentRunsOneMax), zod.null()]),
|
|
12801
12853
|
"tool_ids": zod.array(zod.string()),
|
|
12802
12854
|
"secret_ids": zod.array(zod.string()),
|
|
12855
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12803
12856
|
"version": zod.number().int().min(getWorkerVersionResponseDataVersionMin).max(getWorkerVersionResponseDataVersionMax),
|
|
12804
12857
|
"version_created_at": zod.string().datetime({ "offset": true }),
|
|
12805
12858
|
"actor": zod.string(),
|
|
@@ -13737,6 +13790,37 @@ var GetFormSubmissionResponse = zod.object({
|
|
|
13737
13790
|
}),
|
|
13738
13791
|
"message": zod.string()
|
|
13739
13792
|
});
|
|
13793
|
+
var CreateIntakeBody = zod.object({
|
|
13794
|
+
"name": zod.string().min(1),
|
|
13795
|
+
"routes": zod.array(zod.object({
|
|
13796
|
+
"name": zod.string().min(1),
|
|
13797
|
+
"description": zod.string().min(1).describe("What the routing worker reads to pick this route."),
|
|
13798
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
13799
|
+
"processor_id": zod.string().uuid()
|
|
13800
|
+
})).min(1)
|
|
13801
|
+
});
|
|
13802
|
+
var CreateIntakeResponse = zod.object({
|
|
13803
|
+
"data": zod.object({
|
|
13804
|
+
"id": zod.string(),
|
|
13805
|
+
"name": zod.string(),
|
|
13806
|
+
"version": zod.number().describe("Version the routes below belong to."),
|
|
13807
|
+
"versions": zod.object({
|
|
13808
|
+
"latest": zod.number(),
|
|
13809
|
+
"live": zod.number(),
|
|
13810
|
+
"test": zod.number()
|
|
13811
|
+
}),
|
|
13812
|
+
"routes": zod.array(zod.object({
|
|
13813
|
+
"id": zod.string(),
|
|
13814
|
+
"name": zod.string(),
|
|
13815
|
+
"description": zod.string(),
|
|
13816
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
13817
|
+
"processor_id": zod.string()
|
|
13818
|
+
})),
|
|
13819
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
13820
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
13821
|
+
}),
|
|
13822
|
+
"message": zod.string()
|
|
13823
|
+
});
|
|
13740
13824
|
var GetExtractParams = zod.object({
|
|
13741
13825
|
"id": zod.string().uuid()
|
|
13742
13826
|
});
|
|
@@ -13824,7 +13908,7 @@ var GetProfileResponse = zod.object({
|
|
|
13824
13908
|
"last_name": zod.union([zod.string(), zod.null()]),
|
|
13825
13909
|
"email": zod.string(),
|
|
13826
13910
|
"role": zod.enum(["admin", "avallon_admin", "member"]),
|
|
13827
|
-
"permissions": zod.array(zod.enum(["voice-agents:read", "voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "tool-calls:read", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "case-types:read", "case-types:create", "case-types:write", "forms:read", "forms:create", "forms:write", "forms:request", "forms:promote", "information-requests:write", "information-requests:resolve", "information-requests:delete", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "calls:monitor", "workers:read", "workers:create", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "evaluators:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write", "tenants:write", "analytics:view-cost"])),
|
|
13911
|
+
"permissions": zod.array(zod.enum(["voice-agents:read", "voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "tool-calls:read", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "case-types:read", "case-types:create", "case-types:write", "forms:read", "forms:create", "forms:write", "forms:request", "forms:promote", "information-requests:write", "information-requests:resolve", "information-requests:delete", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "calls:monitor", "workers:read", "workers:create", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "evaluators:write", "intakes:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write", "tenants:write", "analytics:view-cost"])),
|
|
13828
13912
|
"tenants": zod.object({
|
|
13829
13913
|
"active": zod.object({
|
|
13830
13914
|
"id": zod.string(),
|
|
@@ -18032,6 +18116,22 @@ var createMcpServer = (options) => {
|
|
|
18032
18116
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
18033
18117
|
})
|
|
18034
18118
|
);
|
|
18119
|
+
tools.createIntake = server2.registerTool(
|
|
18120
|
+
"createIntake",
|
|
18121
|
+
{
|
|
18122
|
+
title: "Create intake",
|
|
18123
|
+
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.",
|
|
18124
|
+
inputSchema: {
|
|
18125
|
+
bodyParams: CreateIntakeBody.optional()
|
|
18126
|
+
},
|
|
18127
|
+
outputSchema: CreateIntakeResponse,
|
|
18128
|
+
annotations: { destructiveHint: true }
|
|
18129
|
+
},
|
|
18130
|
+
(args, ctx) => createIntakeHandler(args, {
|
|
18131
|
+
...options,
|
|
18132
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
18133
|
+
})
|
|
18134
|
+
);
|
|
18035
18135
|
tools.getExtract = server2.registerTool(
|
|
18036
18136
|
"getExtract",
|
|
18037
18137
|
{
|
|
@@ -19231,4 +19331,4 @@ var transport = new StdioServerTransport();
|
|
|
19231
19331
|
server.connect(transport).then(() => {
|
|
19232
19332
|
console.error("MCP server running on stdio");
|
|
19233
19333
|
}).catch(console.error);
|
|
19234
|
-
//# sourceMappingURL=server-
|
|
19334
|
+
//# sourceMappingURL=server-5FUXL5PM.js.map
|