@avallon-labs/mcp 62.6.0 → 63.1.0-staging.1350
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
|
@@ -2602,12 +2602,19 @@ var listChatMessages = async (chatId, params, options) => {
|
|
|
2602
2602
|
const data = body ? JSON.parse(body) : {};
|
|
2603
2603
|
return { data, status: res.status, headers: res.headers };
|
|
2604
2604
|
};
|
|
2605
|
-
var getGetPublicFormSubmissionUrl = (id) => {
|
|
2606
|
-
|
|
2605
|
+
var getGetPublicFormSubmissionUrl = (id, params) => {
|
|
2606
|
+
const normalizedParams = new URLSearchParams();
|
|
2607
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2608
|
+
if (value !== void 0) {
|
|
2609
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2610
|
+
}
|
|
2611
|
+
});
|
|
2612
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2613
|
+
return stringifiedParams.length > 0 ? `/public/v1/form-submissions/${id}?${stringifiedParams}` : `/public/v1/form-submissions/${id}`;
|
|
2607
2614
|
};
|
|
2608
|
-
var getPublicFormSubmission = async (id, options) => {
|
|
2615
|
+
var getPublicFormSubmission = async (id, params, options) => {
|
|
2609
2616
|
const res = await fetch(
|
|
2610
|
-
getGetPublicFormSubmissionUrl(id),
|
|
2617
|
+
getGetPublicFormSubmissionUrl(id, params),
|
|
2611
2618
|
{
|
|
2612
2619
|
...options,
|
|
2613
2620
|
method: "GET"
|
|
@@ -7100,7 +7107,7 @@ var listChatMessagesHandler = async (args, options) => {
|
|
|
7100
7107
|
};
|
|
7101
7108
|
};
|
|
7102
7109
|
var getPublicFormSubmissionHandler = async (args, options) => {
|
|
7103
|
-
const res = await getPublicFormSubmission(args.pathParams.id, options);
|
|
7110
|
+
const res = await getPublicFormSubmission(args.pathParams.id, args.queryParams, options);
|
|
7104
7111
|
if (res.status >= 400) {
|
|
7105
7112
|
return {
|
|
7106
7113
|
content: [
|
|
@@ -12483,7 +12490,7 @@ var AddCaseLinksQueryParams = zod.object({
|
|
|
12483
12490
|
var addCaseLinksBodyEntitiesMax = 100;
|
|
12484
12491
|
var AddCaseLinksBody = zod.object({
|
|
12485
12492
|
"entities": zod.array(zod.object({
|
|
12486
|
-
"entity_type": zod.enum(["artifact", "call", "chat", "email", "extract", "information_request", "schedule", "worker_run"]),
|
|
12493
|
+
"entity_type": zod.enum(["artifact", "call", "chat", "email", "extract", "form_submission", "information_request", "schedule", "worker_run"]),
|
|
12487
12494
|
"entity_id": zod.string().uuid()
|
|
12488
12495
|
})).min(1).max(addCaseLinksBodyEntitiesMax)
|
|
12489
12496
|
});
|
|
@@ -12491,7 +12498,7 @@ var AddCaseLinksResponse = zod.object({
|
|
|
12491
12498
|
"data": zod.object({
|
|
12492
12499
|
"links": zod.array(zod.object({
|
|
12493
12500
|
"case_id": zod.string(),
|
|
12494
|
-
"entity_type": zod.enum(["artifact", "call", "chat", "email", "extract", "information_request", "schedule", "worker_run"]),
|
|
12501
|
+
"entity_type": zod.enum(["artifact", "call", "chat", "email", "extract", "form_submission", "information_request", "schedule", "worker_run"]),
|
|
12495
12502
|
"entity_id": zod.string().uuid(),
|
|
12496
12503
|
"created_at": zod.string().datetime({ "offset": true })
|
|
12497
12504
|
}))
|
|
@@ -12509,7 +12516,7 @@ var listCaseLinksQuerySortByDefault = `created_at`;
|
|
|
12509
12516
|
var listCaseLinksQuerySortOrderDefault = `desc`;
|
|
12510
12517
|
var ListCaseLinksQueryParams = zod.object({
|
|
12511
12518
|
"environment": zod.enum(["live", "test"]).optional().describe("Environment the case belongs to. A case reference is unique per environment, so the same reference can name a different case in each. Defaults to `live`. A worker run may omit this or pass its own run's environment; any other value is rejected."),
|
|
12512
|
-
"entity_type": zod.enum(["artifact", "call", "chat", "email", "extract", "information_request", "schedule", "worker_run"]).optional().describe("Filter links by entity type."),
|
|
12519
|
+
"entity_type": zod.enum(["artifact", "call", "chat", "email", "extract", "form_submission", "information_request", "schedule", "worker_run"]).optional().describe("Filter links by entity type."),
|
|
12513
12520
|
"count": zod.number().min(1).max(listCaseLinksQueryCountMax).default(listCaseLinksQueryCountDefault),
|
|
12514
12521
|
"offset": zod.number().min(listCaseLinksQueryOffsetMin).default(listCaseLinksQueryOffsetDefault),
|
|
12515
12522
|
"sort_by": zod.enum(["created_at"]).default(listCaseLinksQuerySortByDefault),
|
|
@@ -12518,7 +12525,7 @@ var ListCaseLinksQueryParams = zod.object({
|
|
|
12518
12525
|
var ListCaseLinksResponse = zod.object({
|
|
12519
12526
|
"data": zod.array(zod.object({
|
|
12520
12527
|
"case_id": zod.string(),
|
|
12521
|
-
"entity_type": zod.enum(["artifact", "call", "chat", "email", "extract", "information_request", "schedule", "worker_run"]),
|
|
12528
|
+
"entity_type": zod.enum(["artifact", "call", "chat", "email", "extract", "form_submission", "information_request", "schedule", "worker_run"]),
|
|
12522
12529
|
"entity_id": zod.string().uuid(),
|
|
12523
12530
|
"created_at": zod.string().datetime({ "offset": true })
|
|
12524
12531
|
})),
|
|
@@ -12529,7 +12536,7 @@ var ListCaseLinksResponse = zod.object({
|
|
|
12529
12536
|
});
|
|
12530
12537
|
var RemoveCaseLinkParams = zod.object({
|
|
12531
12538
|
"id": zod.string().min(1),
|
|
12532
|
-
"entityType": zod.enum(["artifact", "call", "chat", "email", "extract", "information_request", "schedule", "worker_run"]),
|
|
12539
|
+
"entityType": zod.enum(["artifact", "call", "chat", "email", "extract", "form_submission", "information_request", "schedule", "worker_run"]),
|
|
12533
12540
|
"entityId": zod.string().uuid()
|
|
12534
12541
|
});
|
|
12535
12542
|
var RemoveCaseLinkQueryParams = zod.object({
|
|
@@ -12768,6 +12775,10 @@ var ListChatMessagesResponse = zod.object({
|
|
|
12768
12775
|
var GetPublicFormSubmissionParams = zod.object({
|
|
12769
12776
|
"id": zod.string().uuid()
|
|
12770
12777
|
});
|
|
12778
|
+
var getPublicFormSubmissionQueryPasswordMax = 256;
|
|
12779
|
+
var GetPublicFormSubmissionQueryParams = zod.object({
|
|
12780
|
+
"password": zod.string().min(1).max(getPublicFormSubmissionQueryPasswordMax).describe("The password the person entered")
|
|
12781
|
+
});
|
|
12771
12782
|
var GetPublicFormSubmissionResponse = zod.object({
|
|
12772
12783
|
"data": zod.object({
|
|
12773
12784
|
"title": zod.string(),
|
|
@@ -12779,8 +12790,10 @@ var GetPublicFormSubmissionResponse = zod.object({
|
|
|
12779
12790
|
var SubmitFormSubmissionParams = zod.object({
|
|
12780
12791
|
"id": zod.string().uuid()
|
|
12781
12792
|
});
|
|
12793
|
+
var submitFormSubmissionBodyPasswordMax = 256;
|
|
12782
12794
|
var SubmitFormSubmissionBody = zod.object({
|
|
12783
|
-
"answers": zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean()])).describe("Answers keyed by form field. Validated against the JSON Schema of the form version this submission is pinned to; failures return 400 with the field path in the message.")
|
|
12795
|
+
"answers": zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean()])).describe("Answers keyed by form field. Validated against the JSON Schema of the form version this submission is pinned to; failures return 400 with the field path in the message."),
|
|
12796
|
+
"password": zod.string().min(1).max(submitFormSubmissionBodyPasswordMax).describe("The password the person entered")
|
|
12784
12797
|
});
|
|
12785
12798
|
var SubmitFormSubmissionResponse = zod.object({
|
|
12786
12799
|
"data": zod.object({
|
|
@@ -12962,10 +12975,12 @@ var PromoteFormVersionResponse = zod.object({
|
|
|
12962
12975
|
}),
|
|
12963
12976
|
"message": zod.string()
|
|
12964
12977
|
});
|
|
12978
|
+
var createFormSubmissionBodyPasswordMax = 256;
|
|
12965
12979
|
var CreateFormSubmissionBody = zod.object({
|
|
12966
12980
|
"form_id": zod.string().uuid(),
|
|
12967
12981
|
"environment": zod.enum(["live", "test"]),
|
|
12968
|
-
"prefill": zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean()])).optional().describe("Field values to fill in, checked against the form's schema")
|
|
12982
|
+
"prefill": zod.record(zod.string(), zod.union([zod.string(), zod.number(), zod.boolean()])).optional().describe("Field values to fill in, checked against the form's schema"),
|
|
12983
|
+
"password": zod.string().min(1).max(createFormSubmissionBodyPasswordMax).describe("Password the person must enter to open the form, e.g. a date of birth or a 6-digit code")
|
|
12969
12984
|
});
|
|
12970
12985
|
var CreateFormSubmissionResponse = zod.object({
|
|
12971
12986
|
"data": zod.object({
|
|
@@ -12975,8 +12990,11 @@ var CreateFormSubmissionResponse = zod.object({
|
|
|
12975
12990
|
"environment": zod.enum(["live", "test"]),
|
|
12976
12991
|
"prefill": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Values the renderer fills in before the person edits them"),
|
|
12977
12992
|
"submission": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Answers keyed by form field; null until submitted"),
|
|
12993
|
+
"status": zod.enum(["pending", "submitted"]).describe("`submitted` once the person submitted, `pending` before"),
|
|
12994
|
+
"created_by": zod.string().describe("Who opened the link, e.g. `worker:<id>`"),
|
|
12978
12995
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
12979
12996
|
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
|
|
12997
|
+
"password": zod.union([zod.string(), zod.null()]).describe("Password the person enters to open the form"),
|
|
12980
12998
|
"url": zod.string().url().describe("Link to send to the person filling the form")
|
|
12981
12999
|
}),
|
|
12982
13000
|
"message": zod.string()
|
|
@@ -13006,8 +13024,11 @@ var ListFormSubmissionsResponse = zod.object({
|
|
|
13006
13024
|
"environment": zod.enum(["live", "test"]),
|
|
13007
13025
|
"prefill": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Values the renderer fills in before the person edits them"),
|
|
13008
13026
|
"submission": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Answers keyed by form field; null until submitted"),
|
|
13027
|
+
"status": zod.enum(["pending", "submitted"]).describe("`submitted` once the person submitted, `pending` before"),
|
|
13028
|
+
"created_by": zod.string().describe("Who opened the link, e.g. `worker:<id>`"),
|
|
13009
13029
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
13010
|
-
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()])
|
|
13030
|
+
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
|
|
13031
|
+
"password": zod.union([zod.string(), zod.null()]).describe("Password the person enters to open the form")
|
|
13011
13032
|
})),
|
|
13012
13033
|
"message": zod.string(),
|
|
13013
13034
|
"meta": zod.object({
|
|
@@ -13025,8 +13046,11 @@ var GetFormSubmissionResponse = zod.object({
|
|
|
13025
13046
|
"environment": zod.enum(["live", "test"]),
|
|
13026
13047
|
"prefill": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Values the renderer fills in before the person edits them"),
|
|
13027
13048
|
"submission": zod.union([zod.record(zod.string(), zod.unknown()), zod.null()]).describe("Answers keyed by form field; null until submitted"),
|
|
13049
|
+
"status": zod.enum(["pending", "submitted"]).describe("`submitted` once the person submitted, `pending` before"),
|
|
13050
|
+
"created_by": zod.string().describe("Who opened the link, e.g. `worker:<id>`"),
|
|
13028
13051
|
"created_at": zod.string().datetime({ "offset": true }),
|
|
13029
|
-
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()])
|
|
13052
|
+
"submitted_at": zod.union([zod.string().datetime({ "offset": true }), zod.null()]),
|
|
13053
|
+
"password": zod.union([zod.string(), zod.null()]).describe("Password the person enters to open the form")
|
|
13030
13054
|
}),
|
|
13031
13055
|
"message": zod.string()
|
|
13032
13056
|
});
|
|
@@ -17192,9 +17216,10 @@ var createMcpServer = (options) => {
|
|
|
17192
17216
|
"getPublicFormSubmission",
|
|
17193
17217
|
{
|
|
17194
17218
|
title: "Get a form submission's form (public)",
|
|
17195
|
-
description: "Return the title and JSON Schema of the form version a submission link is pinned to, for the form renderer. The id
|
|
17219
|
+
description: "Return the title and JSON Schema of the form version a submission link is pinned to, for the form renderer. The id and the password set on create are the credential; an unknown id is 404 and a wrong password, or a link created without one, is 401. Once the request has been submitted the request fails with 409 and `{ title }`.",
|
|
17196
17220
|
inputSchema: {
|
|
17197
|
-
pathParams: GetPublicFormSubmissionParams
|
|
17221
|
+
pathParams: GetPublicFormSubmissionParams,
|
|
17222
|
+
queryParams: GetPublicFormSubmissionQueryParams
|
|
17198
17223
|
},
|
|
17199
17224
|
outputSchema: GetPublicFormSubmissionResponse,
|
|
17200
17225
|
annotations: { readOnlyHint: true }
|
|
@@ -17208,7 +17233,7 @@ var createMcpServer = (options) => {
|
|
|
17208
17233
|
"submitFormSubmission",
|
|
17209
17234
|
{
|
|
17210
17235
|
title: "Submit a form submission (public)",
|
|
17211
|
-
description: "Store the answers for a submission link and hand them to the form's processor. Each link can be submitted once: a second submit fails with 409. The id
|
|
17236
|
+
description: "Store the answers for a submission link and hand them to the form's processor. Each link can be submitted once: a second submit fails with 409. The id and the password set on create are the credential; an unknown id is 404 and a wrong password, or a link created without one, is 401.",
|
|
17212
17237
|
inputSchema: {
|
|
17213
17238
|
pathParams: SubmitFormSubmissionParams,
|
|
17214
17239
|
bodyParams: SubmitFormSubmissionBody.optional()
|
|
@@ -17340,7 +17365,7 @@ var createMcpServer = (options) => {
|
|
|
17340
17365
|
"createFormSubmission",
|
|
17341
17366
|
{
|
|
17342
17367
|
title: "Create form submission",
|
|
17343
|
-
description: "Open a submission link for a form, pinned to the version the given environment points at. Send the returned url to the person filling the form.",
|
|
17368
|
+
description: "Open a submission link for a form, pinned to the version the given environment points at. Send the returned url and the password to the person filling the form.",
|
|
17344
17369
|
inputSchema: {
|
|
17345
17370
|
bodyParams: CreateFormSubmissionBody.optional()
|
|
17346
17371
|
},
|
|
@@ -18533,4 +18558,4 @@ var transport = new StdioServerTransport();
|
|
|
18533
18558
|
server.connect(transport).then(() => {
|
|
18534
18559
|
console.error("MCP server running on stdio");
|
|
18535
18560
|
}).catch(console.error);
|
|
18536
|
-
//# sourceMappingURL=server-
|
|
18561
|
+
//# sourceMappingURL=server-JXXACOXB.js.map
|