pabal-web-mcp 1.2.1 → 1.2.2
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/dist/bin/mcp-server.js +12 -2
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/bin/mcp-server.js
CHANGED
|
@@ -2052,11 +2052,16 @@ function findExistingBlogPosts({
|
|
|
2052
2052
|
}));
|
|
2053
2053
|
}
|
|
2054
2054
|
|
|
2055
|
+
// src/constants/blog.constants.ts
|
|
2056
|
+
var DEFAULT_APP_SLUG = "developer";
|
|
2057
|
+
|
|
2055
2058
|
// src/tools/create-blog-html.ts
|
|
2056
2059
|
var toJsonSchema4 = zodToJsonSchema5;
|
|
2057
2060
|
var DATE_REGEX2 = /^\d{4}-\d{2}-\d{2}$/;
|
|
2058
2061
|
var createBlogHtmlInputSchema = z5.object({
|
|
2059
|
-
appSlug: z5.string().trim().min(1
|
|
2062
|
+
appSlug: z5.string().trim().min(1).default(DEFAULT_APP_SLUG).describe(
|
|
2063
|
+
`Product/app slug used for paths and CTAs. Defaults to "${DEFAULT_APP_SLUG}" when not provided.`
|
|
2064
|
+
),
|
|
2060
2065
|
title: z5.string().trim().optional().describe(
|
|
2061
2066
|
"English title used for slug (kebab-case). Falls back to topic when omitted."
|
|
2062
2067
|
),
|
|
@@ -2103,10 +2108,15 @@ IMPORTANT REQUIREMENTS:
|
|
|
2103
2108
|
1. The 'locale' parameter is REQUIRED. If the user does not provide a locale, you MUST ask them to specify which language/locale they want to write the blog in (e.g., 'en-US', 'ko-KR', 'ja-JP', etc.).
|
|
2104
2109
|
2. The 'content' parameter is REQUIRED. You (the LLM) must generate the HTML content based on the 'topic' and 'locale' provided by the user. The content should be written in the language corresponding to the locale AND match the writing style of existing blog posts for that locale.
|
|
2105
2110
|
3. The 'description' parameter is REQUIRED. You (the LLM) must generate this based on the topic, locale, AND the writing style of existing blog posts.
|
|
2111
|
+
4. The 'appSlug' parameter:
|
|
2112
|
+
- If the user explicitly requests "developer category", "developer blog", "personal category", "my category", or similar, you MUST set appSlug to "developer".
|
|
2113
|
+
- If the user mentions a specific app/product, use that app's slug.
|
|
2114
|
+
- If not specified, defaults to "developer".
|
|
2106
2115
|
|
|
2107
2116
|
Slug rules:
|
|
2108
2117
|
- slug = slugify(English title, kebab-case ASCII)
|
|
2109
2118
|
- path: public/blogs/<appSlug>/<slug>/<locale>.html
|
|
2119
|
+
- appSlug: Use "developer" when user requests developer/personal category. Defaults to "developer" if not specified.
|
|
2110
2120
|
- coverImage default: /products/<appSlug>/og-image.png (relative paths are rewritten under /blogs/<app>/<slug>/)
|
|
2111
2121
|
- overwrite defaults to false (throws when file exists)
|
|
2112
2122
|
|
|
@@ -2124,7 +2134,7 @@ Supports multiple locales when locales[] is provided. Each locale gets its own H
|
|
|
2124
2134
|
async function handleCreateBlogHtml(input) {
|
|
2125
2135
|
const publicDir = getPublicDir();
|
|
2126
2136
|
const {
|
|
2127
|
-
appSlug,
|
|
2137
|
+
appSlug = DEFAULT_APP_SLUG,
|
|
2128
2138
|
topic,
|
|
2129
2139
|
title,
|
|
2130
2140
|
description,
|
package/dist/index.d.ts
CHANGED
|
@@ -512,7 +512,8 @@ interface BlogMetaOutput {
|
|
|
512
512
|
}
|
|
513
513
|
interface CreateBlogHtmlInput {
|
|
514
514
|
/**
|
|
515
|
-
* Product/app slug used for paths and CTAs
|
|
515
|
+
* Product/app slug used for paths and CTAs.
|
|
516
|
+
* Defaults to "developer" when not provided.
|
|
516
517
|
*/
|
|
517
518
|
appSlug: string;
|
|
518
519
|
/**
|