@clipform/mcp-server 4.9.0 → 4.10.0

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
  recoveryHint,
7
7
  structuredResult,
8
8
  textResult
9
- } from "./chunk-B2ZAUNEV.js";
9
+ } from "./chunk-RCV5SMNI.js";
10
10
  import "./chunk-ENVV65JX.js";
11
11
  import "./chunk-PBQ5BQWD.js";
12
12
  import "./chunk-PZ5AY32C.js";
@@ -29,7 +29,7 @@ import {
29
29
  union,
30
30
  unknown,
31
31
  url
32
- } from "./chunk-M2MJW3DQ.js";
32
+ } from "./chunk-UOS5NXG6.js";
33
33
  import {
34
34
  GUIDE_TYPES,
35
35
  QUIZ_VARIANTS,
@@ -38,7 +38,7 @@ import {
38
38
  getGuideUri,
39
39
  guideFallbackText,
40
40
  registerResources
41
- } from "./chunk-IRNJOS6W.js";
41
+ } from "./chunk-LMOMZNIZ.js";
42
42
  import {
43
43
  ANON_PREVIEW_LINK_LABEL,
44
44
  ANON_PREVIEW_NOTICE,
@@ -52,7 +52,7 @@ import {
52
52
  isPreviewViewerUrl,
53
53
  previewOnlyNotice,
54
54
  withAdoptedNotice
55
- } from "./chunk-MON5YGPS.js";
55
+ } from "./chunk-RJEDJCRG.js";
56
56
  import {
57
57
  ACTIVE_NODE_TYPES,
58
58
  ANON_MCP_BLOCKED_NODE_TYPES,
@@ -67,6 +67,7 @@ import {
67
67
  MCP_TOOL_TOOLSETS,
68
68
  NODE_TYPES,
69
69
  NON_COUNTABLE_TYPES,
70
+ PII_NODE_TYPES,
70
71
  authChallengeMeta,
71
72
  bfsOrder,
72
73
  callApi,
@@ -80,7 +81,7 @@ import {
80
81
  stripGatedConfigKeys,
81
82
  structuredResult,
82
83
  textResult
83
- } from "./chunk-B2ZAUNEV.js";
84
+ } from "./chunk-RCV5SMNI.js";
84
85
  import {
85
86
  getMcpAuth,
86
87
  runWithMcpAuth,
@@ -17499,6 +17500,10 @@ function projectNode(node) {
17499
17500
  total_responses: node.total_responses,
17500
17501
  total_views: node.total_views
17501
17502
  };
17503
+ const meta = NODE_TYPES[node.node_type];
17504
+ if (meta && (meta.pii || meta.respondent_media === "files" || meta.respondent_media === "drawing")) {
17505
+ return base;
17506
+ }
17502
17507
  if (node.node_type === "choice") {
17503
17508
  const answers = node.answers;
17504
17509
  return {
@@ -17622,15 +17627,14 @@ function registerGetResultsTool(server) {
17622
17627
  var MAX_ANSWER_LENGTH = 300;
17623
17628
  var DEFAULT_LIMIT = 20;
17624
17629
  var MAX_LIMIT = 50;
17625
- var REDACTED_TYPES = {
17626
- details: "[contact details - view in dashboard]",
17627
- contact: "[contact details - view in dashboard]",
17628
- file_upload: "[file upload - view in dashboard]",
17629
- // payment is handled by paymentSummary() before this map - it surfaces a
17630
- // non-PII amount/status line rather than a flat placeholder.
17631
- open: ""
17632
- // open is redacted ONLY when the answer is a recording (handled below)
17633
- };
17630
+ var REDACTED_TYPES = Object.fromEntries([
17631
+ // PII except payment: payment is handled by paymentSummary() before this map
17632
+ // and surfaces a non-PII amount/status line rather than a flat placeholder.
17633
+ ...PII_NODE_TYPES.filter((t) => t !== "payment").map((t) => [t, t === "booking" ? "[booking details - view in dashboard]" : "[contact details - view in dashboard]"]),
17634
+ // Stored files and drawings: always media. `recording` (open) is NOT here -
17635
+ // open is redacted ONLY when the answer is a recording (handled below).
17636
+ ...Object.entries(NODE_TYPES).filter(([, v]) => v.respondent_media === "files" || v.respondent_media === "drawing").map(([t, v]) => [t, `[${v.label.toLowerCase()} - view in dashboard]`])
17637
+ ]);
17634
17638
  function truncate(s, n = MAX_ANSWER_LENGTH) {
17635
17639
  return s.length > n ? `${s.slice(0, n - 1)}\u2026` : s;
17636
17640
  }
@@ -18372,7 +18376,7 @@ function registerCompleteMediaUploadTool(server) {
18372
18376
  }
18373
18377
 
18374
18378
  // src/tools/attach-node-media.ts
18375
- var MEDIA_SUPPORTED_TYPES = Object.entries(NODE_TYPES).filter(([, def]) => def.supports_media).map(([type]) => type);
18379
+ var MEDIA_SUPPORTED_TYPES = Object.entries(NODE_TYPES).filter(([type, def]) => def.supports_media && (type !== "booking" || def.is_active)).map(([type]) => type);
18376
18380
  var AttachMediaItemSchema = external_exports.object({
18377
18381
  node_id: external_exports.string().describe("The node ID"),
18378
18382
  media_asset_id: external_exports.string().describe("A media asset ID returned by clipform_upload_media_asset"),
@@ -20388,4 +20392,4 @@ export {
20388
20392
  * MIT Licensed
20389
20393
  *)
20390
20394
  */
20391
- //# sourceMappingURL=chunk-DAS5LNUP.js.map
20395
+ //# sourceMappingURL=chunk-73ITJK4L.js.map