@avallon-labs/mcp 68.5.0-staging.1446 → 68.7.0-staging.1449

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-HB2VUDQW.js");
59
+ await import("./server-VKMMSDUD.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
  });
@@ -12778,7 +12831,8 @@ var searchCasesQueryOffsetMin = 0;
12778
12831
  var SearchCasesQueryParams = zod.object({
12779
12832
  "q": zod.string().min(1).describe("Free-text probe. Matched as a normalized substring against the case id, and fuzzily (trigram) against subject and reporter. Id matches rank first."),
12780
12833
  "count": zod.number().min(1).max(searchCasesQueryCountMax).default(searchCasesQueryCountDefault),
12781
- "offset": zod.number().min(searchCasesQueryOffsetMin).default(searchCasesQueryOffsetDefault)
12834
+ "offset": zod.number().min(searchCasesQueryOffsetMin).default(searchCasesQueryOffsetDefault),
12835
+ "environment": zod.enum(["live", "test"]).optional().describe("Environment to search. Defaults to `live`. A worker run may omit this or pass its own run's environment; any other value is rejected.")
12782
12836
  });
12783
12837
  var SearchCasesResponse = zod.object({
12784
12838
  "data": zod.array(zod.object({
@@ -16559,7 +16613,7 @@ var createMcpServer = (options) => {
16559
16613
  "listWorkerRunMessages",
16560
16614
  {
16561
16615
  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`.",
16616
+ 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
16617
  inputSchema: {
16564
16618
  pathParams: ListWorkerRunMessagesParams,
16565
16619
  queryParams: ListWorkerRunMessagesQueryParams
@@ -16572,6 +16626,22 @@ var createMcpServer = (options) => {
16572
16626
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
16573
16627
  })
16574
16628
  );
16629
+ tools.getWorkerRunMessage = server2.registerTool(
16630
+ "getWorkerRunMessage",
16631
+ {
16632
+ title: "Get worker run message",
16633
+ description: "Retrieve one message emitted during a worker run, in full. Use it for messages the list endpoint returned with `truncated: true`.",
16634
+ inputSchema: {
16635
+ pathParams: GetWorkerRunMessageParams
16636
+ },
16637
+ outputSchema: GetWorkerRunMessageResponse,
16638
+ annotations: { readOnlyHint: true }
16639
+ },
16640
+ (args, ctx) => getWorkerRunMessageHandler(args, {
16641
+ ...options,
16642
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
16643
+ })
16644
+ );
16575
16645
  tools.cancelWorkerRun = server2.registerTool(
16576
16646
  "cancelWorkerRun",
16577
16647
  {
@@ -18952,4 +19022,4 @@ var transport = new StdioServerTransport();
18952
19022
  server.connect(transport).then(() => {
18953
19023
  console.error("MCP server running on stdio");
18954
19024
  }).catch(console.error);
18955
- //# sourceMappingURL=server-HB2VUDQW.js.map
19025
+ //# sourceMappingURL=server-VKMMSDUD.js.map