@clipform/mcp-server 2.15.3 → 2.15.4
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.
- package/dist/{chunk-RX6MPMJH.js → chunk-BLUAOHYW.js} +33 -5
- package/dist/{chunk-RX6MPMJH.js.map → chunk-BLUAOHYW.js.map} +1 -1
- package/dist/{chunk-DRU6UFGQ.js → chunk-HZ6FDVRW.js} +2 -2
- package/dist/{chunk-OCE2OPGD.js → chunk-J5ASR5EU.js} +1 -1
- package/dist/{chunk-OCE2OPGD.js.map → chunk-J5ASR5EU.js.map} +1 -1
- package/dist/{chunk-CSAJGIB7.js → chunk-QJFPADOJ.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/prompts.js +2 -2
- package/dist/resources.js +2 -2
- package/dist/server.js +4 -4
- package/package.json +1 -1
- /package/dist/{chunk-DRU6UFGQ.js.map → chunk-HZ6FDVRW.js.map} +0 -0
- /package/dist/{chunk-CSAJGIB7.js.map → chunk-QJFPADOJ.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getWorkflowText,
|
|
7
7
|
objectType,
|
|
8
8
|
registerPrompts
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HZ6FDVRW.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-
|
|
18
|
+
} from "./chunk-QJFPADOJ.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-
|
|
42
|
+
} from "./chunk-J5ASR5EU.js";
|
|
43
43
|
import {
|
|
44
44
|
getMcpAuth,
|
|
45
45
|
runWithMcpTool
|
|
@@ -17119,6 +17119,30 @@ var OPTIONS_DESCRIPTION = (() => {
|
|
|
17119
17119
|
}
|
|
17120
17120
|
return hints.join(" ");
|
|
17121
17121
|
})();
|
|
17122
|
+
function refineNodeOptions(ctx, type, options, basePath) {
|
|
17123
|
+
const def = NODE_TYPES[type];
|
|
17124
|
+
if (!def?.has_options || !options) return;
|
|
17125
|
+
if (def.max_option_length !== void 0) {
|
|
17126
|
+
const cap = def.max_option_length;
|
|
17127
|
+
options.forEach((option, i) => {
|
|
17128
|
+
const len = option.content?.length ?? 0;
|
|
17129
|
+
if (typeof option.content === "string" && len > cap) {
|
|
17130
|
+
ctx.addIssue({
|
|
17131
|
+
code: external_exports.ZodIssueCode.custom,
|
|
17132
|
+
path: [...basePath, "options", i, "content"],
|
|
17133
|
+
message: `${type} option ${i + 1} is ${len} characters; max is ${cap}. Shorten it, or move detail into the node prompt.`
|
|
17134
|
+
});
|
|
17135
|
+
}
|
|
17136
|
+
});
|
|
17137
|
+
}
|
|
17138
|
+
if (def.max_options !== void 0 && options.length > def.max_options) {
|
|
17139
|
+
ctx.addIssue({
|
|
17140
|
+
code: external_exports.ZodIssueCode.custom,
|
|
17141
|
+
path: [...basePath, "options"],
|
|
17142
|
+
message: `${type} has ${options.length} options; max is ${def.max_options}. Remove extras.`
|
|
17143
|
+
});
|
|
17144
|
+
}
|
|
17145
|
+
}
|
|
17122
17146
|
var NodeSchema = external_exports.object({
|
|
17123
17147
|
type: external_exports.enum(ACTIVE_NODE_TYPES2),
|
|
17124
17148
|
prompt: external_exports.string().describe("The text shown to the respondent"),
|
|
@@ -17126,7 +17150,7 @@ var NodeSchema = external_exports.object({
|
|
|
17126
17150
|
required: external_exports.boolean().optional().default(true),
|
|
17127
17151
|
config: external_exports.record(external_exports.unknown()).optional().describe(CONFIG_FIELD_DESCRIPTION),
|
|
17128
17152
|
options: external_exports.array(OptionSchema).optional().describe(OPTIONS_DESCRIPTION)
|
|
17129
|
-
});
|
|
17153
|
+
}).superRefine((node, ctx) => refineNodeOptions(ctx, node.type, node.options, []));
|
|
17130
17154
|
function applyNodeDefaults(node) {
|
|
17131
17155
|
const def = NODE_TYPES[node.type];
|
|
17132
17156
|
if (node.type === "button" && (!node.options || node.options.length === 0)) {
|
|
@@ -18403,6 +18427,10 @@ var NodeUpdateSchema = external_exports.object({
|
|
|
18403
18427
|
options: external_exports.array(OptionSchema).optional().describe(
|
|
18404
18428
|
"Replace all options (for choice nodes). Omit to keep existing options."
|
|
18405
18429
|
)
|
|
18430
|
+
}).superRefine((update, ctx) => {
|
|
18431
|
+
if (update.type && update.options !== void 0) {
|
|
18432
|
+
refineNodeOptions(ctx, update.type, update.options, []);
|
|
18433
|
+
}
|
|
18406
18434
|
});
|
|
18407
18435
|
function registerUpdateNodeTool(server) {
|
|
18408
18436
|
server.registerTool(
|
|
@@ -20723,4 +20751,4 @@ export {
|
|
|
20723
20751
|
buildInstructions,
|
|
20724
20752
|
createServer
|
|
20725
20753
|
};
|
|
20726
|
-
//# sourceMappingURL=chunk-
|
|
20754
|
+
//# sourceMappingURL=chunk-BLUAOHYW.js.map
|