@avallon-labs/mcp 37.2.0 → 37.4.0-staging.937

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
@@ -54,5 +54,5 @@ function setupFetch() {
54
54
 
55
55
  // src/index.ts
56
56
  setupFetch();
57
- await import("./server-2B2IEPV6.js");
57
+ await import("./server-WAY4EMQV.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -2490,6 +2490,35 @@ var deleteSchedule = async (scheduleId, options) => {
2490
2490
  headers: res.headers
2491
2491
  };
2492
2492
  };
2493
+ var getListDispatchesUrl = (params) => {
2494
+ const normalizedParams = new URLSearchParams();
2495
+ Object.entries(params || {}).forEach(([key, value]) => {
2496
+ if (value !== void 0) {
2497
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
2498
+ for (const [sk, sv] of Object.entries(value)) {
2499
+ if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
2500
+ }
2501
+ } else {
2502
+ normalizedParams.append(key, value === null ? "null" : String(value));
2503
+ }
2504
+ }
2505
+ });
2506
+ const stringifiedParams = normalizedParams.toString();
2507
+ return stringifiedParams.length > 0 ? `/v1/dispatches?${stringifiedParams}` : `/v1/dispatches`;
2508
+ };
2509
+ var listDispatches = async (params, options) => {
2510
+ const res = await fetch(getListDispatchesUrl(params), {
2511
+ ...options,
2512
+ method: "GET"
2513
+ });
2514
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2515
+ const data = body ? JSON.parse(body) : {};
2516
+ return {
2517
+ data,
2518
+ status: res.status,
2519
+ headers: res.headers
2520
+ };
2521
+ };
2493
2522
  var getCreateToolUrl = () => {
2494
2523
  return `/v1/tools`;
2495
2524
  };
@@ -4273,6 +4302,17 @@ var deleteScheduleHandler = async (args) => {
4273
4302
  ]
4274
4303
  };
4275
4304
  };
