@clipform/mcp-server 5.7.1 → 5.8.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.
- package/dist/api-client.d.ts +34 -1
- package/dist/api-client.js +8 -1
- package/dist/{chunk-7UIXBPTS.js → chunk-5AODH5TC.js} +3 -3
- package/dist/{chunk-D65NJDP5.js → chunk-7PJHCRSD.js} +58 -1
- package/dist/chunk-7PJHCRSD.js.map +1 -0
- package/dist/{chunk-7F36T6AQ.js → chunk-EQPYULVM.js} +79 -59
- package/dist/{chunk-7F36T6AQ.js.map → chunk-EQPYULVM.js.map} +1 -1
- package/dist/{chunk-7M2APEB6.js → chunk-HHRUYPFP.js} +2 -2
- package/dist/chunk-XO7XBMRY.js +15 -0
- package/dist/chunk-XO7XBMRY.js.map +1 -0
- package/dist/{chunk-S4S6H7GF.js → chunk-YFOTTAGR.js} +3 -3
- package/dist/{chunk-S4S6H7GF.js.map → chunk-YFOTTAGR.js.map} +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/instrument.js +9 -0
- package/dist/instrument.js.map +1 -1
- package/dist/prompts.js +4 -3
- package/dist/resources.js +4 -3
- package/dist/server.js +6 -5
- package/package.json +1 -1
- package/server.json +2 -2
- package/dist/chunk-D65NJDP5.js.map +0 -1
- /package/dist/{chunk-7UIXBPTS.js.map → chunk-5AODH5TC.js.map} +0 -0
- /package/dist/{chunk-7M2APEB6.js.map → chunk-HHRUYPFP.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CURRENT_PLAN_VERSIONS,
|
|
3
3
|
PLAN_LIMITS,
|
|
4
4
|
callApi
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7PJHCRSD.js";
|
|
6
6
|
import {
|
|
7
7
|
getMcpAuth
|
|
8
8
|
} from "./chunk-ENVV65JX.js";
|
|
@@ -145,4 +145,4 @@ export {
|
|
|
145
145
|
getSessionContextWithAuth,
|
|
146
146
|
getSessionContext
|
|
147
147
|
};
|
|
148
|
-
//# sourceMappingURL=chunk-
|
|
148
|
+
//# sourceMappingURL=chunk-HHRUYPFP.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/lib/error-kind.ts
|
|
2
|
+
var ERROR_KIND_META_KEY = "io.clipform/error_kind";
|
|
3
|
+
var SDK_INPUT_VALIDATION_PREFIX = "Input validation error";
|
|
4
|
+
function classifyToolError(response, errorMessage) {
|
|
5
|
+
const meta = response?._meta;
|
|
6
|
+
if (meta?.[ERROR_KIND_META_KEY] === "refused") return "refused";
|
|
7
|
+
if (typeof errorMessage === "string" && errorMessage.startsWith(SDK_INPUT_VALIDATION_PREFIX)) return "refused";
|
|
8
|
+
return "failed";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
ERROR_KIND_META_KEY,
|
|
13
|
+
classifyToolError
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=chunk-XO7XBMRY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/error-kind.ts"],"sourcesContent":["/**\n * #5917: labels an error tool result as a correct refusal of a caller mistake\n * (`refusedResult` / `apiErrorResult` in api-client.ts set it on `_meta`).\n * instrument.ts reads it into `mcp_error_kind` on `$mcp_tool_call`, so\n * telemetry tells \"refused\" apart from \"failed\". Leaf module with no imports,\n * so the `./instrument` entry stays self-contained.\n */\nexport const ERROR_KIND_META_KEY = \"io.clipform/error_kind\";\n\nexport type McpErrorKind = \"refused\" | \"failed\";\n\n/** The MCP SDK's own input-schema rejection (SEP-1303): always a caller mistake. */\nconst SDK_INPUT_VALIDATION_PREFIX = \"Input validation error\";\n\n/** Classifies an errored tool call from its result and error message. */\nexport function classifyToolError(response: unknown, errorMessage: unknown): McpErrorKind {\n const meta = (response as { _meta?: Record<string, unknown> } | null | undefined)?._meta;\n if (meta?.[ERROR_KIND_META_KEY] === \"refused\") return \"refused\";\n if (typeof errorMessage === \"string\" && errorMessage.startsWith(SDK_INPUT_VALIDATION_PREFIX)) return \"refused\";\n return \"failed\";\n}\n"],"mappings":";AAOO,IAAM,sBAAsB;AAKnC,IAAM,8BAA8B;AAG7B,SAAS,kBAAkB,UAAmB,cAAqC;AACxF,QAAM,OAAQ,UAAqE;AACnF,MAAI,OAAO,mBAAmB,MAAM,UAAW,QAAO;AACtD,MAAI,OAAO,iBAAiB,YAAY,aAAa,WAAW,2BAA2B,EAAG,QAAO;AACrG,SAAO;AACT;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FULL_CAPS,
|
|
3
3
|
getSessionContextWithAuth
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HHRUYPFP.js";
|
|
5
5
|
import {
|
|
6
6
|
FORM_TYPES,
|
|
7
7
|
MAX_CLIP_SECONDS,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
WORKFLOW_TYPES,
|
|
11
11
|
exposedCompositionIds,
|
|
12
12
|
getDiscoveryParams
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PJHCRSD.js";
|
|
14
14
|
import {
|
|
15
15
|
__export
|
|
16
16
|
} from "./chunk-PZ5AY32C.js";
|
|
@@ -15259,4 +15259,4 @@ export {
|
|
|
15259
15259
|
getWorkflowText,
|
|
15260
15260
|
registerPrompts
|
|
15261
15261
|
};
|
|
15262
|
-
//# sourceMappingURL=chunk-
|
|
15262
|
+
//# sourceMappingURL=chunk-YFOTTAGR.js.map
|