@avallon-labs/mcp 51.1.0 → 51.3.0-staging.1139

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-6DAEBJ2W.js");
49
+ await import("./server-DACHXX2C.js");
50
50
  //# sourceMappingURL=index.js.map
@@ -2529,6 +2529,44 @@ var removeMember = async (id, options) => {
2529
2529
  const data = body ? JSON.parse(body) : void 0;
2530
2530
  return { data, status: res.status, headers: res.headers };
2531
2531
  };
2532
+ var getGetTenantSettingsUrl = () => {
2533
+ return `/v1/tenant`;
2534
+ };
2535
+ var getTenantSettings = async (options) => {
2536
+ const res = await fetch(
2537
+ getGetTenantSettingsUrl(),
2538
+ {
2539
+ ...options,
2540
+ method: "GET"
2541
+ }
2542
+ );
2543
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2544
+ const data = body ? JSON.parse(body) : {};
2545
+ return { data, status: res.status, headers: res.headers };
2546
+ };
2547
+ var getUpdateTenantSettingsUrl = () => {
2548
+ return `/v1/tenant`;
2549
+ };
2550
+ var updateTenantSettings = async (updateTenantSettingsBody, options) => {
2551
+ const getHeaders = (h) => {
2552
+ if (!h) return {};
2553
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2554
+ if (Array.isArray(h)) return Object.fromEntries(h);
2555
+ return h;
2556
+ };
2557
+ const res = await fetch(
2558
+ getUpdateTenantSettingsUrl(),
2559
+ {
2560
+ ...options,
2561
+ method: "PATCH",
2562
+ headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
2563
+ body: JSON.stringify(updateTenantSettingsBody)
2564
+ }
2565
+ );
2566
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2567
+ const data = body ? JSON.parse(body) : {};
2568
+ return { data, status: res.status, headers: res.headers };
2569
+ };
2532
2570
  var getCreateSecretUrl = () => {
2533
2571
  return `/v1/secrets`;
2534
2572
  };
@@ -6255,6 +6293,52 @@ var removeMemberHandler = async (args, options) => {
6255
6293
  structuredContent: res.data
6256
6294
  };
6257
6295
  };
