@avallon-labs/mcp 70.3.0-staging.1510 → 70.4.0

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-GCA6K2SY.js");
59
+ await import("./server-MCY7RYOU.js");
60
60
  //# sourceMappingURL=index.js.map
@@ -3053,6 +3053,28 @@ var createIntake = async (createIntakeBody, options) => {
3053
3053
  const data = body ? JSON.parse(body) : {};
3054
3054
  return { data, status: res.status, headers: res.headers };
3055
3055
  };
3056
+ var getListIntakesUrl = (params) => {
3057
+ const normalizedParams = new URLSearchParams();
3058
+ Object.entries(params || {}).forEach(([key, value]) => {
3059
+ if (value !== void 0) {
3060
+ normalizedParams.append(key, value === null ? "null" : String(value));
3061
+ }
3062
+ });
3063
+ const stringifiedParams = normalizedParams.toString();
3064
+ return stringifiedParams.length > 0 ? `/v1/intakes?${stringifiedParams}` : `/v1/intakes`;
3065
+ };
3066
+ var listIntakes = async (params, options) => {
3067
+ const res = await fetch(
3068
+ getListIntakesUrl(params),
3069
+ {
3070
+ ...options,
3071
+ method: "GET"
3072
+ }
3073
+ );
3074
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
3075
+ const data = body ? JSON.parse(body) : {};
3076
+ return { data, status: res.status, headers: res.headers };
3077
+ };
3056
3078
  var getGetIntakeUrl = (intakeId) => {
3057
3079
  return `/v1/intakes/${intakeId}`;
3058
3080
  };
@@ -8118,6 +8140,29 @@ var createIntakeHandler = async (args, options) => {
8118
8140
  structuredContent: res.data
8119
8141
  };
8120
8142
  };
8143
+ var listIntakesHandler = async (args, options) => {
8144
+ const res = await listIntakes(args.queryParams, options);
8145
+ if (res.status >= 400) {
8146
+ return {
8147
+ content: [
8148
+ {
8149
+ type: "text",
8150
+ text: JSON.stringify(res.data ?? null)
8151
+ }
8152
+ ],
8153
+ isError: true
8154
+ };
8155
+ }
8156
+ return {
8157
+ content: [
8158
+ {
8159
+ type: "text",
8160
+ text: JSON.stringify(res.data ?? null)
8161
+ }
8162
+ ],
8163
+ structuredContent: res.data
8164
+ };
8165
+ };
8121
8166
  var getIntakeHandler = async (args, options) => {
8122
8167
  const res = await getIntake(args.pathParams.intakeId, options);
8123
8168
  if (res.status >= 400) {
@@ -14634,6 +14679,44 @@ var CreateIntakeResponse = zod.object({
14634
14679
  }),
14635
14680
  "message": zod.string()
14636
14681
  });
14682
+ var listIntakesQueryCountDefault = 50;
14683
+ var listIntakesQueryCountMax = 100;
14684
+ var listIntakesQueryOffsetDefault = 0;
14685
+ var listIntakesQueryOffsetMin = 0;
14686
+ var listIntakesQuerySortByDefault = `created_at`;
14687
+ var listIntakesQuerySortOrderDefault = `desc`;
14688
+ var ListIntakesQueryParams = zod.object({
14689
+ "count": zod.number().min(1).max(listIntakesQueryCountMax).default(listIntakesQueryCountDefault),
14690
+ "offset": zod.number().min(listIntakesQueryOffsetMin).default(listIntakesQueryOffsetDefault),
14691
+ "sort_by": zod.enum(["created_at"]).default(listIntakesQuerySortByDefault),
14692
+ "sort_order": zod.enum(["asc", "desc"]).default(listIntakesQuerySortOrderDefault)
14693
+ });
14694
+ var ListIntakesResponse = zod.object({
14695
+ "data": zod.array(zod.object({
14696
+ "id": zod.string(),
14697
+ "name": zod.string(),
14698
+ "version": zod.number(),
14699
+ "versions": zod.object({
14700
+ "latest": zod.number(),
14701
+ "live": zod.number(),
14702
+ "test": zod.number()
14703
+ }),
14704
+ "dry_run": zod.boolean().describe("When true, routed items are not handed to their route's worker."),
14705
+ "routes": zod.array(zod.object({
14706
+ "id": zod.string(),
14707
+ "name": zod.string(),
14708
+ "description": zod.string(),
14709
+ "processor_type": zod.enum(["extractor", "worker"]),
14710
+ "processor_id": zod.string()
14711
+ })),
14712
+ "created_at": zod.string().datetime({ "offset": true }),
14713
+ "updated_at": zod.string().datetime({ "offset": true })
14714
+ })),
14715
+ "message": zod.string(),
14716
+ "meta": zod.object({
14717
+ "total": zod.number()
14718
+ })
14719
+ });
14637
14720
  var GetIntakeParams = zod.object({
14638
14721
  "intakeId": zod.string().uuid()
14639
14722
  });
@@ -14656,7 +14739,8 @@ var GetIntakeResponse = zod.object({
14656
14739
  "processor_id": zod.string()
14657
14740
  })),
14658
14741
  "created_at": zod.string().datetime({ "offset": true }),
14659
- "updated_at": zod.string().datetime({ "offset": true })
14742
+ "updated_at": zod.string().datetime({ "offset": true }),
14743
+ "worker_id": zod.union([zod.string(), zod.null()]).describe("Worker that routes the intake's items.")
14660
14744
  }),
14661
14745
  "message": zod.string()
14662
14746
  });
@@ -19262,6 +19346,22 @@ var createMcpServer = (options) => {
19262
19346
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
19263
19347
  })
19264
19348
  );
19349
+ tools.listIntakes = server2.registerTool(
19350
+ "listIntakes",
19351
+ {
19352
+ title: "List intakes",
19353
+ description: "List intakes with their routes at the newest version.",
19354
+ inputSchema: {
19355
+ queryParams: ListIntakesQueryParams
19356
+ },
19357
+ outputSchema: ListIntakesResponse,
19358
+ annotations: { readOnlyHint: true }
19359
+ },
19360
+ (args, ctx) => listIntakesHandler(args, {
19361
+ ...options,
19362
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
19363
+ })
19364
+ );
19265
19365
  tools.getIntake = server2.registerTool(
19266
19366
  "getIntake",
19267
19367
  {
@@ -20642,4 +20742,4 @@ var transport = new StdioServerTransport();
20642
20742
  server.connect(transport).then(() => {
20643
20743
  console.error("MCP server running on stdio");
20644
20744
  }).catch(console.error);
20645
- //# sourceMappingURL=server-GCA6K2SY.js.map
20745
+ //# sourceMappingURL=server-MCY7RYOU.js.map