posterly-mcp-server 0.56.2 → 0.58.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 +4 -3
- package/dist/lib/api-client.d.ts +14 -1
- package/dist/lib/api-client.js +2 -2
- package/dist/lib/brand-compliance-text.d.ts +10 -0
- package/dist/lib/brand-compliance-text.js +34 -0
- package/dist/lib/format.d.ts +13 -0
- package/dist/lib/format.js +25 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/lib/visual-identity-text.d.ts +15 -0
- package/dist/lib/visual-identity-text.js +100 -0
- package/dist/tools/get-post.js +3 -3
- package/dist/tools/list-brands.js +3 -1
- package/dist/tools/list-jobs.d.ts +6 -6
- package/dist/tools/validate-post.d.ts +1176 -1165
- package/dist/tools/validate-post.js +15 -4
- package/package.json +1 -1
- package/server.json +2 -2
- package/tool-registry.json +18 -0
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { formatBrandComplianceSection } from '../lib/brand-compliance-text.js';
|
|
1
3
|
import { buildCreatePostPayload, createAccountPlatformResolver, createPostPayloadInputSchema, } from './create-post.js';
|
|
2
|
-
export const validatePostInputSchema = createPostPayloadInputSchema
|
|
4
|
+
export const validatePostInputSchema = createPostPayloadInputSchema.extend({
|
|
5
|
+
brand_compliance: z
|
|
6
|
+
.boolean()
|
|
7
|
+
.optional()
|
|
8
|
+
.describe('Advisory brand name and competitor checks; never blocks. Needs accounts:read.'),
|
|
9
|
+
});
|
|
3
10
|
export const validatePostTool = {
|
|
4
11
|
name: 'validate_post',
|
|
5
|
-
description: 'Validate and normalize one post without creating it. This does not create records, copy remote media, consume post-item/storage quota, reserve X quota, emit webhooks, or enqueue publication. Third-party media may return remote_media_not_materialized because live create performs storage copy and final byte validation. Use this before showing the final preview and asking for confirmation to call create_post.',
|
|
12
|
+
description: 'Validate and normalize one post without creating it. This does not create records, copy remote media, consume post-item/storage quota, reserve X quota, emit webhooks, or enqueue publication. Third-party media may return remote_media_not_materialized because live create performs storage copy and final byte validation. Use this before showing the final preview and asking for confirmation to call create_post. Advisory brand name and competitor checks with brand_compliance=true; never blocks.',
|
|
6
13
|
inputSchema: validatePostInputSchema,
|
|
7
14
|
async execute(client, input) {
|
|
8
|
-
const
|
|
9
|
-
const
|
|
15
|
+
const { brand_compliance: brandCompliance, ...postInput } = input;
|
|
16
|
+
const payload = await buildCreatePostPayload(postInput, createAccountPlatformResolver(client));
|
|
17
|
+
const result = await client.validatePost(payload, { brandCompliance: brandCompliance === true });
|
|
10
18
|
const lines = [
|
|
11
19
|
'Post validation passed.',
|
|
12
20
|
`• Platform: ${result.normalized.platform}`,
|
|
@@ -22,6 +30,9 @@ export const validatePostTool = {
|
|
|
22
30
|
lines.push(` - ${warning.code}: ${warning.message}`);
|
|
23
31
|
}
|
|
24
32
|
}
|
|
33
|
+
const complianceSection = formatBrandComplianceSection(result.brand_compliance);
|
|
34
|
+
if (complianceSection)
|
|
35
|
+
lines.push('', complianceSection, '');
|
|
25
36
|
lines.push('Show the final preview and obtain explicit confirmation before calling create_post.');
|
|
26
37
|
return lines.join('\n');
|
|
27
38
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posterly-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"mcpName": "io.github.awpthorp/posterly",
|
|
5
5
|
"description": "MCP server for posterly: schedule and publish social media posts across 18 platforms from any MCP client (Claude, ChatGPT, Cursor, Windsurf, Cline, and more)",
|
|
6
6
|
"license": "MIT",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.awpthorp/posterly",
|
|
4
4
|
"title": "posterly",
|
|
5
5
|
"description": "Validate, schedule, publish, and analyze social content across 18 platforms with posterly.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.58.0",
|
|
7
7
|
"websiteUrl": "https://www.poster.ly/mcp",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/awpthorp/posterly-mcp-server",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "posterly-mcp-server",
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.58.0",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
package/tool-registry.json
CHANGED
|
@@ -1158,6 +1158,24 @@
|
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
1160
|
},
|
|
1161
|
+
"chat_files": {
|
|
1162
|
+
"label": "Import files from the chat",
|
|
1163
|
+
"destructive": false,
|
|
1164
|
+
"idempotent": true,
|
|
1165
|
+
"openWorld": true,
|
|
1166
|
+
"confirm": "none",
|
|
1167
|
+
"when": [
|
|
1168
|
+
"chat_files"
|
|
1169
|
+
],
|
|
1170
|
+
"params": {
|
|
1171
|
+
"chat_files": {
|
|
1172
|
+
"required": true
|
|
1173
|
+
},
|
|
1174
|
+
"workspace_id": {
|
|
1175
|
+
"type": "string"
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1161
1179
|
"url": {
|
|
1162
1180
|
"label": "Upload from a URL",
|
|
1163
1181
|
"destructive": false,
|