@avallon-labs/mcp 69.0.0 → 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
@@ -56,5 +56,5 @@ function describeErrors(body) {
56
56
 
57
57
  // src/index.ts
58
58
  setupFetch();
59
- await import("./server-OO2FOX55.js");
59
+ await import("./server-5FUXL5PM.js");
60
60
  //# sourceMappingURL=index.js.map
@@ -1671,6 +1671,21 @@ var createWorkerBenchmarks = async (workerId, createWorkerBenchmarksBody, option
1671
1671
  const data = body ? JSON.parse(body) : {};
1672
1672
  return { data, status: res.status, headers: res.headers };
1673
1673
  };
1674
+ var getDeleteEvalUrl = (evalId) => {
1675
+ return `/v1/evals/${evalId}`;
1676
+ };
1677
+ var deleteEval = async (evalId, options) => {
1678
+ const res = await fetch(
1679
+ getDeleteEvalUrl(evalId),
1680
+ {
1681
+ ...options,
1682
+ method: "DELETE"
1683
+ }
1684
+ );
1685
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1686
+ const data = body ? JSON.parse(body) : {};
1687
+ return { data, status: res.status, headers: res.headers };
1688
+ };
1674
1689
  var getListWorkerEvalSuitesUrl = (workerId) => {
1675
1690
  return `/v1/workers/${workerId}/eval-suites`;
1676
1691
  };
@@ -2970,6 +2985,29 @@ var getFormSubmission = async (id, options) => {
2970
2985
  const data = body ? JSON.parse(body) : {};
2971
2986
  return { data, status: res.status, headers: res.headers };
2972
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
+ };
2973
3011
  var getGetExtractUrl = (id) => {
2974
3012
  return `/v1/extracts/${id}`;
2975
3013
  };
@@ -6252,6 +6290,29 @@ var createWorkerBenchmarksHandler = async (args, options) => {
6252
6290
  structuredContent: res.data
6253
6291
  };
6254
6292
  };
6293
+ var deleteEvalHandler = async (args, options) => {
6294
+ const res = await deleteEval(args.pathParams.evalId, options);
6295
+ if (res.status >= 400) {
6296
+ return {
6297
+ content: [
6298
+ {
6299
+ type: "text",
6300
+ text: JSON.stringify(res.data ?? null)
6301
+ }
6302
+ ],
6303
+ isError: true
6304
+ };
6305
+ }
6306
+ return {
6307
+ content: [
6308
+ {
6309
+ type: "text",
6310
+ text: JSON.stringify(res.data ?? null)
6311
+ }
6312
+ ],
6313
+ structuredContent: res.data
6314
+ };
6315
+ };
6255
6316
  var listWorkerEvalSuitesHandler = async (args, options) => {
6256
6317
  const res = await listWorkerEvalSuites(args.pathParams.workerId, options);
6257
6318
  if (res.status >= 400) {
@@ -7724,6 +7785,29 @@ var getFormSubmissionHandler = async (args, options) => {
7724
7785
  structuredContent: res.data
7725
7786
  };
7726
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
+ };
7727
7811
  var getExtractHandler = async (args, options) => {
7728
7812
  const res = await getExtract(args.pathParams.id, options);
7729
7813
  if (res.status >= 400) {
@@ -12282,6 +12366,13 @@ var CreateWorkerBenchmarksResponse = zod.object({
12282
12366
  })),
12283
12367
  "message": zod.string()
12284
12368
  });
12369
+ var DeleteEvalParams = zod.object({
12370
+ "evalId": zod.string().uuid()
12371
+ });
12372
+ var DeleteEvalResponse = zod.object({
12373
+ "data": zod.object({}),
12374
+ "message": zod.string()
12375
+ });
12285
12376
  var ListWorkerEvalSuitesParams = zod.object({
12286
12377
  "workerId": zod.string().uuid()
12287
12378
  });
@@ -12416,6 +12507,7 @@ var CreateWorkerResponse = zod.object({
12416
12507
  "live": zod.number().int().min(createWorkerResponseDataVersionsLiveMin).max(createWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
12417
12508
  "test": zod.number().int().min(createWorkerResponseDataVersionsTestMin).max(createWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
12418
12509
  }),
12510
+ "intake_id": zod.union([zod.string(), zod.null()]),
12419
12511
  "created_at": zod.string().datetime({ "offset": true }),
12420
12512
  "updated_at": zod.string().datetime({ "offset": true }),
12421
12513
  "schema": zod.record(zod.string(), zod.unknown()),
@@ -12462,6 +12554,7 @@ var ListWorkersResponse = zod.object({
12462
12554
  "live": zod.number().int().min(listWorkersResponseDataItemVersionsLiveMin).max(listWorkersResponseDataItemVersionsLiveMax).describe("Config version the `live` environment resolves to."),
12463
12555
  "test": zod.number().int().min(listWorkersResponseDataItemVersionsTestMin).max(listWorkersResponseDataItemVersionsTestMax).describe("Config version the `test` environment resolves to.")
12464
12556
  }),
12557
+ "intake_id": zod.union([zod.string(), zod.null()]),
12465
12558
  "created_at": zod.string().datetime({ "offset": true }),
12466
12559
  "updated_at": zod.string().datetime({ "offset": true })
12467
12560
  })),
