@rolino/mcp 0.9.0 → 0.10.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/CHANGELOG.md +18 -0
- package/README.md +279 -262
- package/dist/bin.cjs +305 -187
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-J4VAXLVP.js → chunk-OON7OE4T.js} +138 -12
- package/dist/chunk-OON7OE4T.js.map +1 -0
- package/dist/index.cjs +305 -187
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-J4VAXLVP.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
+
import { DraftDeletePreviewSchema, DraftDeleteResultSchema } from "@rolino/contracts";
|
|
2
3
|
import {
|
|
4
|
+
IntegrationDisconnectPreviewSchema,
|
|
5
|
+
IntegrationDisconnectResultSchema,
|
|
6
|
+
IntegrationDisconnectExecuteInputSchema,
|
|
7
|
+
MediaAssetUploadInputSchema,
|
|
8
|
+
MediaAssetUploadCompleteInputSchema,
|
|
9
|
+
MediaAssetUploadPreparationSchema,
|
|
10
|
+
PostScheduleCancelPreviewSchema,
|
|
11
|
+
PostScheduleCancelResultSchema,
|
|
3
12
|
PostDeliveryCheckInputSchema,
|
|
4
13
|
PostDeliveryCheckResultSchema,
|
|
5
14
|
PostRecoveryInputSchema,
|
|
@@ -110,7 +119,7 @@ import * as z from "zod/v4";
|
|
|
110
119
|
// package.json
|
|
111
120
|
var package_default = {
|
|
112
121
|
name: "@rolino/mcp",
|
|
113
|
-
version: "0.
|
|
122
|
+
version: "0.10.0",
|
|
114
123
|
description: "Model Context Protocol server for Rolino",
|
|
115
124
|
type: "module",
|
|
116
125
|
license: "MIT",
|
|
@@ -169,9 +178,9 @@ var package_default = {
|
|
|
169
178
|
dependencies: {
|
|
170
179
|
"@hono/node-server": "2.0.12",
|
|
171
180
|
"@modelcontextprotocol/server": "2.0.0",
|
|
172
|
-
"@rolino/contracts": "0.
|
|
173
|
-
"@rolino/local-auth": "0.
|
|
174
|
-
"@rolino/sdk": "0.
|
|
181
|
+
"@rolino/contracts": "0.10.0",
|
|
182
|
+
"@rolino/local-auth": "0.10.0",
|
|
183
|
+
"@rolino/sdk": "0.10.0",
|
|
175
184
|
zod: "^4.4.3"
|
|
176
185
|
},
|
|
177
186
|
devDependencies: {
|
|
@@ -266,6 +275,7 @@ var mcpDraftInputShape = {
|
|
|
266
275
|
};
|
|
267
276
|
var mcpDraftUpdateInputShape = {
|
|
268
277
|
...DraftPostUpdateInputSchema.shape,
|
|
278
|
+
mediaAltText: DraftPostUpdateInputSchema.shape.mediaAltText.describe("Alternative text keyed by selected asset ID or existing post media ID. Use null to clear. Maximum 1,000 characters. With replacement media, use asset IDs."),
|
|
269
279
|
mediaAssetIds: DraftPostUpdateInputSchema.shape.mediaAssetIds.describe(
|
|
270
280
|
"Replacement ordered media asset IDs. Omit to preserve current media; pass an empty array to remove all media."
|
|
271
281
|
),
|
|
@@ -592,6 +602,34 @@ function createRolinoMcpServer(options = {}) {
|
|
|
592
602
|
return errorResult(error);
|
|
593
603
|
}
|
|
594
604
|
});
|
|
605
|
+
server.registerTool("prepare_media_asset_upload", {
|
|
606
|
+
title: "Prepare a media upload",
|
|
607
|
+
description: "Requires posts:write. Reserve one user-approved file in the exact project. Return a short-lived upload URL and required headers. Transfer the file bytes to that URL, then call complete_media_asset_upload with the returned storage identity. Keep the upload URL private. This does not create or publish a post and does not read local files on the server.",
|
|
608
|
+
inputSchema: MediaAssetUploadInputSchema.extend({ projectId: z.string().min(1) }),
|
|
609
|
+
outputSchema: MediaAssetUploadPreparationSchema,
|
|
610
|
+
annotations: uploadMediaAnnotations
|
|
611
|
+
}, async ({ projectId, ...input }) => {
|
|
612
|
+
try {
|
|
613
|
+
if (!api.media?.prepareUpload) throw new TypeError("Update the Rolino client for upload preparation.");
|
|
614
|
+
return jsonResult(await api.media.prepareUpload(projectId, input));
|
|
615
|
+
} catch (error) {
|
|
616
|
+
return errorResult(error);
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
server.registerTool("complete_media_asset_upload", {
|
|
620
|
+
title: "Verify an uploaded media asset",
|
|
621
|
+
description: "Requires posts:write. Call after transferring the approved file to the prepared URL. The server verifies stored bytes and media metadata. Use only the returned asset ID in a draft. Failed verification is not a ready asset. This does not create, schedule, or publish a post.",
|
|
622
|
+
inputSchema: MediaAssetUploadCompleteInputSchema.extend({ projectId: z.string().min(1) }),
|
|
623
|
+
outputSchema: MediaAssetSchema,
|
|
624
|
+
annotations: uploadMediaAnnotations
|
|
625
|
+
}, async ({ projectId, ...input }) => {
|
|
626
|
+
try {
|
|
627
|
+
if (!api.media?.completeUpload) throw new TypeError("Update the Rolino client for upload verification.");
|
|
628
|
+
return jsonResult(await api.media.completeUpload(projectId, input));
|
|
629
|
+
} catch (error) {
|
|
630
|
+
return errorResult(error);
|
|
631
|
+
}
|
|
632
|
+
});
|
|
595
633
|
if ((options.toolProfile ?? "local") === "local") server.registerTool("upload_media_asset", {
|
|
596
634
|
title: "Upload local media to Rolino",
|
|
597
635
|
description: "Upload one explicitly approved local JPEG, PNG, WebP, MP4, or MOV file into an exact project's reusable media library. Read only the exact path supplied for this workflow. This changes Rolino data but never creates, schedules, or publishes a post. Return the asset ID for a later draft operation.",
|
|
@@ -769,6 +807,62 @@ function createRolinoMcpServer(options = {}) {
|
|
|
769
807
|
return errorResult(error);
|
|
770
808
|
}
|
|
771
809
|
});
|
|
810
|
+
server.registerTool("preview_draft_deletion", {
|
|
811
|
+
title: "Preview draft deletion",
|
|
812
|
+
description: "Requires posts:delete. Preview permanent deletion of one untouched draft. Show its caption, media count, and consequence to the user. Reusable Media Library originals remain.",
|
|
813
|
+
inputSchema: z.object({ projectId: z.string().min(1), postId: z.string().min(1), expectedVersion: z.number().int().positive() }),
|
|
814
|
+
outputSchema: DraftDeletePreviewSchema,
|
|
815
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }
|
|
816
|
+
}, async ({ projectId, postId, expectedVersion }) => {
|
|
817
|
+
try {
|
|
818
|
+
if (!api.posts.previewDeletion) throw new TypeError("Update the Rolino client for draft deletion.");
|
|
819
|
+
return jsonResult(await api.posts.previewDeletion(projectId, postId, { expectedVersion }));
|
|
820
|
+
} catch (error) {
|
|
821
|
+
return errorResult(error);
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
server.registerTool("execute_draft_deletion", {
|
|
825
|
+
title: "Delete the confirmed draft",
|
|
826
|
+
description: "Requires posts:delete and user approval of the exact preview. Permanently delete the untouched draft using its version, confirmation, and stable retry key. Reusable media originals remain. Cannot delete a scheduled or published post.",
|
|
827
|
+
inputSchema: z.object({ projectId: z.string().min(1), postId: z.string().min(1), expectedVersion: z.number().int().positive(), confirmationToken: z.string().min(1), idempotencyKey: z.string().min(1) }),
|
|
828
|
+
outputSchema: DraftDeleteResultSchema,
|
|
829
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false }
|
|
830
|
+
}, async ({ projectId, postId, expectedVersion, confirmationToken, idempotencyKey }) => {
|
|
831
|
+
try {
|
|
832
|
+
if (!api.posts.executeDeletion) throw new TypeError("Update the Rolino client for draft deletion.");
|
|
833
|
+
return jsonResult(await api.posts.executeDeletion(projectId, postId, { confirmationToken }, { expectedVersion, idempotencyKey }));
|
|
834
|
+
} catch (error) {
|
|
835
|
+
return errorResult(error);
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
server.registerTool("preview_post_schedule_cancellation", {
|
|
839
|
+
title: "Preview post schedule cancellation",
|
|
840
|
+
description: "Requires posts:schedule. Preview cancellation of all destinations on a future local schedule. Delivery must not have started. Show the post, time, destinations, and consequence to the user. Use check_post_delivery for uncertain delivery.",
|
|
841
|
+
inputSchema: z.object({ projectId: z.string().min(1), postId: z.string().min(1), expectedVersion: z.number().int().positive() }),
|
|
842
|
+
outputSchema: PostScheduleCancelPreviewSchema,
|
|
843
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }
|
|
844
|
+
}, async ({ projectId, postId, expectedVersion }) => {
|
|
845
|
+
try {
|
|
846
|
+
if (!api.posts.previewScheduleCancellation) throw new TypeError("Update the Rolino client for schedule cancellation.");
|
|
847
|
+
return jsonResult(await api.posts.previewScheduleCancellation(projectId, postId, { expectedVersion }));
|
|
848
|
+
} catch (error) {
|
|
849
|
+
return errorResult(error);
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
server.registerTool("execute_post_schedule_cancellation", {
|
|
853
|
+
title: "Cancel a confirmed post schedule",
|
|
854
|
+
description: "Requires posts:schedule and user approval of the exact preview. Return a future local schedule to Draft with the unchanged post version and confirmation. Reuse the idempotency key on retry. Reject started or uncertain delivery; never delete a remote post.",
|
|
855
|
+
inputSchema: z.object({ projectId: z.string().min(1), postId: z.string().min(1), expectedVersion: z.number().int().positive(), confirmationToken: z.string().min(1), idempotencyKey: z.string().min(1) }),
|
|
856
|
+
outputSchema: PostScheduleCancelResultSchema,
|
|
857
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false }
|
|
858
|
+
}, async ({ projectId, postId, expectedVersion, confirmationToken, idempotencyKey }) => {
|
|
859
|
+
try {
|
|
860
|
+
if (!api.posts.executeScheduleCancellation) throw new TypeError("Update the Rolino client for schedule cancellation.");
|
|
861
|
+
return jsonResult(await api.posts.executeScheduleCancellation(projectId, postId, { confirmationToken }, { expectedVersion, idempotencyKey }));
|
|
862
|
+
} catch (error) {
|
|
863
|
+
return errorResult(error);
|
|
864
|
+
}
|
|
865
|
+
});
|
|
772
866
|
server.registerTool("preview_post_schedule", {
|
|
773
867
|
title: "Preview a Rolino post schedule",
|
|
774
868
|
description: "Validate one exact future schedule against the current post version and live provider health. A YouTube schedule must target Public. Its preview states that preparation uploads the video privately now; CONFIRMING_SCHEDULE means the upload is complete and YouTube is acknowledging the future Public publish time, not that the video is public. This contacts configured providers and creates a five-minute, single-use confirmation, but does not schedule or publish the post. Inspect the complete result before calling execute_post_schedule with identical values.",
|
|
@@ -831,16 +925,17 @@ function createRolinoMcpServer(options = {}) {
|
|
|
831
925
|
projectId: z.string().min(1).describe("Exact Rolino project ID."),
|
|
832
926
|
postId: z.string().min(1).describe("Exact Rolino post ID."),
|
|
833
927
|
expectedVersion: z.number().int().positive().describe("Current version returned by get_post."),
|
|
928
|
+
destinationIds: PostPublishInputSchema.shape.destinationIds.describe("Exact saved destination IDs from get_post. Required when a network has several accounts. Do not combine with destinations."),
|
|
834
929
|
destinations: PostPublishInputSchema.shape.destinations.describe("Exact Instagram, TikTok, YouTube, Bluesky, and/or LinkedIn destinations to publish now.")
|
|
835
930
|
}),
|
|
836
931
|
outputSchema: PostPublishPreviewSchema,
|
|
837
932
|
annotations: publishPreviewAnnotations
|
|
838
|
-
}, async ({ projectId, postId, expectedVersion, destinations }) => {
|
|
933
|
+
}, async ({ projectId, postId, expectedVersion, destinations, destinationIds }) => {
|
|
839
934
|
try {
|
|
840
935
|
return jsonResult(await api.posts.previewPublish(
|
|
841
936
|
projectId,
|
|
842
937
|
postId,
|
|
843
|
-
{ destinations },
|
|
938
|
+
{ destinations, ...destinationIds ? { destinationIds } : {} },
|
|
844
939
|
{ expectedVersion }
|
|
845
940
|
));
|
|
846
941
|
} catch (error) {
|
|
@@ -856,6 +951,7 @@ function createRolinoMcpServer(options = {}) {
|
|
|
856
951
|
expectedVersion: z.number().int().positive().describe("Same post version used by preview_post_publish."),
|
|
857
952
|
idempotencyKey: z.string().min(1).max(200).describe("Stable caller-generated retry key for this exact execution."),
|
|
858
953
|
confirmationToken: z.string().min(1).max(200).describe("Single-use token returned by preview_post_publish."),
|
|
954
|
+
destinationIds: PostPublishInputSchema.shape.destinationIds.describe("Exact saved destination IDs from get_post. Required when a network has several accounts. Do not combine with destinations."),
|
|
859
955
|
destinations: PostPublishInputSchema.shape.destinations.describe("Exact unchanged destinations returned by preview_post_publish.")
|
|
860
956
|
}),
|
|
861
957
|
outputSchema: PostSchema,
|
|
@@ -866,13 +962,14 @@ function createRolinoMcpServer(options = {}) {
|
|
|
866
962
|
expectedVersion,
|
|
867
963
|
idempotencyKey,
|
|
868
964
|
confirmationToken,
|
|
869
|
-
destinations
|
|
965
|
+
destinations,
|
|
966
|
+
destinationIds
|
|
870
967
|
}) => {
|
|
871
968
|
try {
|
|
872
969
|
return jsonResult(await api.posts.executePublish(
|
|
873
970
|
projectId,
|
|
874
971
|
postId,
|
|
875
|
-
{ destinations, confirmationToken },
|
|
972
|
+
{ destinations, ...destinationIds ? { destinationIds } : {}, confirmationToken },
|
|
876
973
|
{ expectedVersion, idempotencyKey }
|
|
877
974
|
));
|
|
878
975
|
} catch (error) {
|
|
@@ -894,21 +991,50 @@ function createRolinoMcpServer(options = {}) {
|
|
|
894
991
|
return errorResult(error);
|
|
895
992
|
}
|
|
896
993
|
});
|
|
994
|
+
server.registerTool("preview_integration_disconnection", {
|
|
995
|
+
title: "Preview Bluesky disconnection",
|
|
996
|
+
description: "Requires the separate integrations:disconnect capability. Preview the exact Bluesky account and pending deliveries before user approval. Does not disconnect or expose credentials.",
|
|
997
|
+
inputSchema: z.object({ projectId: z.string().min(1), integrationId: z.string().min(1).max(200).optional() }),
|
|
998
|
+
outputSchema: IntegrationDisconnectPreviewSchema,
|
|
999
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }
|
|
1000
|
+
}, async ({ projectId, integrationId }) => {
|
|
1001
|
+
try {
|
|
1002
|
+
if (!api.integrations.previewDisconnection) throw new TypeError("Update the Rolino client for disconnection.");
|
|
1003
|
+
return jsonResult(await api.integrations.previewDisconnection(projectId, { integrationId }));
|
|
1004
|
+
} catch (error) {
|
|
1005
|
+
return errorResult(error);
|
|
1006
|
+
}
|
|
1007
|
+
});
|
|
1008
|
+
server.registerTool("execute_integration_disconnection", {
|
|
1009
|
+
title: "Disconnect the confirmed Bluesky account",
|
|
1010
|
+
description: "Requires integrations:disconnect and user approval of the exact preview. Use its unchanged expectedVersion and confirmation token with a stable idempotency key. Clears local authorization; published posts and saved schedules remain. In-flight delivery can finish. Remote revocation can remain unresolved.",
|
|
1011
|
+
inputSchema: IntegrationDisconnectExecuteInputSchema.extend({ projectId: z.string().min(1), idempotencyKey: z.string().min(1) }),
|
|
1012
|
+
outputSchema: IntegrationDisconnectResultSchema,
|
|
1013
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true }
|
|
1014
|
+
}, async ({ projectId, idempotencyKey, ...input }) => {
|
|
1015
|
+
try {
|
|
1016
|
+
if (!api.integrations.executeDisconnection) throw new TypeError("Update the Rolino client for disconnection.");
|
|
1017
|
+
return jsonResult(await api.integrations.executeDisconnection(projectId, input, { idempotencyKey }));
|
|
1018
|
+
} catch (error) {
|
|
1019
|
+
return errorResult(error);
|
|
1020
|
+
}
|
|
1021
|
+
});
|
|
897
1022
|
server.registerTool("refresh_delivery_options", {
|
|
898
1023
|
title: "Refresh provider delivery options",
|
|
899
|
-
description: "Contact one
|
|
1024
|
+
description: "Contact one publishing provider and return safe account-specific choices. Bluesky returns text and image limits, connection health, and a human OAuth handoff path on this Rolino host. The owner must approve connection in the browser. TikTok returns video choices; LinkedIn returns member and media policy. This refreshes cached health but never creates, schedules, or publishes a post.",
|
|
900
1025
|
inputSchema: z.object({
|
|
901
1026
|
projectId: z.string().min(1).describe("Exact Rolino project ID."),
|
|
1027
|
+
integrationId: z.string().min(1).max(200).optional().describe("Exact connection ID returned by integration health."),
|
|
902
1028
|
provider: ProviderDeliveryOptionsProviderSchema.describe("Provider whose delivery choices should be refreshed.")
|
|
903
1029
|
}),
|
|
904
1030
|
outputSchema: ProviderDeliveryOptionsToolSchema,
|
|
905
1031
|
annotations: deliveryOptionsAnnotations
|
|
906
|
-
}, async ({ projectId, provider }) => {
|
|
1032
|
+
}, async ({ projectId, provider, integrationId }) => {
|
|
907
1033
|
try {
|
|
908
1034
|
if (!api.integrations.deliveryOptions) {
|
|
909
1035
|
throw new TypeError("This Rolino client does not support provider delivery options.");
|
|
910
1036
|
}
|
|
911
|
-
return jsonResult(await api.integrations.deliveryOptions(projectId, provider));
|
|
1037
|
+
return jsonResult(await api.integrations.deliveryOptions(projectId, provider, { integrationId }));
|
|
912
1038
|
} catch (error) {
|
|
913
1039
|
return errorResult(error);
|
|
914
1040
|
}
|
|
@@ -1662,4 +1788,4 @@ export {
|
|
|
1662
1788
|
createRolinoMcpServer,
|
|
1663
1789
|
startStdioServer
|
|
1664
1790
|
};
|
|
1665
|
-
//# sourceMappingURL=chunk-
|
|
1791
|
+
//# sourceMappingURL=chunk-OON7OE4T.js.map
|