6296
+ var getTenantSettingsHandler = async (options) => {
6297
+ const res = await getTenantSettings(options);
6298
+ if (res.status >= 400) {
6299
+ return {
6300
+ content: [
6301
+ {
6302
+ type: "text",
6303
+ text: JSON.stringify(res.data ?? null)
6304
+ }
6305
+ ],
6306
+ isError: true
6307
+ };
6308
+ }
6309
+ return {
6310
+ content: [
6311
+ {
6312
+ type: "text",
6313
+ text: JSON.stringify(res.data ?? null)
6314
+ }
6315
+ ],
6316
+ structuredContent: res.data
6317
+ };
6318
+ };
6319
+ var updateTenantSettingsHandler = async (args, options) => {
6320
+ const res = await updateTenantSettings(args.bodyParams, options);
6321
+ if (res.status >= 400) {
6322
+ return {
6323
+ content: [
6324
+ {
6325
+ type: "text",
6326
+ text: JSON.stringify(res.data ?? null)
6327
+ }
6328
+ ],
6329
+ isError: true
6330
+ };
6331
+ }
6332
+ return {
6333
+ content: [
6334
+ {
6335
+ type: "text",
6336
+ text: JSON.stringify(res.data ?? null)
6337
+ }
6338
+ ],
6339
+ structuredContent: res.data
6340
+ };
6341
+ };
6258
6342
  var createSecretHandler = async (args, options) => {
6259
6343
  const res = await createSecret(args.bodyParams, options);
6260
6344
  if (res.status >= 400) {
@@ -10352,7 +10436,7 @@ var GetProfileResponse = zod.object({
10352
10436
  "last_name": zod.union([zod.string(), zod.null()]),
10353
10437
  "email": zod.string(),
10354
10438
  "role": zod.enum(["admin", "avallon_admin", "member"]),
10355
- "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"])),
10439
+ "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", "tenants:write"])),
10356
10440
  "tenants": zod.object({
10357
10441
  "active": zod.object({
10358
10442
  "id": zod.string(),
@@ -10422,7 +10506,7 @@ var UpdateMemberRoleParams = zod.object({
10422
10506
  "id": zod.string().uuid()
10423
10507
  });
10424
10508
  var UpdateMemberRoleBody = zod.object({
10425
- "role": zod.enum(["admin", "member"])
10509
+ "role": zod.enum(["admin", "avallon_admin", "member"])
10426
10510
  });
10427
10511
  var UpdateMemberRoleResponse = zod.object({
10428
10512
  "data": zod.object({
@@ -10440,6 +10524,25 @@ var RemoveMemberParams = zod.object({
10440
10524
  "id": zod.string().uuid()
10441
10525
  });
10442
10526
  var RemoveMemberResponse = zod.void();
10527
+ var GetTenantSettingsResponse = zod.object({
10528
+ "data": zod.object({
10529
+ "id": zod.string(),
10530
+ "name": zod.string(),
10531
+ "approval_gates_enabled": zod.boolean()
10532
+ }),
10533
+ "message": zod.string()
10534
+ });
10535
+ var UpdateTenantSettingsBody = zod.object({
10536
+ "approval_gates_enabled": zod.boolean().describe("When true, a worker version can only be promoted to live by someone who did not author any version between the current live version and the candidate.")
10537
+ });
10538
+ var UpdateTenantSettingsResponse = zod.object({
10539
+ "data": zod.object({
10540
+ "id": zod.string(),
10541
+ "name": zod.string(),
10542
+ "approval_gates_enabled": zod.boolean()
10543
+ }),
10544
+ "message": zod.string()
10545
+ });
10443
10546
  var createSecretBodyNameMax = 100;
10444
10547
  var createSecretBodyEnvKeyMax = 128;
10445
10548
  var createSecretBodyEnvKeyRegExp = new RegExp("^[A-Z][A-Z0-9_]*$");
@@ -13710,6 +13813,35 @@ var createMcpServer = (options) => {
13710
13813
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
13711
13814
  })
13712
13815
  );
13816
+ tools.getTenantSettings = server2.registerTool(
13817
+ "getTenantSettings",
13818
+ {
13819
+ title: "Get tenant settings",
13820
+ description: "Retrieve the settings of the current tenant.",
13821
+ outputSchema: GetTenantSettingsResponse,
13822
+ annotations: { readOnlyHint: true }
13823
+ },
13824
+ (ctx) => getTenantSettingsHandler({
13825
+ ...options,
13826
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
13827
+ })
13828
+ );
13829
+ tools.updateTenantSettings = server2.registerTool(
13830
+ "updateTenantSettings",
13831
+ {
13832
+ title: "Update tenant settings",
13833
+ description: "Update settings of the current tenant. Requires the `tenants:write` permission, which only Avallon admins hold.",
13834
+ inputSchema: {
13835
+ bodyParams: UpdateTenantSettingsBody.optional()
13836
+ },
13837
+ outputSchema: UpdateTenantSettingsResponse,
13838
+ annotations: { destructiveHint: true }
13839
+ },
13840
+ (args, ctx) => updateTenantSettingsHandler(args, {
13841
+ ...options,
13842
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
13843
+ })
13844
+ );
13713
13845
  tools.createSecret = server2.registerTool(
13714
13846
  "createSecret",
13715
13847
  {
@@ -14454,4 +14586,4 @@ var transport = new StdioServerTransport();
14454
14586
  server.connect(transport).then(() => {
14455
14587
  console.error("MCP server running on stdio");
14456
14588
  }).catch(console.error);
14457
- //# sourceMappingURL=server-6DAEBJ2W.js.map
14589
+ //# sourceMappingURL=server-DACHXX2C.js.map