@avallon-labs/mcp 68.4.0-staging.1442 → 68.6.0-staging.1447

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-D6Q2EDCI.js");
59
+ await import("./server-OG4M5K3N.js");
60
60
  //# sourceMappingURL=index.js.map
@@ -1453,6 +1453,21 @@ var listWorkerRunMessages = async (workerRunId, params, options) => {
1453
1453
  const data = body ? JSON.parse(body) : {};
1454
1454
  return { data, status: res.status, headers: res.headers };
1455
1455
  };
1456
+ var getGetWorkerRunMessageUrl = (workerRunId, messageId) => {
1457
+ return `/v1/worker-runs/${workerRunId}/messages/${messageId}`;
1458
+ };
1459
+ var getWorkerRunMessage = async (workerRunId, messageId, options) => {
1460
+ const res = await fetch(
1461
+ getGetWorkerRunMessageUrl(workerRunId, messageId),
1462
+ {
1463
+ ...options,
1464
+ method: "GET"
1465
+ }
1466
+ );
1467
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1468
+ const data = body ? JSON.parse(body) : {};
1469
+ return { data, status: res.status, headers: res.headers };
1470
+ };
1456
1471
  var getCancelWorkerRunUrl = (workerRunId) => {
1457
1472
  return `/v1/worker-runs/${workerRunId}/cancel`;
1458
1473
  };
@@ -5946,6 +5961,29 @@ var listWorkerRunMessagesHandler = async (args, options) => {
5946
5961
  structuredContent: res.data
5947
5962
  };
5948
5963
  };
5964
+ var getWorkerRunMessageHandler = async (args, options) => {
5965
+ const res = await getWorkerRunMessage(args.pathParams.workerRunId, args.pathParams.messageId, options);
5966
+ if (res.status >= 400) {
5967
+ return {
5968
+ content: [
5969
+ {
5970
+ type: "text",
5971
+ text: JSON.stringify(res.data ?? null)
5972
+ }
5973
+ ],
5974
+ isError: true
5975
+ };
5976
+ }
5977
+ return {
5978
+ content: [
5979
+ {
5980
+ type: "text",
5981
+ text: JSON.stringify(res.data ?? null)
5982
+ }
5983
+ ],
5984
+ structuredContent: res.data
5985
+ };
5986
+ };
5949
5987
  var cancelWorkerRunHandler = async (args, options) => {
5950
5988
  const res = await cancelWorkerRun(args.pathParams.workerRunId, options);
5951
5989
  if (res.status >= 400) {
@@ -11272,10 +11310,25 @@ var ListWorkerRunMessagesResponse = zod.object({
11272
11310
  "worker_run_id": zod.string(),
11273
11311
  "message": zod.record(zod.string(), zod.unknown()),
11274
11312
  "emitted_at": zod.string().datetime({ "offset": true }),
11275
- "created_at": zod.string().datetime({ "offset": true })
11313
+ "created_at": zod.string().datetime({ "offset": true }),
11314
+ "truncated": zod.boolean().describe("True when the message was too large to fit the page under the response size limit and was replaced by `{ phase?, _truncated, original_bytes, hint }`. Fetch the full message with the Get worker run message (GET /v1/worker-runs/{workerRunId}/messages/{messageId}) endpoint.")
11276
11315
  })),
11277
11316
  "message": zod.string()
11278
11317
  });
11318
+ var GetWorkerRunMessageParams = zod.object({
11319
+ "workerRunId": zod.string().uuid(),
11320
+ "messageId": zod.string().uuid()
11321
+ });
11322
+ var GetWorkerRunMessageResponse = zod.object({
11323
+ "data": zod.object({
11324
+ "id": zod.string(),
11325
+ "worker_run_id": zod.string(),
11326
+ "message": zod.record(zod.string(), zod.unknown()),
11327
+ "emitted_at": zod.string().datetime({ "offset": true }),
11328
+ "created_at": zod.string().datetime({ "offset": true })
11329
+ }),
11330
+ "message": zod.string()
11331
+ });
11279
11332
  var CancelWorkerRunParams = zod.object({
11280
11333
  "workerRunId": zod.string().uuid()
11281
11334
  });
