π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: mcp and skill description
Nevo David28701a989262
diff --git a/libraries/nestjs-libraries/src/chat/tools/integration.schedule.post.ts b/libraries/nestjs-libraries/src/chat/tools/integration.schedule.post.tsindex 9fa08a8e0..72c06abc4 100644--- a/libraries/nestjs-libraries/src/chat/tools/integration.schedule.post.ts+++ b/libraries/nestjs-libraries/src/chat/tools/integration.schedule.post.ts@@ -92,7 +92,7 @@ If validation fails, the result contains output.errors describing what to fix; tcontent: z.string().describe(- "The content of the post, HTML, Each line must be wrapped in <p> here is the possible tags: h1, h2, h3, u, strong, li, ul, p (you can't have u and strong together)"+ "The content of the post, HTML, Each line must be wrapped in <p> here is the possible tags: h1, h2, h3, u, strong, li, ul, p (you can't have u and strong together), and img (<img src=\"...\">) only when the integration rules say pictures go inside the content"),attachments: z.array(attachmentUrl)diff --git a/libraries/nestjs-libraries/src/chat/tools/upload.from.url.tool.ts b/libraries/nestjs-libraries/src/chat/tools/upload.from.url.tool.tsindex 7b7fb4dbb..9ea693e33 100644--- a/libraries/nestjs-libraries/src/chat/tools/upload.from.url.tool.ts+++ b/libraries/nestjs-libraries/src/chat/tools/upload.from.url.tool.ts@@ -15,7 +15,7 @@ export class UploadFromUrlTool implements AgentToolInterface {id: 'uploadFromUrlTool',description: `Upload a remote image or video into the media library from a public URL.Use this before scheduling a post when the user provides an external media URL (not already hosted on our domain),-so the attachment passes the upload-domain validation. Returns the hosted media { id, path } to use as an attachment, or { error } on failure.`,+so the attachment passes the upload-domain validation. Returns the hosted media { id, path } to use as an attachment (or as the src of an <img> in the content, when the channel rules say pictures go inside the content), or { error } on failure.`,mcp: {annotations: {title: 'Upload Media From URL',diff --git a/libraries/nestjs-libraries/src/integrations/social/listmonk.provider.ts b/libraries/nestjs-libraries/src/integrations/social/listmonk.provider.tsindex 86d2ee20c..7662e4497 100644--- a/libraries/nestjs-libraries/src/integrations/social/listmonk.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/listmonk.provider.ts@@ -12,7 +12,11 @@ import { ListmonkDto } from '@gitroom/nestjs-libraries/dtos/posts/providers-settimport { AuthService } from '@gitroom/helpers/auth/auth.service';import slugify from 'slugify';import { Tool } from '@gitroom/nestjs-libraries/integrations/tool.decorator';+import { Rules } from '@gitroom/nestjs-libraries/chat/rules.description.decorator';+@Rules(+ 'ListMonk sends the content as an email: pictures go inside the content as <img src="..."> where they should appear, the src must be a picture from the media library (upload it with uploadFromUrlTool first), attachments are not sent'+)export class ListmonkProvider extends SocialAbstract implements SocialProvider {override maxConcurrentJob = 100; // Bluesky has moderate rate limitsidentifier = 'listmonk';diff --git a/libraries/nestjs-libraries/src/integrations/social/wordpress.provider.ts b/libraries/nestjs-libraries/src/integrations/social/wordpress.provider.tsindex 80ba83cd6..c7fc44a21 100644--- a/libraries/nestjs-libraries/src/integrations/social/wordpress.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/wordpress.provider.ts@@ -12,11 +12,15 @@ import { WordpressDto } from '@gitroom/nestjs-libraries/dtos/posts/providers-setimport slugify from 'slugify';// import FormData from 'form-data';import { Tool } from '@gitroom/nestjs-libraries/integrations/tool.decorator';+import { Rules } from '@gitroom/nestjs-libraries/chat/rules.description.decorator';import { getSsrfSafeDispatcher } from '@gitroom/nestjs-libraries/dtos/webhooks/ssrf.safe.dispatcher';import { string } from 'yup';const WORDPRESS_USER_AGENT = 'Postiz/1.0 (+https://postiz.com)';+@Rules(+ 'WordPress publishes the content as an article: pictures go inside the content as <img src="..."> where they should appear, the src must be a picture from the media library (upload it with uploadFromUrlTool first), attachments are not published, the cover picture is the main_image setting'+)export class WordpressProviderextends SocialAbstractimplements SocialProviderdiff --git a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts b/libraries/nestjs-libraries/src/integrations/social/x.provider.tsindex bcab39263..7c854ffa4 100644--- a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts@@ -66,7 +66,7 @@ type XPendingData = {};@Rules(- `X can have maximum 4 pictures, or maximum one video, it can also be without attachments, it can also be published as a long-form article (draft or published) when post_type is set to article ${+ `X can have maximum 4 pictures, or maximum one video, it can also be without attachments, it can also be published as a long-form article (draft or published) when post_type is set to article, in an article pictures go inside the content as <img src="..."> where they should appear (the src must be a picture from the media library, upload it with uploadFromUrlTool first) ${process.env.STRIP_LINKS_FROM_X_POSTS? 'do not add links, they will be stripped from the post': ''