@avallon-labs/mcp 24.4.0 → 24.5.0-staging.624

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-OPB36ISW.js");
57
+ await import("./server-LGUDOZI2.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -682,6 +682,35 @@ var experimentalSignIn = async (experimentalSignInBody, options) => {
682
682
  headers: res.headers
683
683
  };
684
684
  };
685
+ var getExperimentalGetOAuthUrlUrl = (params) => {
686
+ const normalizedParams = new URLSearchParams();
687
+ Object.entries(params || {}).forEach(([key, value]) => {
688
+ if (value !== void 0) {
689
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
690
+ for (const [sk, sv] of Object.entries(value)) {
691
+ if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
692
+ }
693
+ } else {
694
+ normalizedParams.append(key, value === null ? "null" : String(value));
695
+ }
696
+ }
697
+ });
698
+ const stringifiedParams = normalizedParams.toString();
699
+ return stringifiedParams.length > 0 ? `/experimental/auth/oauth-url?${stringifiedParams}` : `/experimental/auth/oauth-url`;
700
+ };
701
+ var experimentalGetOAuthUrl = async (params, options) => {
702
+ const res = await fetch(getExperimentalGetOAuthUrlUrl(params), {
703
+ ...options,
704
+ method: "GET"
705
+ });
706
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
707
+ const data = body ? JSON.parse(body) : {};
708
+ return {
709
+ data,
710
+ status: res.status,
711
+ headers: res.headers
712
+ };
713
+ };
685
714
  var getListCallsUrl = (params) => {
686
715
  const normalizedParams = new URLSearchParams();
687
716
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -2695,6 +2724,17 @@ var experimentalSignInHandler = async (args) => {
2695
2724
  ]
2696
2725
  };
2697
2726
  };
2727
+ var experimentalGetOAuthUrlHandler = async (args) => {
2728
+ const res = await experimentalGetOAuthUrl(args.queryParams);
2729
+ return {
2730
+ content: [
2731
+ {
2732
+ type: "text",
2733
+ text: JSON.stringify(res)
2734
+ }
2735
+ ]
2736
+ };
2737
+ };
2698
2738
  var listCallsHandler = async (args) => {
2699
2739
  const res = await listCalls(args.queryParams);
2700
2740
  return {
@@ -5137,6 +5177,15 @@ var ExperimentalSignInResponse = zod.object({
5137
5177
  refresh_token: zod.string(),
5138
5178
  expires_at: zod.string().datetime({})
5139
5179
  });
5180
+ var ExperimentalGetOAuthUrlQueryParams = zod.object({
5181
+ provider: zod.enum(["google", "microsoft"]),
5182
+ redirect_uri: zod.string().url(),
5183
+ code_challenge_method: zod.enum(["s256"]),
5184
+ code_challenge: zod.string().min(1)
5185
+ });
5186
+ var ExperimentalGetOAuthUrlResponse = zod.object({
5187
+ url: zod.string().url()
5188
+ });
5140
5189
  var listCallsQueryCountDefault = 50;
5141
5190
  var listCallsQueryCountMax = 100;
5142
5191
  var listCallsQueryOffsetDefault = 0;
@@ -7155,6 +7204,14 @@ server.tool(
7155
7204
  },
7156
7205
  experimentalSignInHandler
7157
7206
  );
7207
+ server.tool(
7208
+ "experimentalGetOAuthUrl",
7209
+ "Get OAuth sign-in URL (experimental)",
7210
+ {
7211
+ queryParams: ExperimentalGetOAuthUrlQueryParams
7212
+ },
7213
+ experimentalGetOAuthUrlHandler
7214
+ );
7158
7215
  server.tool(
7159
7216
  "listCalls",
7160
7217
  "List calls",
@@ -7802,4 +7859,4 @@ var transport = new StdioServerTransport();
7802
7859
  server.connect(transport).then(() => {
7803
7860
  console.error("MCP server running on stdio");
7804
7861
  }).catch(console.error);
7805
- //# sourceMappingURL=server-OPB36ISW.js.map
7862
+ //# sourceMappingURL=server-LGUDOZI2.js.map