@posty5/mcp 2.1.0 → 2.2.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/README.md +1 -1
- package/dist/bin/stdio.js +56 -2
- package/dist/bin/stdio.js.map +1 -1
- package/dist/bin/stdio.mjs +57 -3
- package/dist/bin/stdio.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +56 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ The server writes the protocol to stdout and everything else to stderr.
|
|
|
60
60
|
| `qr-codes` | ✅ | QR codes of every type, QR templates, download links (PNG / SVG / print PDF) and scannability checks |
|
|
61
61
|
| `html-hosting` | ✅ | Hosted pages, their variables, form submissions |
|
|
62
62
|
| `social-publisher` | ✅ | Workspaces, connected accounts, posts to every platform |
|
|
63
|
-
|
|
63
|
+
76 tools in all; `listToolsets()` and `listTools()` describe them.
|
|
64
64
|
|
|
65
65
|
The store toolsets (`store`, `store-catalog`, `store-orders`, `store-shipping`,
|
|
66
66
|
`store-dropshipping`) left this package in 2.0.0: the Online Store Builder is
|
package/dist/bin/stdio.js
CHANGED
|
@@ -111,7 +111,7 @@ function selectTools(all, toolsets, access) {
|
|
|
111
111
|
// src/config/instructions.config.ts
|
|
112
112
|
var SERVER_NAME = "posty5";
|
|
113
113
|
var SERVER_TITLE = "Posty5";
|
|
114
|
-
var PACKAGE_VERSION = "2.
|
|
114
|
+
var PACKAGE_VERSION = "2.2.0";
|
|
115
115
|
var SERVER_INSTRUCTIONS = [
|
|
116
116
|
"Posty5 is a platform for short links, QR codes, hosted HTML pages and social media publishing. These tools act on the Posty5 account this connection belongs to.",
|
|
117
117
|
"Start with account_get_current to see which account and plan you are working with.",
|
|
@@ -1694,6 +1694,8 @@ var IMAGE_CAPTION_MAX_LENGTH = 8e3;
|
|
|
1694
1694
|
var YOUTUBE_TITLE_MAX_LENGTH = 100;
|
|
1695
1695
|
var THREADS_TEXT_MAX_LENGTH = 500;
|
|
1696
1696
|
var TWITTER_TEXT_MAX_WEIGHTED_LENGTH = 280;
|
|
1697
|
+
var MAX_WORKSPACE_DEFAULT_COMMENTS = 10;
|
|
1698
|
+
var COMMENT_POST_TYPES = ["shortVideo", "longVideo", "image", "text"];
|
|
1697
1699
|
|
|
1698
1700
|
// src/core/social-publisher.helper.ts
|
|
1699
1701
|
function toScheduleConfig(scheduledAt) {
|
|
@@ -1717,6 +1719,7 @@ function videoPublishOptions(args) {
|
|
|
1717
1719
|
facebook: args.facebook,
|
|
1718
1720
|
instagram: args.instagram,
|
|
1719
1721
|
comment: args.comment,
|
|
1722
|
+
allowPostDefaultComments: args.allowPostDefaultComments,
|
|
1720
1723
|
schedule: args.scheduledAt ? new Date(args.scheduledAt) : void 0,
|
|
1721
1724
|
tag: args.tag,
|
|
1722
1725
|
refId: args.refId
|
|
@@ -1783,7 +1786,19 @@ var commentsField = zod.z.array(
|
|
|
1783
1786
|
imageUrl: zod.z.string().url().optional().describe("A public image to attach \u2014 Facebook only."),
|
|
1784
1787
|
...commentFlags
|
|
1785
1788
|
})
|
|
1786
|
-
).max(socialPublisherPost.
|
|
1789
|
+
).max(socialPublisherPost.MAX_POST_COMMENTS_TOTAL).optional().describe(`Up to ${socialPublisherPost.MAX_POST_COMMENTS_PER_PLATFORM} comments per platform (${socialPublisherPost.MAX_POST_COMMENTS_TOTAL} in all), posted under the post once it is live, in order. Each is charged separately; see account_get_operation_costs.`);
|
|
1790
|
+
var allowDefaultCommentsField = zod.z.boolean().optional().describe(
|
|
1791
|
+
"Add the saved default comments (default true): a workspace's defaults for this post type plus account defaults marked applyToWorkspacePosts, or an account's own. They are added after `comments` and charged like any other comment. Send false to add none \u2014 do so when you already put the defaults you want into `comments` (social_workspace_resolve_default_comments lists them)."
|
|
1792
|
+
);
|
|
1793
|
+
var workspaceDefaultCommentField = zod.z.object({
|
|
1794
|
+
_id: zod.z.string().optional().describe("Send it back to edit this default; omit it to add one."),
|
|
1795
|
+
text: zod.z.string().min(1).max(socialPublisherPost.MAX_COMMENT_LENGTH),
|
|
1796
|
+
delayMinutes: zod.z.number().int().min(0).max(socialPublisherPost.MAX_COMMENT_DELAY_MINUTES).optional().describe("Minutes to wait after the post is live. Default 0."),
|
|
1797
|
+
imageUrl: zod.z.string().url().optional().describe("A public image to attach \u2014 Facebook and Threads only."),
|
|
1798
|
+
isActive: zod.z.boolean().optional().describe("An inactive default is kept but never added. Default true."),
|
|
1799
|
+
postTypes: zod.z.array(zod.z.enum(COMMENT_POST_TYPES)).optional().describe("The post types it is added to. Empty or absent: all of them."),
|
|
1800
|
+
...commentFlags
|
|
1801
|
+
});
|
|
1787
1802
|
var videoPostFields = {
|
|
1788
1803
|
...targetFields2,
|
|
1789
1804
|
videoUrl: zod.z.string().url().describe("A direct, public URL of the video file (.mp4, .mov, .avi, .mkv or .webm). Files cannot be uploaded through this tool."),
|
|
@@ -1793,6 +1808,7 @@ var videoPostFields = {
|
|
|
1793
1808
|
facebook: facebookBlock,
|
|
1794
1809
|
instagram: instagramBlock,
|
|
1795
1810
|
comment: videoCommentField,
|
|
1811
|
+
allowPostDefaultComments: allowDefaultCommentsField,
|
|
1796
1812
|
scheduledAt: scheduledAtField,
|
|
1797
1813
|
...labelFields2
|
|
1798
1814
|
};
|
|
@@ -1831,6 +1847,42 @@ var SOCIAL_PUBLISHER_TOOLS = [
|
|
|
1831
1847
|
input: zod.z.object({ id: idField(WORKSPACE_ID) }),
|
|
1832
1848
|
run: ({ id }, { clients }) => clients.workspaces.getForNewPost(id)
|
|
1833
1849
|
}),
|
|
1850
|
+
defineTool({
|
|
1851
|
+
name: "social_workspace_get_default_comments",
|
|
1852
|
+
toolset: "social-publisher",
|
|
1853
|
+
access: "read",
|
|
1854
|
+
title: "Workspace default comments",
|
|
1855
|
+
description: "The comments every new post to this workspace starts with, in order, each with the post types it applies to (empty = all) and its platforms. Read the workspace's __v with social_workspace_get before changing them.",
|
|
1856
|
+
input: zod.z.object({ id: idField(WORKSPACE_ID) }),
|
|
1857
|
+
run: async ({ id }, { clients }) => ({ comments: await clients.workspaces.getDefaultComments(id) })
|
|
1858
|
+
}),
|
|
1859
|
+
defineTool({
|
|
1860
|
+
name: "social_workspace_resolve_default_comments",
|
|
1861
|
+
toolset: "social-publisher",
|
|
1862
|
+
access: "read",
|
|
1863
|
+
title: "Preview a new post's default comments",
|
|
1864
|
+
description: "The default comments a new post of postType to this workspace would get right now: the workspace's own for that type, then account defaults marked applyToWorkspacePosts, aimed only at platforms the workspace has accounts on. warnings lists any dropped at a platform's ceiling. To publish an edited list, pass it as the post's comments with allowPostDefaultComments: false.",
|
|
1865
|
+
input: zod.z.object({ id: idField(WORKSPACE_ID), postType: zod.z.enum(COMMENT_POST_TYPES) }),
|
|
1866
|
+
run: ({ id, postType }, { clients }) => clients.workspaces.resolveDefaultComments(id, postType)
|
|
1867
|
+
}),
|
|
1868
|
+
defineTool({
|
|
1869
|
+
name: "social_workspace_set_default_comments",
|
|
1870
|
+
toolset: "social-publisher",
|
|
1871
|
+
access: "write",
|
|
1872
|
+
title: "Set workspace default comments",
|
|
1873
|
+
description: `Replaces the workspace's default comments with this list (at most ${MAX_WORKSPACE_DEFAULT_COMMENTS}); an empty list clears them. New posts to the workspace then get them automatically unless the publish call sends allowPostDefaultComments: false, and every added comment is charged like any other. Existing and scheduled posts keep the comments they already have.`,
|
|
1874
|
+
input: zod.z.object({
|
|
1875
|
+
id: idField(WORKSPACE_ID),
|
|
1876
|
+
version: versionField("the workspace"),
|
|
1877
|
+
comments: zod.z.array(workspaceDefaultCommentField).max(MAX_WORKSPACE_DEFAULT_COMMENTS)
|
|
1878
|
+
}),
|
|
1879
|
+
annotations: { idempotent: true },
|
|
1880
|
+
run: async ({ id, version, comments }, { clients }) => {
|
|
1881
|
+
const saved = await clients.workspaces.setDefaultComments(id, comments, version);
|
|
1882
|
+
return { updated: true, id, __v: saved.__v, comments: saved.comments };
|
|
1883
|
+
},
|
|
1884
|
+
entity: (_result, args) => ({ entityType: "socialWorkspace", entityId: args.id })
|
|
1885
|
+
}),
|
|
1834
1886
|
defineTool({
|
|
1835
1887
|
name: "social_account_list",
|
|
1836
1888
|
toolset: "social-publisher",
|
|
@@ -1973,6 +2025,7 @@ var SOCIAL_PUBLISHER_TOOLS = [
|
|
|
1973
2025
|
facebook: facebookBlock,
|
|
1974
2026
|
instagram: instagramBlock,
|
|
1975
2027
|
comments: commentsField,
|
|
2028
|
+
allowPostDefaultComments: allowDefaultCommentsField,
|
|
1976
2029
|
scheduledAt: scheduledAtField,
|
|
1977
2030
|
...labelFields2
|
|
1978
2031
|
}),
|
|
@@ -2059,6 +2112,7 @@ var SOCIAL_PUBLISHER_TOOLS = [
|
|
|
2059
2112
|
reply_settings: zod.z.enum(TWITTER_REPLY_SETTINGS).optional()
|
|
2060
2113
|
}).optional().describe("X override."),
|
|
2061
2114
|
comments: commentsField,
|
|
2115
|
+
allowPostDefaultComments: allowDefaultCommentsField,
|
|
2062
2116
|
scheduledAt: scheduledAtField,
|
|
2063
2117
|
...labelFields2
|
|
2064
2118
|
}),
|