4305
+ var listDispatchesHandler = async (args) => {
4306
+ const res = await listDispatches(args.queryParams);
4307
+ return {
4308
+ content: [
4309
+ {
4310
+ type: "text",
4311
+ text: JSON.stringify(res)
4312
+ }
4313
+ ]
4314
+ };
4315
+ };
4276
4316
  var createToolHandler = async (args) => {
4277
4317
  const res = await createTool(args.bodyParams);
4278
4318
  return {
@@ -7380,6 +7420,7 @@ var AddCaseLinksBody = zod.object({
7380
7420
  "chat",
7381
7421
  "email",
7382
7422
  "extract",
7423
+ "schedule",
7383
7424
  "worker_run"
7384
7425
  ]),
7385
7426
  entity_id: zod.string().uuid()
@@ -7396,6 +7437,7 @@ var AddCaseLinksResponse = zod.object({
7396
7437
  "chat",
7397
7438
  "email",
7398
7439
  "extract",
7440
+ "schedule",
7399
7441
  "worker_run"
7400
7442
  ]),
7401
7443
  entity_id: zod.string().uuid(),
@@ -7413,7 +7455,15 @@ var listCaseLinksQueryOffsetMin = 0;
7413
7455
  var listCaseLinksQuerySortByDefault = `created_at`;
7414
7456
  var listCaseLinksQuerySortOrderDefault = `desc`;
7415
7457
  var ListCaseLinksQueryParams = zod.object({
7416
- entity_type: zod.enum(["artifact", "call", "chat", "email", "extract", "worker_run"]).optional().describe("Filter links by entity type."),
7458
+ entity_type: zod.enum([
7459
+ "artifact",
7460
+ "call",
7461
+ "chat",
7462
+ "email",
7463
+ "extract",
7464
+ "schedule",
7465
+ "worker_run"
7466
+ ]).optional().describe("Filter links by entity type."),
7417
7467
  count: zod.number().min(1).max(listCaseLinksQueryCountMax).default(listCaseLinksQueryCountDefault),
7418
7468
  offset: zod.number().min(listCaseLinksQueryOffsetMin).default(listCaseLinksQueryOffsetDefault),
7419
7469
  sort_by: zod.enum(["created_at"]).default(listCaseLinksQuerySortByDefault),
@@ -7427,6 +7477,7 @@ var ListCaseLinksResponseItem = zod.object({
7427
7477
  "chat",
7428
7478
  "email",
7429
7479
  "extract",
7480
+ "schedule",
7430
7481
  "worker_run"
7431
7482
  ]),
7432
7483
  entity_id: zod.string().uuid(),
@@ -7441,6 +7492,7 @@ var RemoveCaseLinkParams = zod.object({
7441
7492
  "chat",
7442
7493
  "email",
7443
7494
  "extract",
7495
+ "schedule",
7444
7496
  "worker_run"
7445
7497
  ]),
7446
7498
  entityId: zod.string().uuid()
@@ -8170,6 +8222,43 @@ var DeleteScheduleParams = zod.object({
8170
8222
  scheduleId: zod.string().uuid()
8171
8223
  });
8172
8224
  var DeleteScheduleResponse = zod.object({});
8225
+ var listDispatchesQueryCountDefault = 50;
8226
+ var listDispatchesQueryCountMax = 100;
8227
+ var listDispatchesQueryOffsetDefault = 0;
8228
+ var listDispatchesQueryOffsetMin = 0;
8229
+ var listDispatchesQuerySortByDefault = `due_at`;
8230
+ var listDispatchesQuerySortOrderDefault = `desc`;
8231
+ var ListDispatchesQueryParams = zod.object({
8232
+ trigger_type: zod.enum(["schedule"]).optional().describe("Only dispatches produced by this kind of trigger"),
8233
+ trigger_id: zod.string().uuid().optional().describe(
8234
+ "Only dispatches produced by this trigger. Requires `trigger_type`."
8235
+ ),
8236
+ count: zod.number().min(1).max(listDispatchesQueryCountMax).default(listDispatchesQueryCountDefault),
8237
+ offset: zod.number().min(listDispatchesQueryOffsetMin).default(listDispatchesQueryOffsetDefault),
8238
+ sort_by: zod.enum(["due_at"]).default(listDispatchesQuerySortByDefault),
8239
+ sort_order: zod.enum(["asc", "desc"]).default(listDispatchesQuerySortOrderDefault)
8240
+ });
8241
+ var listDispatchesResponseAttemptsMin = -9007199254740991;
8242
+ var listDispatchesResponseAttemptsMax = 9007199254740991;
8243
+ var ListDispatchesResponseItem = zod.object({
8244
+ id: zod.string(),
8245
+ trigger: zod.object({
8246
+ type: zod.enum(["schedule"]),
8247
+ id: zod.string()
8248
+ }),
8249
+ target: zod.union([
8250
+ zod.object({
8251
+ type: zod.enum(["worker_run"]),
8252
+ id: zod.string()
8253
+ }),
8254
+ zod.null()
8255
+ ]),
8256
+ due_at: zod.string().datetime({}),
8257
+ expires_at: zod.string().datetime({}),
8258
+ status: zod.enum(["pending", "dispatched", "abandoned"]),
8259
+ attempts: zod.number().min(listDispatchesResponseAttemptsMin).max(listDispatchesResponseAttemptsMax)
8260
+ });
8261
+ var ListDispatchesResponse = zod.array(ListDispatchesResponseItem);
8173
8262
  var CreateToolBody = zod.object({
8174
8263
  name: zod.string().min(1),
8175
8264
  code: zod.string().min(1),
@@ -9601,6 +9690,14 @@ server.tool(
9601
9690
  },
9602
9691
  deleteScheduleHandler
9603
9692
  );
9693
+ server.tool(
9694
+ "listDispatches",
9695
+ "List dispatches",
9696
+ {
9697
+ queryParams: ListDispatchesQueryParams
9698
+ },
9699
+ listDispatchesHandler
9700
+ );
9604
9701
  server.tool(
9605
9702
  "createTool",
9606
9703
  "Create tool",
@@ -9765,4 +9862,4 @@ var transport = new StdioServerTransport();
9765
9862
  server.connect(transport).then(() => {
9766
9863
  console.error("MCP server running on stdio");
9767
9864
  }).catch(console.error);
9768
- //# sourceMappingURL=server-2B2IEPV6.js.map
9865
+ //# sourceMappingURL=server-WAY4EMQV.js.map