nuxt-ai-ready 3.0.0 → 3.0.1
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/module.json
CHANGED
|
@@ -3,6 +3,7 @@ import siteTools from "#ai-ready-virtual/site-tools.mjs";
|
|
|
3
3
|
import { useEvent } from "#nuxtseo/nitro";
|
|
4
4
|
import { normalizeSiteRoute, SITE_TOOL_CATALOG } from "../../../site-tool-catalog.js";
|
|
5
5
|
import { queryPages } from "../../db/queries.js";
|
|
6
|
+
import { siteToolCacheKey } from "../cache-key.js";
|
|
6
7
|
const inputSchema = {
|
|
7
8
|
route: z.string().describe(SITE_TOOL_CATALOG.get_page_markdown.parameters.route)
|
|
8
9
|
};
|
|
@@ -13,7 +14,7 @@ const tool = {
|
|
|
13
14
|
inputSchema,
|
|
14
15
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
15
16
|
enabled: () => siteTools.getPageMarkdown.mcp.enabled,
|
|
16
|
-
cache: "5m",
|
|
17
|
+
cache: { maxAge: "5m", getKey: siteToolCacheKey },
|
|
17
18
|
async handler({ route }) {
|
|
18
19
|
const path = normalizeSiteRoute(route);
|
|
19
20
|
if (!path) {
|
|
@@ -3,6 +3,7 @@ import siteTools from "#ai-ready-virtual/site-tools.mjs";
|
|
|
3
3
|
import { useEvent } from "#nuxtseo/nitro";
|
|
4
4
|
import { SITE_TOOL_CATALOG } from "../../../site-tool-catalog.js";
|
|
5
5
|
import { countPages, queryPages } from "../../db/queries.js";
|
|
6
|
+
import { siteToolCacheKey } from "../cache-key.js";
|
|
6
7
|
const inputSchema = {
|
|
7
8
|
limit: z.number().int().min(1).max(50).optional().default(siteTools.listPages.defaultLimit).describe(
|
|
8
9
|
`${SITE_TOOL_CATALOG.list_pages.parameters.limit} Defaults to ${siteTools.listPages.defaultLimit}.`
|
|
@@ -16,7 +17,7 @@ const tool = {
|
|
|
16
17
|
inputSchema,
|
|
17
18
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
18
19
|
enabled: () => siteTools.listPages.mcp.enabled,
|
|
19
|
-
cache: "1h",
|
|
20
|
+
cache: { maxAge: "1h", getKey: siteToolCacheKey },
|
|
20
21
|
async handler({ limit, offset }) {
|
|
21
22
|
const event = useEvent();
|
|
22
23
|
const pages = await queryPages(event, { limit, offset });
|
|
@@ -3,6 +3,7 @@ import siteTools from "#ai-ready-virtual/site-tools.mjs";
|
|
|
3
3
|
import { useEvent } from "#nuxtseo/nitro";
|
|
4
4
|
import { SITE_TOOL_CATALOG } from "../../../site-tool-catalog.js";
|
|
5
5
|
import { searchPages } from "../../db/queries.js";
|
|
6
|
+
import { siteToolCacheKey } from "../cache-key.js";
|
|
6
7
|
const inputSchema = {
|
|
7
8
|
query: z.string().describe(SITE_TOOL_CATALOG.search_pages.parameters.query),
|
|
8
9
|
limit: z.number().int().min(1).max(50).optional().default(siteTools.searchPages.defaultLimit).describe(
|
|
@@ -16,7 +17,7 @@ const tool = {
|
|
|
16
17
|
inputSchema,
|
|
17
18
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
18
19
|
enabled: () => siteTools.searchPages.mcp.enabled,
|
|
19
|
-
cache: "5m",
|
|
20
|
+
cache: { maxAge: "5m", getKey: siteToolCacheKey },
|
|
20
21
|
async handler({ query, limit }) {
|
|
21
22
|
const event = useEvent();
|
|
22
23
|
const results = await searchPages(event, query, { limit });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-ai-ready",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"description": "Best practice AI & LLM discoverability for Nuxt sites.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"mdream": "^2.0.1",
|
|
83
83
|
"nuxt-site-config": "^5.0.0",
|
|
84
84
|
"nuxtseo-shared": "^6.0.0",
|
|
85
|
+
"ohash": "^2.0.12",
|
|
85
86
|
"pathe": "^2.0.3",
|
|
86
87
|
"site-config-stack": "^5.0.0",
|
|
87
88
|
"sitemapd": "^0.2.2",
|