@clipform/mcp-server 5.0.0 → 5.1.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.
@@ -29,7 +29,7 @@ import {
29
29
  union,
30
30
  unknown,
31
31
  url
32
- } from "./chunk-DEVQTVXL.js";
32
+ } from "./chunk-WZ4LCPSY.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-LTLKJKNR.js";
41
+ } from "./chunk-DWFBJMC5.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-RFKLWZJV.js";
55
+ } from "./chunk-25QAMDHS.js";
56
56
  import {
57
57
  ACTIVE_NODE_TYPES,
58
58
  ANON_MCP_BLOCKED_NODE_TYPES,
@@ -76,6 +76,7 @@ import {
76
76
  errorResult,
77
77
  exposedCompositionIds,
78
78
  gatedConfigKeys,
79
+ gatedEnumValues,
79
80
  isAnonMcpLockedNode,
80
81
  isAnonymousAccountRequired,
81
82
  lettersCapError,
@@ -84,7 +85,7 @@ import {
84
85
  stripGatedConfigKeys,
85
86
  structuredResult,
86
87
  textResult
87
- } from "./chunk-ZZYBRWG3.js";
88
+ } from "./chunk-QED4R32Z.js";
88
89
  import {
89
90
  getMcpAuth,
90
91
  runWithMcpAuth,
@@ -16148,7 +16149,8 @@ function generateConfigSummary(configSchema, typeKey) {
16148
16149
  if (gated.has(key)) continue;
16149
16150
  if (!FEATURE_FLAGS.ENABLE_CUSTOM_SCORES && CUSTOM_SCORES_GATED_KEYS.has(key)) continue;
16150
16151
  if (prop.enum) {
16151
- const vals = prop.enum.map((v) => `"${v}"`).join("|");
16152
+ const hiddenVals = typeKey ? gatedEnumValues(typeKey, key) : /* @__PURE__ */ new Set();
16153
+ const vals = prop.enum.filter((v) => !hiddenVals.has(v)).map((v) => `"${v}"`).join("|");
16152
16154
  let s = `${key} (${vals}`;
16153
16155
  if (prop.default !== void 0) s += `, default: "${prop.default}"`;
16154
16156
  s += ")";
@@ -16300,6 +16302,24 @@ function gatedConfigKeysOnEveryType() {
16300
16302
  }
16301
16303
  return new Set([...gatedBy].filter(([, g]) => g).map(([k]) => k));
16302
16304
  }
16305
+ function gatedEnumValuesOnEveryType() {
16306
+ const gatedBy = /* @__PURE__ */ new Map();
16307
+ for (const [type, def] of Object.entries(NODE_TYPES)) {
16308
+ for (const [key, prop] of Object.entries(def.config_schema?.properties ?? {})) {
16309
+ if (!Array.isArray(prop?.enum)) continue;
16310
+ const gated = gatedEnumValues(type, key);
16311
+ const byValue = gatedBy.get(key) ?? /* @__PURE__ */ new Map();
16312
+ for (const value of prop.enum) byValue.set(value, (byValue.get(value) ?? true) && gated.has(value));
16313
+ gatedBy.set(key, byValue);
16314
+ }
16315
+ }
16316
+ const out = /* @__PURE__ */ new Map();
16317
+ for (const [key, byValue] of gatedBy) {
16318
+ const values = [...byValue].filter(([, g]) => g).map(([v]) => v);
16319
+ if (values.length > 0) out.set(key, new Set(values));
16320
+ }
16321
+ return out;
16322
+ }
16303
16323
  function ignoredConfigNote(keys) {
16304
16324
  return `Ignored unsupported config key(s): ${keys.join(", ")}.`;
16305
16325
  }
@@ -17051,12 +17071,15 @@ function allowedConfigKeys(nodeType) {
17051
17071
  }
17052
17072
  return /* @__PURE__ */ new Set();
17053
17073
  }
17074
+ var HIDDEN_CONFIG_KEYS = /* @__PURE__ */ new Set(["workspace_integration_id"]);
17054
17075
  function projectConfig(nodeType, config) {
17055
17076
  if (!config) return void 0;
17056
17077
  const allowed = allowedConfigKeys(nodeType);
17057
17078
  const projected = {};
17058
17079
  for (const [key, value] of Object.entries(config)) {
17059
- if (allowed.has(key)) projected[key] = value;
17080
+ if (!allowed.has(key) || HIDDEN_CONFIG_KEYS.has(key)) continue;
17081
+ if (typeof value === "string" && gatedEnumValues(nodeType, key).has(value)) continue;
17082
+ projected[key] = value;
17060
17083
  }
17061
17084
  return projected;
17062
17085
  }
@@ -18044,8 +18067,10 @@ function registerUpdateNodeTool(server) {
18044
18067
  ({ config, dropped: droppedKeys } = stripGatedConfigKeys(type, rawConfig));
18045
18068
  } else {
18046
18069
  const gated = gatedConfigKeysOnEveryType();
18047
- droppedKeys = Object.keys(rawConfig).filter((k) => gated.has(k));
18048
- if (droppedKeys.length > 0) config = Object.fromEntries(Object.entries(rawConfig).filter(([k]) => !gated.has(k)));
18070
+ const gatedValues = gatedEnumValuesOnEveryType();
18071
+ const isGated = ([k, v]) => gated.has(k) || typeof v === "string" && (gatedValues.get(k)?.has(v) ?? false);
18072
+ droppedKeys = Object.entries(rawConfig).filter(isGated).map(([k]) => k);
18073
+ if (droppedKeys.length > 0) config = Object.fromEntries(Object.entries(rawConfig).filter((e) => !isGated(e)));
18049
18074
  }
18050
18075
  }
18051
18076
  const body = {};
@@ -20455,4 +20480,4 @@ export {
20455
20480
  * MIT Licensed
20456
20481
  *)
20457
20482
  */
20458
- //# sourceMappingURL=chunk-VERNZWHH.js.map
20483
+ //# sourceMappingURL=chunk-RHMP5D55.js.map