@clipform/mcp-server 3.3.1 → 3.3.2

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.
@@ -6,7 +6,7 @@ import {
6
6
  getWorkflowText,
7
7
  objectType,
8
8
  registerPrompts
9
- } from "./chunk-22BV4NSB.js";
9
+ } from "./chunk-5J5N7KTW.js";
10
10
  import {
11
11
  GUIDE_TYPES,
12
12
  QUIZ_VARIANTS,
@@ -15,7 +15,7 @@ import {
15
15
  getGuideUri,
16
16
  guideFallbackText,
17
17
  registerResources
18
- } from "./chunk-ELK26KWM.js";
18
+ } from "./chunk-KHRY3A3M.js";
19
19
  import {
20
20
  ACTIVE_NODE_TYPES,
21
21
  CONTACT_FIELDS,
@@ -39,7 +39,7 @@ import {
39
39
  resolveFormType,
40
40
  structuredResult,
41
41
  textResult
42
- } from "./chunk-SEZ37YSH.js";
42
+ } from "./chunk-65MTGAFF.js";
43
43
  import {
44
44
  getMcpAuth,
45
45
  runWithMcpAuth,
@@ -17368,7 +17368,7 @@ Example: A form that asks a question, collects contact info, then finishes:
17368
17368
  });
17369
17369
  if (!createResult.ok) {
17370
17370
  const message = `Form NOT created (nothing was saved): ${createResult.error}`;
17371
- return isAnonymousAccountRequired(createResult) ? errorResult(message, authChallengeMeta("invalid_token", message)) : errorResult(message);
17371
+ return isAnonymousAccountRequired(createResult) ? errorResult(message, authChallengeMeta("invalid_token", createResult.apiMessage ?? message)) : errorResult(message);
17372
17372
  }
17373
17373
  const { data } = createResult;
17374
17374
  const formId = data.form_id;
@@ -18034,7 +18034,10 @@ function registerUpdateFormTool(server) {
18034
18034
  body
18035
18035
  });
18036
18036
  if (!result.ok) {
18037
- return isAnonymousAccountRequired(result) ? errorResult(result.error, authChallengeMeta("invalid_token", result.error)) : errorResult(result.error);
18037
+ return isAnonymousAccountRequired(result) ? errorResult(
18038
+ result.error,
18039
+ authChallengeMeta("invalid_token", result.apiMessage ?? result.error)
18040
+ ) : errorResult(result.error);
18038
18041
  }
18039
18042
  }
18040
18043
  if (tags) {
@@ -18043,7 +18046,10 @@ function registerUpdateFormTool(server) {
18043
18046
  body: { tags }
18044
18047
  });
18045
18048
  if (!tagResult.ok) {
18046
- return isAnonymousAccountRequired(tagResult) ? errorResult(tagResult.error, authChallengeMeta("invalid_token", tagResult.error)) : errorResult(tagResult.error);
18049
+ return isAnonymousAccountRequired(tagResult) ? errorResult(
18050
+ tagResult.error,
18051
+ authChallengeMeta("invalid_token", tagResult.apiMessage ?? tagResult.error)
18052
+ ) : errorResult(tagResult.error);
18047
18053
  }
18048
18054
  }
18049
18055
  const updates = [];
@@ -18531,8 +18537,9 @@ function registerWhoamiTool(server) {
18531
18537
  return errorResult(result.error);
18532
18538
  }
18533
18539
  const me = result.data;
18534
- const authMode = me.auth_mode ?? "anonymous";
18535
- const isAuthenticated = me.auth_mode != null && me.auth_mode !== "anonymous";
18540
+ const ctx = getMcpAuth();
18541
+ const authMode = ctx?.is_anonymous ? "anonymous" : me.auth_mode ?? "anonymous";
18542
+ const isAuthenticated = authMode !== "anonymous";
18536
18543
  const workspace = me.workspace ? { id: me.workspace.id, name: me.workspace.name } : null;
18537
18544
  const plan = {
18538
18545
  name: me.plan?.name ?? "Free",
@@ -18549,7 +18556,6 @@ function registerWhoamiTool(server) {
18549
18556
  if (Array.isArray(me.workspaces)) {
18550
18557
  structured.workspaces = me.workspaces.map((w) => ({ id: w.id, name: w.name }));
18551
18558
  }
18552
- const ctx = getMcpAuth();
18553
18559
  if (!structured.workspaces && ctx?.listWorkspaces) {
18554
18560
  try {
18555
18561
  const list = await ctx.listWorkspaces();
@@ -18569,6 +18575,11 @@ function registerWhoamiTool(server) {
18569
18575
  `Workspaces you can act in (pass one of these ids as the workspace argument to target it; omit it to use the default): ` + list.map((w) => `${w.name} (${w.id})`).join(", ")
18570
18576
  );
18571
18577
  }
18578
+ if (authMode === "anonymous") {
18579
+ lines.push(
18580
+ "Anonymous session: forms are previews until claimed. Open the claim URL from clipform_create_form (or sign up) to claim the workspace and publish."
18581
+ );
18582
+ }
18572
18583
  if (structured.links) {
18573
18584
  const links = structured.links;
18574
18585
  lines.push(`Dashboard: ${links.dashboard}`, `Forms list: ${links.forms}`);
@@ -20961,4 +20972,4 @@ export {
20961
20972
  buildInstructions,
20962
20973
  createServer
20963
20974
  };
20964
- //# sourceMappingURL=chunk-4XCXDH3I.js.map
20975
+ //# sourceMappingURL=chunk-7I765YTD.js.map