@@ -14365,7 +14418,7 @@ var CreateCaseTypeBody = zod.object({
14365
14418
  "name": zod.string().min(1),
14366
14419
  "fields": zod.array(zod.object({
14367
14420
  "key": zod.string().regex(createCaseTypeBodyFieldsItemKeyRegExp).describe("Permanent, and never reused within the same object, or the case type for top-level fields."),
14368
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]).describe("Permanent."),
14421
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]).describe("Permanent."),
14369
14422
  "list": zod.boolean().default(createCaseTypeBodyFieldsItemListDefault).describe("Permanent."),
14370
14423
  "label": zod.union([zod.string().min(1), zod.null()]).default(createCaseTypeBodyFieldsItemLabelDefault),
14371
14424
  "description": zod.string(),
@@ -14392,7 +14445,7 @@ var CreateCaseTypeResponse = zod.object({
14392
14445
  "key": zod.string(),
14393
14446
  "label": zod.union([zod.string(), zod.null()]),
14394
14447
  "description": zod.string(),
14395
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]),
14448
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]),
14396
14449
  "list": zod.boolean(),
14397
14450
  "nullable": zod.boolean(),
14398
14451
  "enum": zod.union([zod.array(zod.string()), zod.null()]),
@@ -14452,7 +14505,7 @@ var GetCaseTypeResponse = zod.object({
14452
14505
  "key": zod.string(),
14453
14506
  "label": zod.union([zod.string(), zod.null()]),
14454
14507
  "description": zod.string(),
14455
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]),
14508
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]),
14456
14509
  "list": zod.boolean(),
14457
14510
  "nullable": zod.boolean(),
14458
14511
  "enum": zod.union([zod.array(zod.string()), zod.null()]),
@@ -14486,7 +14539,7 @@ var UpdateCaseTypeResponse = zod.object({
14486
14539
  "key": zod.string(),
14487
14540
  "label": zod.union([zod.string(), zod.null()]),
14488
14541
  "description": zod.string(),
14489
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]),
14542
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]),
14490
14543
  "list": zod.boolean(),
14491
14544
  "nullable": zod.boolean(),
14492
14545
  "enum": zod.union([zod.array(zod.string()), zod.null()]),
@@ -14544,7 +14597,7 @@ var GetCaseTypeVersionResponse = zod.object({
14544
14597
  "key": zod.string(),
14545
14598
  "label": zod.union([zod.string(), zod.null()]),
14546
14599
  "description": zod.string(),
14547
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]),
14600
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]),
14548
14601
  "list": zod.boolean(),
14549
14602
  "nullable": zod.boolean(),
14550
14603
  "enum": zod.union([zod.array(zod.string()), zod.null()]),
@@ -14588,7 +14641,7 @@ var createCaseTypeFieldBodyFieldsDefault = [];
14588
14641
  var createCaseTypeFieldBodyParentIdDefault = null;
14589
14642
  var CreateCaseTypeFieldBody = zod.object({
14590
14643
  "key": zod.string().regex(createCaseTypeFieldBodyKeyRegExp).describe("Permanent, and never reused within the same object, or the case type for top-level fields."),
14591
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]).describe("Permanent."),
14644
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]).describe("Permanent."),
14592
14645
  "list": zod.boolean().default(createCaseTypeFieldBodyListDefault).describe("Permanent."),
14593
14646
  "label": zod.union([zod.string().min(1), zod.null()]).default(createCaseTypeFieldBodyLabelDefault),
14594
14647
  "description": zod.string(),
