@clipform/mcp-server 4.6.0 → 4.7.1

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.
@@ -5,7 +5,7 @@ import {
5
5
  MCP_SESSION_ID_HEADER,
6
6
  MCP_SESSION_PROOF_HEADER,
7
7
  getMcpAuth
8
- } from "./chunk-BV3KA6HC.js";
8
+ } from "./chunk-ENVV65JX.js";
9
9
  import {
10
10
  isAuthFault,
11
11
  isServerFault,
@@ -2694,6 +2694,26 @@ var ANON_MCP_KEPT_TEXT_KEYS = (() => {
2694
2694
  }
2695
2695
  return out;
2696
2696
  })();
2697
+ function anonValuesAtPath(value, path) {
2698
+ if (path.length === 0) return [value];
2699
+ const [head, ...rest] = path;
2700
+ if (head === "[]") return Array.isArray(value) ? value.flatMap((v) => anonValuesAtPath(v, rest)) : [];
2701
+ if (value && typeof value === "object") return anonValuesAtPath(value[head], rest);
2702
+ return [];
2703
+ }
2704
+ function isAnonMcpLockedNode(node) {
2705
+ if (!node || typeof node.type !== "string") return false;
2706
+ if (ANON_MCP_BLOCKED_NODE_TYPES.includes(node.type)) return true;
2707
+ const isSet = (v) => typeof v === "string" ? v.trim() !== "" : v != null && v !== false;
2708
+ const outbound = ANON_MCP_OUTBOUND_LINK_RULES.some((rule) => {
2709
+ if (rule.type !== node.type) return false;
2710
+ return anonValuesAtPath(node.config, rule.path).some((v) => rule.kind === "equals" ? v === rule.value : isSet(v));
2711
+ });
2712
+ if (outbound) return true;
2713
+ return ANON_MCP_STRIPPED_FIELD_RULES.some(
2714
+ (rule) => rule.type === node.type && anonValuesAtPath(node.config, rule.path).some(isSet)
2715
+ );
2716
+ }
2697
2717
 
2698
2718
  // ../config/form-types.js
2699
2719
  var FORM_TYPES = {
@@ -2957,6 +2977,12 @@ function isInactiveOptionEdge(node, action) {
2957
2977
  return isOptionEdge(action) && !isBranchingActive(node);
2958
2978
  }
2959
2979
 
2980
+ // ../config/anon-mcp-limits.js
2981
+ var ANON_MCP_RESPONSE_CAP = 3;
2982
+ var ANON_MCP_STARTED_SESSION_MULTIPLE = 5;
2983
+ var ANON_MCP_STARTED_SESSION_CAP = ANON_MCP_RESPONSE_CAP * ANON_MCP_STARTED_SESSION_MULTIPLE;
2984
+ var ANON_MCP_LIVE_TTL_DAYS = 7;
2985
+
2960
2986
  // ../config/logic-chain.js
2961
2987
  function outgoingTargets(actions, node) {
2962
2988
  const out = [];
@@ -3400,10 +3426,6 @@ var MCP_TOOL_SECURITY = Object.freeze(
3400
3426
  ])
3401
3427
  )
3402
3428
  );
3403
- var MCP_ANON_PUBLISH_GATE = Object.freeze({
3404
- tool: "clipform_update_form",
3405
- argument: "is_live"
3406
- });
3407
3429
 
3408
3430
  // src/lib/api-client.ts
3409
3431
  function getApiBaseUrl() {
@@ -3583,6 +3605,8 @@ export {
3583
3605
  stripGatedConfigKeys,
3584
3606
  ACTIVE_NODE_TYPES,
3585
3607
  NON_COUNTABLE_TYPES,
3608
+ ANON_MCP_BLOCKED_NODE_TYPES,
3609
+ isAnonMcpLockedNode,
3586
3610
  FORM_TYPES,
3587
3611
  FORM_TYPES_LIST,
3588
3612
  FORM_TYPE_KEYS,
@@ -3591,6 +3615,8 @@ export {
3591
3615
  ALL_VARIANTS,
3592
3616
  resolveFormType,
3593
3617
  getDiscoveryParams,
3618
+ ANON_MCP_RESPONSE_CAP,
3619
+ ANON_MCP_LIVE_TTL_DAYS,
3594
3620
  defaultTarget,
3595
3621
  bfsOrder,
3596
3622
  PLAN_LIMITS,
@@ -3600,7 +3626,6 @@ export {
3600
3626
  MCP_TOOL_TIERS,
3601
3627
  MCP_TOOL_TOOLSETS,
3602
3628
  MCP_TOOL_SECURITY,
3603
- MCP_ANON_PUBLISH_GATE,
3604
3629
  callApi,
3605
3630
  recoveryHint,
3606
3631
  errorResult,
@@ -3609,4 +3634,4 @@ export {
3609
3634
  textResult,
3610
3635
  structuredResult
3611
3636
  };
3612
- //# sourceMappingURL=chunk-FYY23O3F.js.map
3637
+ //# sourceMappingURL=chunk-XC3YMWCN.js.map