@clipform/mcp-server 5.4.0 → 5.5.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.
@@ -2735,6 +2735,29 @@ var NODE_TYPES = {
2735
2735
  }
2736
2736
  }
2737
2737
  },
2738
+ score_line: {
2739
+ type: "string",
2740
+ label: "Score line",
2741
+ feature: "variables",
2742
+ description: 'Sentence shown with the score, with variable codes (e.g. "You scored {{score}} out of 10"). Replaces the default "You scored X out of Y" line.'
2743
+ },
2744
+ outcomes: {
2745
+ type: "array",
2746
+ label: "Variable-based results",
2747
+ feature: "variables",
2748
+ description: "Show different content based on a number variable. The first outcome whose range (inclusive) holds the variable value wins.",
2749
+ items: {
2750
+ type: "object",
2751
+ required: ["variable_id", "min", "max", "title"],
2752
+ properties: {
2753
+ variable_id: { type: "string", label: "Number variable id" },
2754
+ min: { type: "number", label: "Minimum (inclusive)" },
2755
+ max: { type: "number", label: "Maximum (inclusive)" },
2756
+ title: { type: "string", label: "Title" },
2757
+ message: { type: "string", label: "Message" }
2758
+ }
2759
+ }
2760
+ },
2738
2761
  scoring_results: {
2739
2762
  type: "array",
2740
2763
  label: "Category-based results",
@@ -2842,6 +2865,9 @@ var PUBLIC_RESULTS_EXCLUDED_TYPES = Object.entries(NODE_TYPES).filter(([, v]) =>
2842
2865
  var NON_STEP_TYPES = /* @__PURE__ */ new Set(["button"]);
2843
2866
  var STEP_COUNTED_TYPES = Object.entries(NODE_TYPES).filter(([k, v]) => v.show_nav_bar && !NON_STEP_TYPES.has(k)).map(([k]) => k);
2844
2867
  var RESPONSES_EXCLUDED_TYPES = Object.entries(NODE_TYPES).filter(([, v]) => !(v.show_in_responses ?? v.show_in_results)).map(([k]) => k);
2868
+ function isTerminalType(type) {
2869
+ return NODE_TYPE_METADATA[type]?.is_terminal === true;
2870
+ }
2845
2871
  var ANON_MCP_BLOCKED_NODE_TYPES = Object.entries(NODE_TYPES).filter(([, v]) => v.blocked_for_anon_mcp === true).map(([k]) => k);
2846
2872
  var ANON_MCP_OUTBOUND_LINK_RULES = (() => {
2847
2873
  const rules = [];
@@ -3193,6 +3219,7 @@ function getDiscoveryParams(formType, variant, mode = "full") {
3193
3219
  }
3194
3220
 
3195
3221
  // ../config/logic-types.js
3222
+ var LOGIC_TARGET_TYPES = ["node", "end_screen", "redirect", "link_list"];
3196
3223
  function isBranchingActive(node) {
3197
3224
  if (!node) return true;
3198
3225
  if (isMultiSelectChoice(node)) return false;
@@ -3204,6 +3231,11 @@ function isMultiSelectChoice(node) {
3204
3231
  function isOptionEdge(action) {
3205
3232
  return !!action?.condition?.vars?.some((v) => v.type === "option");
3206
3233
  }
3234
+ function isNodeLevelAction(action, nodeId) {
3235
+ const vars = action?.condition?.vars;
3236
+ if (!vars || vars.some((v) => v.type === "option")) return false;
3237
+ return vars.some((v) => v.type === "node" && (nodeId === void 0 || v.value === nodeId));
3238
+ }
3207
3239
  function isInactiveOptionEdge(node, action) {
3208
3240
  return isOptionEdge(action) && !isBranchingActive(node);
3209
3241
  }
@@ -3942,6 +3974,7 @@ function structuredResult(text, structuredContent) {
3942
3974
 
3943
3975
  export {
3944
3976
  FEATURE_FLAGS,
3977
+ CHOICE_MAX_OPTIONS,
3945
3978
  NODE_TYPES,
3946
3979
  gatedEnumValues,
3947
3980
  gatedConfigKeys,
@@ -3949,6 +3982,7 @@ export {
3949
3982
  ACTIVE_NODE_TYPES,
3950
3983
  NON_COUNTABLE_TYPES,
3951
3984
  PII_NODE_TYPES,
3985
+ isTerminalType,
3952
3986
  ANON_MCP_BLOCKED_NODE_TYPES,
3953
3987
  isAnonMcpLockedNode,
3954
3988
  lettersCapError,
@@ -3960,6 +3994,10 @@ export {
3960
3994
  ALL_VARIANTS,
3961
3995
  resolveFormType,
3962
3996
  getDiscoveryParams,
3997
+ LOGIC_TARGET_TYPES,
3998
+ isOptionEdge,
3999
+ isNodeLevelAction,
4000
+ isInactiveOptionEdge,
3963
4001
  ANON_MCP_RESPONSE_CAP,
3964
4002
  ANON_MCP_LIVE_TTL_DAYS,
3965
4003
  defaultTarget,
@@ -3985,4 +4023,4 @@ export {
3985
4023
  textResult,
3986
4024
  structuredResult
3987
4025
  };
3988
- //# sourceMappingURL=chunk-42DEGWIU.js.map
4026
+ //# sourceMappingURL=chunk-QT2M5FQQ.js.map