@clipform/mcp-server 2.1.2 → 2.2.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.
- package/README.md +1 -0
- package/dist/{chunk-HG3FYVTR.js → chunk-AHJXNS4R.js} +2 -2
- package/dist/{chunk-TTSO4ZPG.js → chunk-HWGDTUKS.js} +2 -2
- package/dist/{chunk-CNEUXDNC.js → chunk-VY52B6DR.js} +6 -4
- package/dist/chunk-VY52B6DR.js.map +1 -0
- package/dist/{chunk-MU3YSUGG.js → chunk-ZGXMBGOB.js} +64 -6
- package/dist/chunk-ZGXMBGOB.js.map +1 -0
- 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-CNEUXDNC.js.map +0 -1
- package/dist/chunk-MU3YSUGG.js.map +0 -1
- /package/dist/{chunk-HG3FYVTR.js.map → chunk-AHJXNS4R.js.map} +0 -0
- /package/dist/{chunk-TTSO4ZPG.js.map → chunk-HWGDTUKS.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getWorkflowText,
|
|
7
7
|
objectType,
|
|
8
8
|
registerPrompts
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HWGDTUKS.js";
|
|
10
10
|
import {
|
|
11
11
|
GUIDE_TYPES,
|
|
12
12
|
QUIZ_VARIANTS,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getGuideUri,
|
|
15
15
|
guideFallbackText,
|
|
16
16
|
registerResources
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AHJXNS4R.js";
|
|
18
18
|
import {
|
|
19
19
|
ACTIVE_NODE_TYPES,
|
|
20
20
|
BUSINESS,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
resolveFormType,
|
|
34
34
|
structuredResult,
|
|
35
35
|
textResult
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-VY52B6DR.js";
|
|
37
37
|
import {
|
|
38
38
|
__commonJS,
|
|
39
39
|
__export,
|
|
@@ -17041,6 +17041,15 @@ function formatDefaultConfig(defaultConfig) {
|
|
|
17041
17041
|
if (!defaultConfig) return "";
|
|
17042
17042
|
const filtered = { ...defaultConfig };
|
|
17043
17043
|
delete filtered.options;
|
|
17044
|
+
if (filtered.choice && typeof filtered.choice === "object" && "record_scores" in filtered.choice) {
|
|
17045
|
+
const choice = { ...filtered.choice };
|
|
17046
|
+
delete choice.record_scores;
|
|
17047
|
+
if (Object.keys(choice).length === 0) {
|
|
17048
|
+
delete filtered.choice;
|
|
17049
|
+
} else {
|
|
17050
|
+
filtered.choice = choice;
|
|
17051
|
+
}
|
|
17052
|
+
}
|
|
17044
17053
|
if (Object.keys(filtered).length === 0) return "";
|
|
17045
17054
|
return JSON.stringify(filtered);
|
|
17046
17055
|
}
|
|
@@ -17110,7 +17119,7 @@ function applyNodeDefaults(node) {
|
|
|
17110
17119
|
if (supportsRecordScores && hasScoredOptions) {
|
|
17111
17120
|
const config2 = node.config ??= {};
|
|
17112
17121
|
const choice = config2.choice ??= {};
|
|
17113
|
-
|
|
17122
|
+
choice.record_scores = true;
|
|
17114
17123
|
}
|
|
17115
17124
|
}
|
|
17116
17125
|
|
|
@@ -17923,7 +17932,7 @@ When a public URL is provided, the media is fetched and stored automatically. Fo
|
|
|
17923
17932
|
resultLines.push(
|
|
17924
17933
|
`Upload URL: ${uploadUrl}`,
|
|
17925
17934
|
`Upload method: ${uploadMethod}`,
|
|
17926
|
-
`
|
|
17935
|
+
uploadMethod === "put" ? `PUT the file's bytes directly to the upload URL, then call clipform_complete_media_upload with media_asset_id ${mediaAssetId} to confirm the upload and mark it ready - it stays invisible in the library until you do.` : `Upload the file directly to the upload URL using TUS resumable upload.`
|
|
17927
17936
|
);
|
|
17928
17937
|
} else {
|
|
17929
17938
|
resultLines.push(`Media stored in the workspace library.`);
|
|
@@ -17945,6 +17954,54 @@ When a public URL is provided, the media is fetched and stored automatically. Fo
|
|
|
17945
17954
|
);
|
|
17946
17955
|
}
|
|
17947
17956
|
|
|
17957
|
+
// src/tools/complete-media-upload.ts
|
|
17958
|
+
function registerCompleteMediaUploadTool(server) {
|
|
17959
|
+
server.registerTool(
|
|
17960
|
+
"clipform_complete_media_upload",
|
|
17961
|
+
{
|
|
17962
|
+
title: "Complete Media Upload",
|
|
17963
|
+
description: `Confirm a signed-PUT still image upload finished, after PUTting the bytes to the upload_url returned by clipform_upload_media_asset. The API verifies the object actually landed in storage before flipping the asset from processing to ready - call this right after the PUT succeeds, or the asset stays invisible in the library. Not needed for video uploads (TUS/Mux settle automatically).`,
|
|
17964
|
+
inputSchema: {
|
|
17965
|
+
media_asset_id: external_exports.string().uuid().describe("The media_asset_id returned by clipform_upload_media_asset for the still image")
|
|
17966
|
+
},
|
|
17967
|
+
outputSchema: {
|
|
17968
|
+
media_asset_id: external_exports.string(),
|
|
17969
|
+
status: external_exports.string().describe("The asset's status after this call - ready on success, or its already-settled status when called again (noop)")
|
|
17970
|
+
},
|
|
17971
|
+
annotations: {
|
|
17972
|
+
readOnlyHint: false,
|
|
17973
|
+
destructiveHint: false,
|
|
17974
|
+
idempotentHint: true,
|
|
17975
|
+
openWorldHint: false
|
|
17976
|
+
}
|
|
17977
|
+
},
|
|
17978
|
+
async ({ media_asset_id }) => {
|
|
17979
|
+
const meResult = await callApi("/me", { method: "GET" });
|
|
17980
|
+
if (!meResult.ok) {
|
|
17981
|
+
return errorResult(`Unable to determine workspace: ${meResult.error}`);
|
|
17982
|
+
}
|
|
17983
|
+
const me = meResult.data;
|
|
17984
|
+
const workspaceId = me.workspace?.id ?? null;
|
|
17985
|
+
if (!workspaceId) {
|
|
17986
|
+
return errorResult(
|
|
17987
|
+
"No workspace available. This usually means authentication is misconfigured - check your API key or OAuth connection."
|
|
17988
|
+
);
|
|
17989
|
+
}
|
|
17990
|
+
const result = await callApi(`/workspaces/${workspaceId}/media/${media_asset_id}/complete`, {
|
|
17991
|
+
method: "POST",
|
|
17992
|
+
body: { uploaded: true }
|
|
17993
|
+
});
|
|
17994
|
+
if (!result.ok) {
|
|
17995
|
+
return errorResult(result.error);
|
|
17996
|
+
}
|
|
17997
|
+
const status = result.data.status ?? "ready";
|
|
17998
|
+
const noop = Boolean(result.data.noop);
|
|
17999
|
+
const text = noop ? `Media asset ${media_asset_id} was already ${status} - no change made.` : `Media asset ${media_asset_id} is now ${status}.`;
|
|
18000
|
+
return structuredResult(text, { media_asset_id, status });
|
|
18001
|
+
}
|
|
18002
|
+
);
|
|
18003
|
+
}
|
|
18004
|
+
|
|
17948
18005
|
// src/tools/attach-node-media.ts
|
|
17949
18006
|
var MEDIA_SUPPORTED_TYPES = Object.entries(NODE_TYPES).filter(([, def]) => def.supports_media).map(([type]) => type);
|
|
17950
18007
|
var AttachMediaItemSchema = external_exports.object({
|
|
@@ -19889,6 +19946,7 @@ function createServer(options) {
|
|
|
19889
19946
|
registerUpdateNodeTool(server);
|
|
19890
19947
|
registerDeleteNodeTool(server);
|
|
19891
19948
|
registerUploadMediaAssetTool(server);
|
|
19949
|
+
registerCompleteMediaUploadTool(server);
|
|
19892
19950
|
registerAttachNodeMediaTool(server);
|
|
19893
19951
|
registerGetNodeMediaTool(server);
|
|
19894
19952
|
registerDeleteNodeMediaTool(server);
|
|
@@ -19919,4 +19977,4 @@ export {
|
|
|
19919
19977
|
RENDER_TIMING,
|
|
19920
19978
|
createServer
|
|
19921
19979
|
};
|
|
19922
|
-
//# sourceMappingURL=chunk-
|
|
19980
|
+
//# sourceMappingURL=chunk-ZGXMBGOB.js.map
|