@avallon-labs/mcp 50.0.0 → 50.2.0-staging.1117

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
@@ -46,5 +46,5 @@ function setupFetch() {
46
46
 
47
47
  // src/index.ts
48
48
  setupFetch();
49
- await import("./server-4OQS6KNP.js");
49
+ await import("./server-KFGMB4NJ.js");
50
50
  //# sourceMappingURL=index.js.map
@@ -1933,6 +1933,28 @@ var getCase = async (id, params, options) => {
1933
1933
  const data = body ? JSON.parse(body) : {};
1934
1934
  return { data, status: res.status, headers: res.headers };
1935
1935
  };
1936
+ var getDeleteCaseUrl = (id, params) => {
1937
+ const normalizedParams = new URLSearchParams();
1938
+ Object.entries(params || {}).forEach(([key, value]) => {
1939
+ if (value !== void 0) {
1940
+ normalizedParams.append(key, value === null ? "null" : String(value));
1941
+ }
1942
+ });
1943
+ const stringifiedParams = normalizedParams.toString();
1944
+ return stringifiedParams.length > 0 ? `/v1/cases/${id}?${stringifiedParams}` : `/v1/cases/${id}`;
1945
+ };
1946
+ var deleteCase = async (id, params, options) => {
1947
+ const res = await fetch(
1948
+ getDeleteCaseUrl(id, params),
1949
+ {
1950
+ ...options,
1951
+ method: "DELETE"
1952
+ }
1953
+ );
1954
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1955
+ const data = body ? JSON.parse(body) : {};
1956
+ return { data, status: res.status, headers: res.headers };
1957
+ };
1936
1958
  var getAddCaseLinksUrl = (id, params) => {
1937
1959
  const normalizedParams = new URLSearchParams();
1938
1960
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -2701,6 +2723,21 @@ var listNotifications = async (params, options) => {
2701
2723
  const data = body ? JSON.parse(body) : {};
2702
2724
  return { data, status: res.status, headers: res.headers };
2703
2725
  };
2726
+ var getGetNotificationUrl = (notificationId) => {
2727
+ return `/v1/notifications/${notificationId}`;
2728
+ };
2729
+ var getNotification = async (notificationId, options) => {
2730
+ const res = await fetch(
2731
+ getGetNotificationUrl(notificationId),
2732
+ {
2733
+ ...options,
2734
+ method: "GET"
2735
+ }
2736
+ );
2737
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2738
+ const data = body ? JSON.parse(body) : {};
2739
+ return { data, status: res.status, headers: res.headers };
2740
+ };
2704
2741
  var getCreateInformationRequestUrl = () => {
2705
2742
  return `/v1/information-requests`;
2706
2743
  };
@@ -5482,6 +5519,29 @@ var getCaseHandler = async (args, options) => {
5482
5519
  structuredContent: res.data
5483
5520
  };
5484
5521
  };
5522
+ var deleteCaseHandler = async (args, options) => {
5523
+ const res = await deleteCase(args.pathParams.id, args.queryParams, options);
5524
+ if (res.status >= 400) {
5525
+ return {
5526
+ content: [
5527
+ {
5528
+ type: "text",
5529
+ text: JSON.stringify(res.data ?? null)
5530
+ }
5531
+ ],
5532
+ isError: true
5533
+ };
5534
+ }
5535
+ return {
5536
+ content: [
5537
+ {
5538
+ type: "text",
5539
+ text: JSON.stringify(res.data ?? null)
5540
+ }
5541
+ ],
5542
+ structuredContent: res.data
5543
+ };
5544
+ };
5485
5545
  var addCaseLinksHandler = async (args, options) => {
5486
5546
  const res = await addCaseLinks(args.pathParams.id, args.bodyParams, args.queryParams, options);
5487
5547
  if (res.status >= 400) {
@@ -6379,6 +6439,29 @@ var listNotificationsHandler = async (args, options) => {
6379
6439
  structuredContent: res.data
6380
6440
  };
6381
6441
  };
6442
+ var getNotificationHandler = async (args, options) => {
6443
+ const res = await getNotification(args.pathParams.notificationId, options);
6444
+ if (res.status >= 400) {
6445
+ return {
6446
+ content: [
6447
+ {
6448
+ type: "text",
6449
+ text: JSON.stringify(res.data ?? null)
6450
+ }
6451
+ ],
6452
+ isError: true
6453
+ };
6454
+ }
6455
+ return {
6456
+ content: [
6457
+ {
6458
+ type: "text",
6459
+ text: JSON.stringify(res.data ?? null)
6460
+ }
6461
+ ],
6462
+ structuredContent: res.data
6463
+ };
6464
+ };
6382
6465
  var createInformationRequestHandler = async (args, options) => {
6383
6466
  const res = await createInformationRequest(args.bodyParams, options);
6384
6467
  if (res.status >= 400) {
@@ -9398,6 +9481,16 @@ var GetCaseResponse = zod.object({
9398
9481
  }),
9399
9482
  "message": zod.string()
9400
9483
  });
9484
+ var DeleteCaseParams = zod.object({
9485
+ "id": zod.string().min(1)
9486
+ });
9487
+ var DeleteCaseQueryParams = zod.object({
9488
+ "environment": zod.enum(["live", "test"]).optional().describe("Environment the case belongs to. A case reference is unique per environment, so the same reference can name a different case in each. Defaults to `live`. A worker run may omit this or pass its own run's environment; any other value is rejected.")
9489
+ });
9490
+ var DeleteCaseResponse = zod.object({
9491
+ "data": zod.object({}),
9492
+ "message": zod.string()
9493
+ });
9401
9494
  var AddCaseLinksParams = zod.object({
9402
9495
  "id": zod.string().min(1)
9403
9496
  });
@@ -9762,7 +9855,7 @@ var GetProfileResponse = zod.object({
9762
9855
  "last_name": zod.union([zod.string(), zod.null()]),
9763
9856
  "email": zod.string(),
9764
9857
  "role": zod.enum(["admin", "avallon_admin", "member"]),
9765
- "permissions": zod.array(zod.enum(["voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "information-requests:write", "information-requests:resolve", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write"])),
9858
+ "permissions": zod.array(zod.enum(["voice-agents:write", "voice-agents:promote", "tools:write", "tools:execute", "tools:promote", "extractors:write", "inboxes:write", "inboxes:send", "artifacts:write", "api-keys:write", "teams:write", "cases:write", "cases:delete", "information-requests:write", "information-requests:resolve", "feedback:write", "outbound-jobs:write", "outbound-jobs:schedule", "workers:write", "workers:execute", "workers:write-mcp", "workers:run", "workers:promote", "chat-agents:write", "notifications:write", "prompts:read", "prompts:write", "secrets:read", "secrets:write", "schedules:read", "schedules:write"])),
9766
9859
  "tenants": zod.object({
9767
9860
  "active": zod.object({
9768
9861
  "id": zod.string(),
@@ -10280,6 +10373,34 @@ var ListNotificationsResponse = zod.object({
10280
10373
  "total": zod.number()
10281
10374
  })
10282
10375
  });
10376
+ var GetNotificationParams = zod.object({
10377
+ "notificationId": zod.string().uuid()
10378
+ });
10379
+ var GetNotificationResponse = zod.object({
10380
+ "data": zod.union([zod.object({
10381
+ "id": zod.string(),
10382
+ "title": zod.string().describe("Headline to display"),
10383
+ "body": zod.string().describe("Body text to display"),
10384
+ "created_by": zod.string().describe("Actor that raised the notification"),
10385
+ "created_at": zod.string().datetime({ "offset": true }),
10386
+ "type": zod.literal("worker_issue_reported"),
10387
+ "data": zod.object({
10388
+ "worker_id": zod.string(),
10389
+ "run_id": zod.string()
10390
+ }).describe("The worker and run that reported the issue")
10391
+ }), zod.object({
10392
+ "id": zod.string(),
10393
+ "title": zod.string().describe("Headline to display"),
10394
+ "body": zod.string().describe("Body text to display"),
10395
+ "created_by": zod.string().describe("Actor that raised the notification"),
10396
+ "created_at": zod.string().datetime({ "offset": true }),
10397
+ "type": zod.literal("information_request_created"),
10398
+ "data": zod.object({
10399
+ "request_id": zod.string()
10400
+ }).describe("The information request waiting to be answered")
10401
+ })]),
10402
+ "message": zod.string()
10403
+ });
10283
10404
  var createInformationRequestBodyTitleMax = 120;
10284
10405
  var createInformationRequestBodyQuestionMax = 2e3;
10285
10406
  var CreateInformationRequestBody = zod.object({
@@ -12609,6 +12730,23 @@ var createMcpServer = (options) => {
12609
12730
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
12610
12731
  })
12611
12732
  );
12733
+ tools.deleteCase = server2.registerTool(
12734
+ "deleteCase",
12735
+ {
12736
+ title: "Delete case",
12737
+ description: "Delete a case.\n\nThe case and its links stop being visible; the linked entities themselves are untouched. The id becomes available again \u2014 a case created with the same id afterwards is a new, empty case, not the deleted one.\n\nUnlike removing a case link, this is **not** idempotent: deleting a case that does not exist, or has already been deleted, returns 404.",
12738
+ inputSchema: {
12739
+ pathParams: DeleteCaseParams,
12740
+ queryParams: DeleteCaseQueryParams
12741
+ },
12742
+ outputSchema: DeleteCaseResponse,
12743
+ annotations: { destructiveHint: true, idempotentHint: true }
12744
+ },
12745
+ (args, ctx) => deleteCaseHandler(args, {
12746
+ ...options,
12747
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
12748
+ })
12749
+ );
12612
12750
  tools.addCaseLinks = server2.registerTool(
12613
12751
  "addCaseLinks",
12614
12752
  {
@@ -13235,6 +13373,22 @@ var createMcpServer = (options) => {
13235
13373
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
13236
13374
  })
13237
13375
  );
13376
+ tools.getNotification = server2.registerTool(
13377
+ "getNotification",
13378
+ {
13379
+ title: "Get notification",
13380
+ description: "Retrieve a single notification by its ID, the id a `notification.created` webhook delivery carries.\n\n`title` and `body` are the display text \u2014 render them as-is rather than deriving your own wording from `type`, so every surface says the same thing. `data` carries the identifiers the notification points at, so a client can link to the thing it is about; which keys are present depends on `type`.\n\n`worker_issue_reported` means a worker hit a problem during a run and reported it; its `body` is the worker's own message and its `data` is the reporting `worker_id` and `run_id`. `information_request_created` means a worker paused to ask a person a question; its `data` is the `request_id` to answer through `POST /v1/information-requests/{informationRequestId}/resolve`.",
13381
+ inputSchema: {
13382
+ pathParams: GetNotificationParams
13383
+ },
13384
+ outputSchema: GetNotificationResponse,
13385
+ annotations: { readOnlyHint: true }
13386
+ },
13387
+ (args, ctx) => getNotificationHandler(args, {
13388
+ ...options,
13389
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
13390
+ })
13391
+ );
13238
13392
  tools.createInformationRequest = server2.registerTool(
13239
13393
  "createInformationRequest",
13240
13394
  {
@@ -13769,4 +13923,4 @@ var transport = new StdioServerTransport();
13769
13923
  server.connect(transport).then(() => {
13770
13924
  console.error("MCP server running on stdio");
13771
13925
  }).catch(console.error);
13772
- //# sourceMappingURL=server-4OQS6KNP.js.map
13926
+ //# sourceMappingURL=server-KFGMB4NJ.js.map