@@ -12496,6 +12589,7 @@ var GetWorkerResponse = zod.object({
12496
12589
  "live": zod.number().int().min(getWorkerResponseDataVersionsLiveMin).max(getWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
12497
12590
  "test": zod.number().int().min(getWorkerResponseDataVersionsTestMin).max(getWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
12498
12591
  }),
12592
+ "intake_id": zod.union([zod.string(), zod.null()]),
12499
12593
  "created_at": zod.string().datetime({ "offset": true }),
12500
12594
  "updated_at": zod.string().datetime({ "offset": true }),
12501
12595
  "schema": zod.record(zod.string(), zod.unknown()),
@@ -12530,7 +12624,8 @@ var UpdateWorkerBody = zod.object({
12530
12624
  "schema": zod.record(zod.string(), zod.unknown()).optional(),
12531
12625
  "tools": zod.array(zod.string().uuid()).optional().describe("Replace the worker's attached tool set. Omit to leave unchanged; pass [] to clear."),
12532
12626
  "secrets": zod.array(zod.string().uuid()).optional().describe("Replace the worker's attached secret set. Omit to leave unchanged; pass [] to detach all."),
12533
- "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.")
12534
12629
  });
12535
12630
  var updateWorkerResponseDataVersionMin = 0;
12536
12631
  var updateWorkerResponseDataVersionsLatestMin = -9007199254740991;
@@ -12555,6 +12650,7 @@ var UpdateWorkerResponse = zod.object({
12555
12650
  "live": zod.number().int().min(updateWorkerResponseDataVersionsLiveMin).max(updateWorkerResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
12556
12651
  "test": zod.number().int().min(updateWorkerResponseDataVersionsTestMin).max(updateWorkerResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
12557
12652
  }),
12653
+ "intake_id": zod.union([zod.string(), zod.null()]),
12558
12654
  "created_at": zod.string().datetime({ "offset": true }),
12559
12655
  "updated_at": zod.string().datetime({ "offset": true }),
12560
12656
  "schema": zod.record(zod.string(), zod.unknown()),
@@ -12631,6 +12727,7 @@ var UpdateWorkerMcpsResponse = zod.object({
12631
12727
  "live": zod.number().int().min(updateWorkerMcpsResponseDataVersionsLiveMin).max(updateWorkerMcpsResponseDataVersionsLiveMax).describe("Config version the `live` environment resolves to."),
12632
12728
  "test": zod.number().int().min(updateWorkerMcpsResponseDataVersionsTestMin).max(updateWorkerMcpsResponseDataVersionsTestMax).describe("Config version the `test` environment resolves to.")
12633
12729
  }),
12730
+ "intake_id": zod.union([zod.string(), zod.null()]),
12634
12731
  "created_at": zod.string().datetime({ "offset": true }),
12635
12732
  "updated_at": zod.string().datetime({ "offset": true }),
12636
12733
  "schema": zod.record(zod.string(), zod.unknown()),
@@ -12755,6 +12852,7 @@ var GetWorkerVersionResponse = zod.object({
12755
12852
  "max_concurrent_runs": zod.union([zod.number().int().min(getWorkerVersionResponseDataMaxConcurrentRunsOneMin).max(getWorkerVersionResponseDataMaxConcurrentRunsOneMax), zod.null()]),
12756
12853
  "tool_ids": zod.array(zod.string()),
12757
12854
  "secret_ids": zod.array(zod.string()),
12855
+ "intake_id": zod.union([zod.string(), zod.null()]),
12758
12856
  "version": zod.number().int().min(getWorkerVersionResponseDataVersionMin).max(getWorkerVersionResponseDataVersionMax),
12759
12857
  "version_created_at": zod.string().datetime({ "offset": true }),
12760
12858
  "actor": zod.string(),
@@ -13692,6 +13790,37 @@ var GetFormSubmissionResponse = zod.object({
13692
13790
  }),
13693
13791
  "message": zod.string()
13694
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
+ });
13695
13824
  var GetExtractParams = zod.object({
13696
13825
  "id": zod.string().uuid()
13697
13826
  });
@@ -13779,7 +13908,7 @@ var GetProfileResponse = zod.object({
13779
13908
  "last_name": zod.union([zod.string(), zod.null()]),
13780
13909
  "email": zod.string(),
13781
13910
  "role": zod.enum(["admin", "avallon_admin", "member"]),
13782
- "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"])),
13783
13912
  "tenants": zod.object({
13784
13913
  "active": zod.object({
13785
13914
  "id": zod.string(),
@@ -16924,6 +17053,22 @@ var createMcpServer = (options) => {
16924
17053
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
16925
17054
  })
16926
17055
  );
17056
+ tools.deleteEval = server2.registerTool(
17057
+ "deleteEval",
17058
+ {
17059
+ title: "Delete an eval",
17060
+ description: "Remove an eval from every suite and soft-delete it. Its past runs and benchmarks stay readable. Returns 409 while any of its runs are queued, running or judging.",
17061
+ inputSchema: {
17062
+ pathParams: DeleteEvalParams
17063
+ },
17064
+ outputSchema: DeleteEvalResponse,
17065
+ annotations: { destructiveHint: true, idempotentHint: true }
17066
+ },
17067
+ (args, ctx) => deleteEvalHandler(args, {
17068
+ ...options,
17069
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17070
+ })
17071
+ );
16927
17072
  tools.listWorkerEvalSuites = server2.registerTool(
16928
17073
  "listWorkerEvalSuites",
16929
17074
  {
@@ -17971,6 +18116,22 @@ var createMcpServer = (options) => {
17971
18116
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
17972
18117
  })
17973
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
+ );
17974
18135
  tools.getExtract = server2.registerTool(
17975
18136
  "getExtract",
17976
18137
  {
@@ -19170,4 +19331,4 @@ var transport = new StdioServerTransport();
19170
19331
  server.connect(transport).then(() => {
19171
19332
  console.error("MCP server running on stdio");
19172
19333
  }).catch(console.error);
19173
- //# sourceMappingURL=server-OO2FOX55.js.map
19334
+ //# sourceMappingURL=server-5FUXL5PM.js.map