@avallon-labs/mcp 69.1.0-staging.1475 → 69.3.0-staging.1479
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,44 @@ 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
|
+
};
|
|
3011
|
+
var getGetIntakeUrl = (intakeId) => {
|
|
3012
|
+
return `/v1/intakes/${intakeId}`;
|
|
3013
|
+
};
|
|
3014
|
+
var getIntake = async (intakeId, options) => {
|
|
3015
|
+
const res = await fetch(
|
|
3016
|
+
getGetIntakeUrl(intakeId),
|
|
3017
|
+
{
|
|
3018
|
+
...options,
|
|
3019
|
+
method: "GET"
|
|
3020
|
+
}
|
|
3021
|
+
);
|
|
3022
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
3023
|
+
const data = body ? JSON.parse(body) : {};
|
|
3024
|
+
return { data, status: res.status, headers: res.headers };
|
|
3025
|
+
};
|
|
2988
3026
|
var getGetExtractUrl = (id) => {
|
|
2989
3027
|
return `/v1/extracts/${id}`;
|
|
2990
3028
|
};
|
|
@@ -7762,6 +7800,52 @@ var getFormSubmissionHandler = async (args, options) => {
|
|
|
7762
7800
|
structuredContent: res.data
|
|
7763
7801
|
};
|
|
7764
7802
|
};
|
|
7803
|
+
var createIntakeHandler = async (args, options) => {
|
|
7804
|
+
const res = await createIntake(args.bodyParams, options);
|
|
7805
|
+
if (res.status >= 400) {
|
|
7806
|
+
return {
|
|
7807
|
+
content: [
|
|
7808
|
+
{
|
|
7809
|
+
type: "text",
|
|
7810
|
+
text: JSON.stringify(res.data ?? null)
|
|
7811
|
+
}
|
|
7812
|
+
],
|
|
7813
|
+
isError: true
|
|
7814
|
+
};
|
|
7815
|
+
}
|
|
7816
|
+
return {
|
|
7817
|
+
content: [
|
|
7818
|
+
{
|
|
7819
|
+
type: "text",
|
|
7820
|
+
text: JSON.stringify(res.data ?? null)
|
|
7821
|
+
}
|
|
7822
|
+
],
|
|
7823
|
+
structuredContent: res.data
|
|
7824
|
+
};
|
|
7825
|
+
};
|
|
7826
|
+
var getIntakeHandler = async (args, options) => {
|
|
7827
|
+
const res = await getIntake(args.pathParams.intakeId, options);
|
|
7828
|
+
if (res.status >= 400) {
|
|
7829
|
+
return {
|
|
7830
|
+
content: [
|
|
7831
|
+
{
|
|
7832
|
+
type: "text",
|
|
7833
|
+
text: JSON.stringify(res.data ?? null)
|
|
7834
|
+
}
|
|
7835
|
+
],
|
|
7836
|
+
isError: true
|
|
7837
|
+
};
|
|
7838
|
+
}
|
|
7839
|
+
return {
|
|
7840
|
+
content: [
|
|
7841
|
+
{
|
|
7842
|
+
type: "text",
|
|
7843
|
+
text: JSON.stringify(res.data ?? null)
|
|
7844
|
+
}
|
|
7845
|
+
],
|
|
7846
|
+
structuredContent: res.data
|
|
7847
|
+
};
|
|
7848
|
+
};
|
|
7765
7849
|
var getExtractHandler = async (args, options) => {
|
|
7766
7850
|
const res = await getExtract(args.pathParams.id, options);
|
|
7767
7851
|
if (res.status >= 400) {
|
|
@@ -12461,6 +12545,7 @@ var CreateWorkerResponse = zod.object({
|
|
|
12461
12545
|
"live": zod.number().int().min(createWorkerResponseDataVersionsLiveMin).max(createWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12462
12546
|
"test": zod.number().int().min(createWorkerResponseDataVersionsTestMin).max(createWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12463
12547
|
}),
|
|
12548
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12464
12549
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12465
12550
|
"updated_at": zod.string().datetime({ "offset": true }),
|
|
12466
12551
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
@@ -12507,6 +12592,7 @@ var ListWorkersResponse = zod.object({
|
|
|
12507
12592
|
"live": zod.number().int().min(listWorkersResponseDataItemVersionsLiveMin).max(listWorkersResponseDataItemVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12508
12593
|
"test": zod.number().int().min(listWorkersResponseDataItemVersionsTestMin).max(listWorkersResponseDataItemVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12509
12594
|
}),
|
|
12595
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12510
12596
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12511
12597
|
"updated_at": zod.string().datetime({ "offset": true })
|
|
12512
12598
|
})),
|
|
@@ -12541,6 +12627,7 @@ var GetWorkerResponse = zod.object({
|
|
|
12541
12627
|
"live": zod.number().int().min(getWorkerResponseDataVersionsLiveMin).max(getWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12542
12628
|
"test": zod.number().int().min(getWorkerResponseDataVersionsTestMin).max(getWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12543
12629
|
}),
|
|
12630
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12544
12631
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12545
12632
|
"updated_at": zod.string().datetime({ "offset": true }),
|
|
12546
12633
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
@@ -12575,7 +12662,8 @@ var UpdateWorkerBody = zod.object({
|
|
|
12575
12662
|
"schema": zod.record(zod.string(), zod.unknown()).optional(),
|
|
12576
12663
|
"tools": zod.array(zod.string().uuid()).optional().describe("Replace the worker's attached tool set. Omit to leave unchanged; pass [] to clear."),
|
|
12577
12664
|
"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")
|
|
12665
|
+
"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"),
|
|
12666
|
+
"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
12667
|
});
|
|
12580
12668
|
var updateWorkerResponseDataVersionMin = 0;
|
|
12581
12669
|
var updateWorkerResponseDataVersionsLatestMin = -9007199254740991;
|
|
@@ -12600,6 +12688,7 @@ var UpdateWorkerResponse = zod.object({
|
|
|
12600
12688
|
"live": zod.number().int().min(updateWorkerResponseDataVersionsLiveMin).max(updateWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12601
12689
|
"test": zod.number().int().min(updateWorkerResponseDataVersionsTestMin).max(updateWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12602
12690
|
}),
|
|
12691
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12603
12692
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12604
12693
|
"updated_at": zod.string().datetime({ "offset": true }),
|
|
12605
12694
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
@@ -12676,6 +12765,7 @@ var UpdateWorkerMcpsResponse = zod.object({
|
|
|
12676
12765
|
"live": zod.number().int().min(updateWorkerMcpsResponseDataVersionsLiveMin).max(updateWorkerMcpsResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
|
|
12677
12766
|
"test": zod.number().int().min(updateWorkerMcpsResponseDataVersionsTestMin).max(updateWorkerMcpsResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
|
|
12678
12767
|
}),
|
|
12768
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12679
12769
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12680
12770
|
"updated_at": zod.string().datetime({ "offset": true }),
|
|
12681
12771
|
"schema": zod.record(zod.string(), zod.unknown()),
|
|
@@ -12800,6 +12890,7 @@ var GetWorkerVersionResponse = zod.object({
|
|
|
12800
12890
|
"max_concurrent_runs": zod.union([zod.number().int().min(getWorkerVersionResponseDataMaxConcurrentRunsOneMin).max(getWorkerVersionResponseDataMaxConcurrentRunsOneMax), zod.null()]),
|
|
12801
12891
|
"tool_ids": zod.array(zod.string()),
|
|
12802
12892
|
"secret_ids": zod.array(zod.string()),
|
|
12893
|
+
"intake_id": zod.union([zod.string(), zod.null()]),
|
|
12803
12894
|
"version": zod.number().int().min(getWorkerVersionResponseDataVersionMin).max(getWorkerVersionResponseDataVersionMax),
|
|
12804
12895
|
"version_created_at": zod.string().datetime({ "offset": true }),
|
|
12805
12896
|
"actor": zod.string(),
|
|
@@ -13737,6 +13828,62 @@ var GetFormSubmissionResponse = zod.object({
|
|
|
13737
13828
|
}),
|
|
13738
13829
|
"message": zod.string()
|
|
13739
13830
|
});
|
|
13831
|
+
var CreateIntakeBody = zod.object({
|
|
13832
|
+
"name": zod.string().min(1),
|
|
13833
|
+
"routes": zod.array(zod.object({
|
|
13834
|
+
"name": zod.string().min(1),
|
|
13835
|
+
"description": zod.string().min(1).describe("What the routing worker reads to pick this route."),
|
|
13836
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
13837
|
+
"processor_id": zod.string().uuid()
|
|
13838
|
+
})).min(1)
|
|
13839
|
+
});
|
|
13840
|
+
var CreateIntakeResponse = zod.object({
|
|
13841
|
+
"data": zod.object({
|
|
13842
|
+
"id": zod.string(),
|
|
13843
|
+
"name": zod.string(),
|
|
13844
|
+
"version": zod.number().describe("Version the routes below belong to."),
|
|
13845
|
+
"versions": zod.object({
|
|
13846
|
+
"latest": zod.number(),
|
|
13847
|
+
"live": zod.number(),
|
|
13848
|
+
"test": zod.number()
|
|
13849
|
+
}),
|
|
13850
|
+
"routes": zod.array(zod.object({
|
|
13851
|
+
"id": zod.string(),
|
|
13852
|
+
"name": zod.string(),
|
|
13853
|
+
"description": zod.string(),
|
|
13854
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
13855
|
+
"processor_id": zod.string()
|
|
13856
|
+
})),
|
|
13857
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
13858
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
13859
|
+
}),
|
|
13860
|
+
"message": zod.string()
|
|
13861
|
+
});
|
|
13862
|
+
var GetIntakeParams = zod.object({
|
|
13863
|
+
"intakeId": zod.string().uuid()
|
|
13864
|
+
});
|
|
13865
|
+
var GetIntakeResponse = zod.object({
|
|
13866
|
+
"data": zod.object({
|
|
13867
|
+
"id": zod.string(),
|
|
13868
|
+
"name": zod.string(),
|
|
13869
|
+
"version": zod.number().describe("Version the routes below belong to."),
|
|
13870
|
+
"versions": zod.object({
|
|
13871
|
+
"latest": zod.number(),
|
|
13872
|
+
"live": zod.number(),
|
|
13873
|
+
"test": zod.number()
|
|
13874
|
+
}),
|
|
13875
|
+
"routes": zod.array(zod.object({
|
|
13876
|
+
"id": zod.string(),
|
|
13877
|
+
"name": zod.string(),
|
|
13878
|
+
"description": zod.string(),
|
|
13879
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
13880
|
+
"processor_id": zod.string()
|
|
13881
|
+
})),
|
|
13882
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
13883
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
13884
|
+
}),
|
|
13885
|
+
"message": zod.string()
|
|
13886
|
+
});
|
|
13740
13887
|
var GetExtractParams = zod.object({
|
|
13741
13888
|
"id": zod.string().uuid()
|
|
13742
13889
|
});
|
|
@@ -13824,7 +13971,7 @@ var GetProfileResponse = zod.object({
|
|
|
13824
13971
|
"last_name": zod.union([zod.string(), zod.null()]),
|
|
13825
13972
|
"email": zod.string(),
|
|
13826
13973
|
"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"])),
|
|
13974
|
+
"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
13975
|
"tenants": zod.object({
|
|
13829
13976
|
"active": zod.object({
|
|
13830
13977
|
"id": zod.string(),
|
|
@@ -18032,6 +18179,38 @@ var createMcpServer = (options) => {
|
|
|
18032
18179
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
18033
18180
|
})
|
|
18034
18181
|
);
|
|
18182
|
+
tools.createIntake = server2.registerTool(
|
|
18183
|
+
"createIntake",
|
|
18184
|
+
{
|
|
18185
|
+
title: "Create intake",
|
|
18186
|
+
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.",
|
|
18187
|
+
inputSchema: {
|
|
18188
|
+
bodyParams: CreateIntakeBody.optional()
|
|
18189
|
+
},
|
|
18190
|
+
outputSchema: CreateIntakeResponse,
|
|
18191
|
+
annotations: { destructiveHint: true }
|
|
18192
|
+
},
|
|
18193
|
+
(args, ctx) => createIntakeHandler(args, {
|
|
18194
|
+
...options,
|
|
18195
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
18196
|
+
})
|
|
18197
|
+
);
|
|
18198
|
+
tools.getIntake = server2.registerTool(
|
|
18199
|
+
"getIntake",
|
|
18200
|
+
{
|
|
18201
|
+
title: "Get intake",
|
|
18202
|
+
description: "Retrieve an intake with its routes at the newest version.",
|
|
18203
|
+
inputSchema: {
|
|
18204
|
+
pathParams: GetIntakeParams
|
|
18205
|
+
},
|
|
18206
|
+
outputSchema: GetIntakeResponse,
|
|
18207
|
+
annotations: { readOnlyHint: true }
|
|
18208
|
+
},
|
|
18209
|
+
(args, ctx) => getIntakeHandler(args, {
|
|
18210
|
+
...options,
|
|
18211
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
18212
|
+
})
|
|
18213
|
+
);
|
|
18035
18214
|
tools.getExtract = server2.registerTool(
|
|
18036
18215
|
"getExtract",
|
|
18037
18216
|
{
|
|
@@ -19231,4 +19410,4 @@ var transport = new StdioServerTransport();
|
|
|
19231
19410
|
server.connect(transport).then(() => {
|
|
19232
19411
|
console.error("MCP server running on stdio");
|
|
19233
19412
|
}).catch(console.error);
|
|
19234
|
-
//# sourceMappingURL=server-
|
|
19413
|
+
//# sourceMappingURL=server-XN72ZYHY.js.map
|