@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/dist/index.d.mts
CHANGED
|
@@ -371,7 +371,7 @@ declare const CLIENT_HEADER = "X-Posty5-Client";
|
|
|
371
371
|
declare const MCP_CREATED_FROM = "mcp";
|
|
372
372
|
|
|
373
373
|
/** This package's version — kept in step with package.json (a test pins them). */
|
|
374
|
-
declare const PACKAGE_VERSION = "2.
|
|
374
|
+
declare const PACKAGE_VERSION = "2.2.0";
|
|
375
375
|
/**
|
|
376
376
|
* What every assistant is told when it connects (MCP server `instructions`).
|
|
377
377
|
* Short on purpose: it is in the model's context for the whole session.
|
package/dist/index.d.ts
CHANGED
|
@@ -371,7 +371,7 @@ declare const CLIENT_HEADER = "X-Posty5-Client";
|
|
|
371
371
|
declare const MCP_CREATED_FROM = "mcp";
|
|
372
372
|
|
|
373
373
|
/** This package's version — kept in step with package.json (a test pins them). */
|
|
374
|
-
declare const PACKAGE_VERSION = "2.
|
|
374
|
+
declare const PACKAGE_VERSION = "2.2.0";
|
|
375
375
|
/**
|
|
376
376
|
* What every assistant is told when it connects (MCP server `instructions`).
|
|
377
377
|
* Short on purpose: it is in the model's context for the whole session.
|
package/dist/index.js
CHANGED
|
@@ -77,7 +77,7 @@ var MS_PER_MINUTE = 60 * 1e3;
|
|
|
77
77
|
// src/config/instructions.config.ts
|
|
78
78
|
var SERVER_NAME = "posty5";
|
|
79
79
|
var SERVER_TITLE = "Posty5";
|
|
80
|
-
var PACKAGE_VERSION = "2.
|
|
80
|
+
var PACKAGE_VERSION = "2.2.0";
|
|
81
81
|
var SERVER_INSTRUCTIONS = [
|
|
82
82
|
"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.",
|
|
83
83
|
"Start with account_get_current to see which account and plan you are working with.",
|
|
@@ -1671,6 +1671,8 @@ var IMAGE_CAPTION_MAX_LENGTH = 8e3;
|
|
|
1671
1671
|
var YOUTUBE_TITLE_MAX_LENGTH = 100;
|
|
1672
1672
|
var THREADS_TEXT_MAX_LENGTH = 500;
|
|
1673
1673
|
var TWITTER_TEXT_MAX_WEIGHTED_LENGTH = 280;
|
|
1674
|
+
var MAX_WORKSPACE_DEFAULT_COMMENTS = 10;
|
|
1675
|
+
var COMMENT_POST_TYPES = ["shortVideo", "longVideo", "image", "text"];
|
|
1674
1676
|
|
|
1675
1677
|
// src/core/social-publisher.helper.ts
|
|
1676
1678
|
function toScheduleConfig(scheduledAt) {
|
|
@@ -1694,6 +1696,7 @@ function videoPublishOptions(args) {
|
|
|
1694
1696
|
facebook: args.facebook,
|
|
1695
1697
|
instagram: args.instagram,
|
|
1696
1698
|
comment: args.comment,
|
|
1699
|
+
allowPostDefaultComments: args.allowPostDefaultComments,
|
|
1697
1700
|
schedule: args.scheduledAt ? new Date(args.scheduledAt) : void 0,
|
|
1698
1701
|
tag: args.tag,
|
|
1699
1702
|
refId: args.refId
|
|
@@ -1760,7 +1763,19 @@ var commentsField = zod.z.array(
|
|
|
1760
1763
|
imageUrl: zod.z.string().url().optional().describe("A public image to attach \u2014 Facebook only."),
|
|
1761
1764
|
...commentFlags
|
|
1762
1765
|
})
|
|
1763
|
-
).max(socialPublisherPost.
|
|
1766
|
+
).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.`);
|
|
1767
|
+
var allowDefaultCommentsField = zod.z.boolean().optional().describe(
|
|
1768
|
+
"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)."
|
|
1769
|
+
);
|
|
1770
|
+
var workspaceDefaultCommentField = zod.z.object({
|
|
1771
|
+
_id: zod.z.string().optional().describe("Send it back to edit this default; omit it to add one."),
|
|
1772
|
+
text: zod.z.string().min(1).max(socialPublisherPost.MAX_COMMENT_LENGTH),
|
|
1773
|
+
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."),
|
|
1774
|
+
imageUrl: zod.z.string().url().optional().describe("A public image to attach \u2014 Facebook and Threads only."),
|
|
1775
|
+
isActive: zod.z.boolean().optional().describe("An inactive default is kept but never added. Default true."),
|
|
1776
|
+
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."),
|
|
1777
|
+
...commentFlags
|
|
1778
|
+
});
|
|
1764
1779
|
var videoPostFields = {
|
|
1765
1780
|
...targetFields2,
|
|
1766
1781
|
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."),
|
|
@@ -1770,6 +1785,7 @@ var videoPostFields = {
|
|
|
1770
1785
|
facebook: facebookBlock,
|
|
1771
1786
|
instagram: instagramBlock,
|
|
1772
1787
|
comment: videoCommentField,
|
|
1788
|
+
allowPostDefaultComments: allowDefaultCommentsField,
|
|
1773
1789
|
scheduledAt: scheduledAtField,
|
|
1774
1790
|
...labelFields2
|
|
1775
1791
|
};
|
|
@@ -1808,6 +1824,42 @@ var SOCIAL_PUBLISHER_TOOLS = [
|
|
|
1808
1824
|
input: zod.z.object({ id: idField(WORKSPACE_ID) }),
|
|
1809
1825
|
run: ({ id }, { clients }) => clients.workspaces.getForNewPost(id)
|
|
1810
1826
|
}),
|
|
1827
|
+
defineTool({
|
|
1828
|
+
name: "social_workspace_get_default_comments",
|
|
1829
|
+
toolset: "social-publisher",
|
|
1830
|
+
access: "read",
|
|
1831
|
+
title: "Workspace default comments",
|
|
1832
|
+
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.",
|
|
1833
|
+
input: zod.z.object({ id: idField(WORKSPACE_ID) }),
|
|
1834
|
+
run: async ({ id }, { clients }) => ({ comments: await clients.workspaces.getDefaultComments(id) })
|
|
1835
|
+
}),
|
|
1836
|
+
defineTool({
|
|
1837
|
+
name: "social_workspace_resolve_default_comments",
|
|
1838
|
+
toolset: "social-publisher",
|
|
1839
|
+
access: "read",
|
|
1840
|
+
title: "Preview a new post's default comments",
|
|
1841
|
+
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.",
|
|
1842
|
+
input: zod.z.object({ id: idField(WORKSPACE_ID), postType: zod.z.enum(COMMENT_POST_TYPES) }),
|
|
1843
|
+
run: ({ id, postType }, { clients }) => clients.workspaces.resolveDefaultComments(id, postType)
|
|
1844
|
+
}),
|
|
1845
|
+
defineTool({
|
|
1846
|
+
name: "social_workspace_set_default_comments",
|
|
1847
|
+
toolset: "social-publisher",
|
|
1848
|
+
access: "write",
|
|
1849
|
+
title: "Set workspace default comments",
|
|
1850
|
+
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.`,
|
|
1851
|
+
input: zod.z.object({
|
|
1852
|
+
id: idField(WORKSPACE_ID),
|
|
1853
|
+
version: versionField("the workspace"),
|
|
1854
|
+
comments: zod.z.array(workspaceDefaultCommentField).max(MAX_WORKSPACE_DEFAULT_COMMENTS)
|
|
1855
|
+
}),
|
|
1856
|
+
annotations: { idempotent: true },
|
|
1857
|
+
run: async ({ id, version, comments }, { clients }) => {
|
|
1858
|
+
const saved = await clients.workspaces.setDefaultComments(id, comments, version);
|
|
1859
|
+
return { updated: true, id, __v: saved.__v, comments: saved.comments };
|
|
1860
|
+
},
|
|
1861
|
+
entity: (_result, args) => ({ entityType: "socialWorkspace", entityId: args.id })
|
|
1862
|
+
}),
|
|
1811
1863
|
defineTool({
|
|
1812
1864
|
name: "social_account_list",
|
|
1813
1865
|
toolset: "social-publisher",
|
|
@@ -1950,6 +2002,7 @@ var SOCIAL_PUBLISHER_TOOLS = [
|
|
|
1950
2002
|
facebook: facebookBlock,
|
|
1951
2003
|
instagram: instagramBlock,
|
|
1952
2004
|
comments: commentsField,
|
|
2005
|
+
allowPostDefaultComments: allowDefaultCommentsField,
|
|
1953
2006
|
scheduledAt: scheduledAtField,
|
|
1954
2007
|
...labelFields2
|
|
1955
2008
|
}),
|
|
@@ -2036,6 +2089,7 @@ var SOCIAL_PUBLISHER_TOOLS = [
|
|
|
2036
2089
|
reply_settings: zod.z.enum(TWITTER_REPLY_SETTINGS).optional()
|
|
2037
2090
|
}).optional().describe("X override."),
|
|
2038
2091
|
comments: commentsField,
|
|
2092
|
+
allowPostDefaultComments: allowDefaultCommentsField,
|
|
2039
2093
|
scheduledAt: scheduledAtField,
|
|
2040
2094
|
...labelFields2
|
|
2041
2095
|
}),
|