@@ -14597,7 +14650,7 @@ var CreateCaseTypeFieldBody = zod.object({
14597
14650
  "sensitive": zod.boolean().default(createCaseTypeFieldBodySensitiveDefault),
14598
14651
  "fields": zod.array(zod.object({
14599
14652
  "key": zod.string().regex(createCaseTypeFieldBodyFieldsItemKeyRegExp).describe("Permanent, and never reused within the same object, or the case type for top-level fields."),
14600
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]).describe("Permanent."),
14653
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]).describe("Permanent."),
14601
14654
  "list": zod.boolean().default(createCaseTypeFieldBodyFieldsItemListDefault).describe("Permanent."),
14602
14655
  "label": zod.union([zod.string().min(1), zod.null()]).default(createCaseTypeFieldBodyFieldsItemLabelDefault),
14603
14656
  "description": zod.string(),
@@ -14614,7 +14667,7 @@ var CreateCaseTypeFieldResponse = zod.object({
14614
14667
  "key": zod.string(),
14615
14668
  "label": zod.union([zod.string(), zod.null()]),
14616
14669
  "description": zod.string(),
14617
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]),
14670
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]),
14618
14671
  "list": zod.boolean(),
14619
14672
  "nullable": zod.boolean(),
14620
14673
  "enum": zod.union([zod.array(zod.string()), zod.null()]),
@@ -14641,7 +14694,7 @@ var UpdateCaseTypeFieldResponse = zod.object({
14641
14694
  "key": zod.string(),
14642
14695
  "label": zod.union([zod.string(), zod.null()]),
14643
14696
  "description": zod.string(),
14644
- "type": zod.enum(["string", "number", "boolean", "date", "date_time", "object"]),
14697
+ "type": zod.enum(["string", "number", "boolean", "date", "date_time", "case", "object"]),
14645
14698
  "list": zod.boolean(),
14646
14699
  "nullable": zod.boolean(),
14647
14700
  "enum": zod.union([zod.array(zod.string()), zod.null()]),
@@ -16559,7 +16612,7 @@ var createMcpServer = (options) => {
16559
16612
  "listWorkerRunMessages",
16560
16613
  {
16561
16614
  title: "List worker run messages",
16562
- description: "Retrieve messages emitted during a worker run, ordered by emission time. Supports cursor-style pagination via `after` and `count`.",
16615
+ description: "Retrieve messages emitted during a worker run, ordered by emission time. Supports cursor-style pagination via `after` and `count`. When a page would exceed the response size limit, the largest messages are replaced by a hint to the full message and marked `truncated`.",
16563
16616
  inputSchema: {
16564
16617
  pathParams: ListWorkerRunMessagesParams,
16565
16618
  queryParams: ListWorkerRunMessagesQueryParams
@@ -16572,6 +16625,22 @@ var createMcpServer = (options) => {
16572
16625
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
16573
16626
  })
16574
16627
  );
16628
+ tools.getWorkerRunMessage = server2.registerTool(
16629
+ "getWorkerRunMessage",
16630
+ {
16631
+ title: "Get worker run message",
16632
+ description: "Retrieve one message emitted during a worker run, in full. Use it for messages the list endpoint returned with `truncated: true`.",
16633
+ inputSchema: {
16634
+ pathParams: GetWorkerRunMessageParams
16635
+ },
16636
+ outputSchema: GetWorkerRunMessageResponse,
16637
+ annotations: { readOnlyHint: true }
16638
+ },
16639
+ (args, ctx) => getWorkerRunMessageHandler(args, {
16640
+ ...options,
16641
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
16642
+ })
16643
+ );
16575
16644
  tools.cancelWorkerRun = server2.registerTool(
16576
16645
  "cancelWorkerRun",
16577
16646
  {
@@ -18952,4 +19021,4 @@ var transport = new StdioServerTransport();
18952
19021
  server.connect(transport).then(() => {
18953
19022
  console.error("MCP server running on stdio");
18954
19023
  }).catch(console.error);
18955
- //# sourceMappingURL=server-D6Q2EDCI.js.map
19024
+ //# sourceMappingURL=server-OG4M5K3N.js.map