nuxt-ai-ready 1.6.0 → 1.7.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 +2 -0
- package/dist/cli.mjs +3 -1
- package/dist/devtools/lib/ai-ready/state.ts +4 -1
- package/dist/module.d.mts +18 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +879 -60
- package/dist/runtime/llms-txt-utils.d.ts +1 -1
- package/dist/runtime/llms-txt-utils.js +1 -1
- package/dist/runtime/server/db/drizzle/client.d.ts +1 -1
- package/dist/runtime/server/db/drizzle/providers/bun.d.ts +1 -1
- package/dist/runtime/server/db/drizzle/providers/bun.js +1 -1
- package/dist/runtime/server/db/drizzle/providers/d1.d.ts +1 -1
- package/dist/runtime/server/db/drizzle/providers/d1.js +1 -1
- package/dist/runtime/server/db/drizzle/providers/dbPath.js +2 -1
- package/dist/runtime/server/db/drizzle/providers/libsql.d.ts +1 -1
- package/dist/runtime/server/db/drizzle/providers/libsql.js +1 -1
- package/dist/runtime/server/db/drizzle/providers/neon.d.ts +1 -1
- package/dist/runtime/server/db/drizzle/providers/neon.js +1 -1
- package/dist/runtime/server/db/drizzle/providers/sqlite.d.ts +1 -1
- package/dist/runtime/server/db/drizzle/providers/sqlite.js +1 -1
- package/dist/runtime/server/db/drizzle/queries.d.ts +1 -1
- package/dist/runtime/server/db/drizzle/queries.js +1 -1
- package/dist/runtime/server/db/drizzle/raw.d.ts +1 -1
- package/dist/runtime/server/db/queries.d.ts +1 -1
- package/dist/runtime/server/db/queries.js +1 -1
- package/dist/runtime/server/db/shared.js +10 -4
- package/dist/runtime/server/mcp/resources/pages.js +1 -1
- package/dist/runtime/server/mcp/tools/get-page-markdown.js +1 -1
- package/dist/runtime/server/mcp/tools/list-pages.js +1 -1
- package/dist/runtime/server/mcp/tools/search-pages.js +1 -1
- package/dist/runtime/server/middleware/markdown.d.ts +1 -1
- package/dist/runtime/server/middleware/markdown.js +8 -4
- package/dist/runtime/server/middleware/markdown.prerender.d.ts +1 -1
- package/dist/runtime/server/middleware/markdown.prerender.js +10 -4
- package/dist/runtime/server/plugins/db-lifecycle.d.ts +3 -1
- package/dist/runtime/server/plugins/html-capture.prerender.d.ts +3 -1
- package/dist/runtime/server/plugins/mcp-data.d.ts +10 -2
- package/dist/runtime/server/plugins/sitemap-seeder.d.ts +3 -1
- package/dist/runtime/server/plugins/sitemap-seeder.js +1 -1
- package/dist/runtime/server/routes/__ai-ready/cron.get.d.ts +1 -1
- package/dist/runtime/server/routes/__ai-ready/cron.get.js +1 -1
- package/dist/runtime/server/routes/__ai-ready/devtools.get.d.ts +1 -1
- package/dist/runtime/server/routes/__ai-ready/devtools.get.js +2 -2
- package/dist/runtime/server/routes/__ai-ready/indexnow.post.d.ts +1 -1
- package/dist/runtime/server/routes/__ai-ready/indexnow.post.js +2 -2
- package/dist/runtime/server/routes/__ai-ready/pages.get.d.ts +1 -36
- package/dist/runtime/server/routes/__ai-ready/pages.get.js +2 -2
- package/dist/runtime/server/routes/__ai-ready/poll.post.d.ts +1 -7
- package/dist/runtime/server/routes/__ai-ready/poll.post.js +1 -1
- package/dist/runtime/server/routes/__ai-ready/prune.post.d.ts +1 -13
- package/dist/runtime/server/routes/__ai-ready/prune.post.js +2 -2
- package/dist/runtime/server/routes/__ai-ready/restore.post.d.ts +1 -4
- package/dist/runtime/server/routes/__ai-ready/restore.post.js +3 -3
- package/dist/runtime/server/routes/__ai-ready/status.get.d.ts +1 -1
- package/dist/runtime/server/routes/__ai-ready/status.get.js +2 -2
- package/dist/runtime/server/routes/__ai-ready-debug.get.d.ts +1 -103
- package/dist/runtime/server/routes/__ai-ready-debug.get.js +2 -2
- package/dist/runtime/server/routes/agent-skills-artifact.d.ts +2 -0
- package/dist/runtime/server/routes/agent-skills-artifact.js +19 -0
- package/dist/runtime/server/routes/agent-skills-index.d.ts +2 -0
- package/dist/runtime/server/routes/agent-skills-index.js +9 -0
- package/dist/runtime/server/routes/api-catalog.d.ts +4 -0
- package/dist/runtime/server/routes/api-catalog.js +13 -0
- package/dist/runtime/server/routes/indexnow-key.get.d.ts +1 -1
- package/dist/runtime/server/routes/indexnow-key.get.js +2 -2
- package/dist/runtime/server/routes/llms-full.txt.get.d.ts +1 -1
- package/dist/runtime/server/routes/llms-full.txt.get.js +2 -2
- package/dist/runtime/server/routes/llms.txt.get.d.ts +1 -1
- package/dist/runtime/server/routes/llms.txt.get.js +2 -2
- package/dist/runtime/server/routes/mcp-server-card.d.ts +3 -0
- package/dist/runtime/server/routes/mcp-server-card.js +20 -0
- package/dist/runtime/server/tasks/ai-ready-cron.d.ts +1 -1
- package/dist/runtime/server/tasks/ai-ready-cron.js +1 -1
- package/dist/runtime/server/utils/auth.d.ts +1 -1
- package/dist/runtime/server/utils/auth.js +2 -2
- package/dist/runtime/server/utils/batchIndex.d.ts +1 -1
- package/dist/runtime/server/utils/checkStale.d.ts +1 -1
- package/dist/runtime/server/utils/checkStale.js +1 -1
- package/dist/runtime/server/utils/cloudflare.d.ts +1 -1
- package/dist/runtime/server/utils/content-negotiation.d.ts +9 -2
- package/dist/runtime/server/utils/content.d.ts +1 -1
- package/dist/runtime/server/utils/context.d.ts +1 -1
- package/dist/runtime/server/utils/context.js +1 -1
- package/dist/runtime/server/utils/fetch.d.ts +3 -0
- package/dist/runtime/server/utils/fetch.js +10 -0
- package/dist/runtime/server/utils/indexPage.d.ts +1 -1
- package/dist/runtime/server/utils/indexPage.js +6 -4
- package/dist/runtime/server/utils/indexnow.d.ts +1 -1
- package/dist/runtime/server/utils/indexnow.js +1 -1
- package/dist/runtime/server/utils/link-header.js +3 -0
- package/dist/runtime/server/utils/runCron.d.ts +1 -1
- package/dist/runtime/server/utils/runCron.js +1 -1
- package/dist/runtime/server/utils/sitemap.d.ts +1 -1
- package/dist/runtime/server/utils/sitemap.js +3 -2
- package/dist/runtime/server/utils.d.ts +1 -1
- package/dist/runtime/server/utils.js +2 -2
- package/dist/runtime/types.d.ts +105 -0
- package/dist/types.d.mts +1 -1
- package/package.json +13 -9
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ Nuxt AI Ready implements both. It converts your pages to markdown, generates llm
|
|
|
22
22
|
- 📡 **Content Signals**: Configure AI training/search/input permissions via [Nuxt Robots](https://nuxtseo.com/robots)
|
|
23
23
|
- 🌐 **Sitemap Integration**: Index AI-allowed pages via [Nuxt Sitemap](https://nuxtseo.com/sitemap)
|
|
24
24
|
- ⚡ **MCP Server**: List, search and read indexed pages through `@nuxtjs/mcp-toolkit`
|
|
25
|
+
- 🔎 **[API Catalog](https://nuxtseo.com/ai-ready/guides/api-catalog)**: Publish RFC 9727 API discovery metadata and advertise it through `Link` headers
|
|
26
|
+
- 🧠 **Agent Skills**: Publish verified local or external skills through the v0.2.0 discovery index
|
|
25
27
|
- 🧩 **[WebMCP](https://nuxtseo.com/ai-ready/guides/webmcp)**: Give browser agents access to built-in site tools or your own tools with `useWebMcpTool()`
|
|
26
28
|
- 🗄️ **Runtime Indexing**: Index pages on-demand without prerendering, with SQLite/D1/LibSQL support
|
|
27
29
|
- 🔔 **[IndexNow](https://nuxtseo.com/ai-ready/guides/indexnow)**: Instantly notify Bing, Yandex, and other search engines when pages change
|
package/dist/cli.mjs
CHANGED
|
@@ -12,7 +12,9 @@ async function getSecret(cwd) {
|
|
|
12
12
|
if (!existsSync(secretPath)) {
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
-
return fsp.readFile(secretPath, "utf-8").then((s) => s.trim()).catch(() =>
|
|
15
|
+
return fsp.readFile(secretPath, "utf-8").then((s) => s.trim()).catch(() => {
|
|
16
|
+
return null;
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
19
|
function authHeaders(secret) {
|
|
18
20
|
return { Authorization: `Bearer ${secret}` };
|
|
@@ -9,7 +9,10 @@ export const loading = ref(true)
|
|
|
9
9
|
export async function refreshSources() {
|
|
10
10
|
if (!appFetch.value || typeof appFetch.value !== 'function')
|
|
11
11
|
return
|
|
12
|
-
data.value = await appFetch.value('/__ai-ready__/debug.json', { responseType: 'json' }).catch(() =>
|
|
12
|
+
data.value = await appFetch.value('/__ai-ready__/debug.json', { responseType: 'json' }).catch(() => {
|
|
13
|
+
// The devtools host can disconnect while a refresh is in flight.
|
|
14
|
+
return null
|
|
15
|
+
})
|
|
13
16
|
loading.value = false
|
|
14
17
|
if (data.value?.siteConfigUrl)
|
|
15
18
|
productionUrl.value = data.value.siteConfigUrl
|
package/dist/module.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
import { LlmsTxtConfig, ContentNegotiationPolicy, ModuleOptions } from '../dist/runtime/types.js';
|
|
3
|
-
export { ModuleOptions } from '../dist/runtime/types.js';
|
|
3
|
+
export { AgentSkillConfig, AgentSkillsConfig, AgentSkillsIndex, AgentSkillsIndexEntry, ApiCatalogConfig, ApiCatalogEntry, ApiCatalogLinkTarget, ApiCatalogLinks, ExternalAgentSkillConfig, LocalAgentSkillConfig, McpServerCardConfig, ModuleOptions } from '../dist/runtime/types.js';
|
|
4
4
|
import { ResolvedWebMcpToolsConfig } from '../dist/runtime/site-tool-config.js';
|
|
5
5
|
export { GetPageMarkdownToolOptions, ListPagesToolOptions, McpSiteToolAttachmentOptions, SearchPagesToolOptions, SiteToolOptions, SiteToolsConfig, WebMcpSiteToolAttachmentOptions } from '../dist/runtime/site-tool-config.js';
|
|
6
6
|
|
|
@@ -13,6 +13,22 @@ interface ParsedMarkdownResult {
|
|
|
13
13
|
updatedAt?: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
interface ResolvedApiCatalogLinkTarget {
|
|
17
|
+
href: string;
|
|
18
|
+
type?: string;
|
|
19
|
+
title?: string;
|
|
20
|
+
hreflang?: string[];
|
|
21
|
+
media?: string;
|
|
22
|
+
}
|
|
23
|
+
type ResolvedApiCatalogLinksetEntry = Record<string, string | ResolvedApiCatalogLinkTarget[]>;
|
|
24
|
+
interface ResolvedApiCatalogConfig {
|
|
25
|
+
href: string;
|
|
26
|
+
mediaType: string;
|
|
27
|
+
document: {
|
|
28
|
+
linkset: ResolvedApiCatalogLinksetEntry[];
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
16
32
|
interface ResolvedWebMcpConfig {
|
|
17
33
|
tools: ResolvedWebMcpToolsConfig;
|
|
18
34
|
exposedTo?: string[];
|
|
@@ -74,6 +90,7 @@ interface ModulePublicRuntimeConfig {
|
|
|
74
90
|
}>;
|
|
75
91
|
} | null;
|
|
76
92
|
ftsTokenizer?: string;
|
|
93
|
+
apiCatalog?: ResolvedApiCatalogConfig;
|
|
77
94
|
}
|
|
78
95
|
/** Runtime config exposed to the browser, only set when WebMCP is enabled. */
|
|
79
96
|
interface ModuleAppRuntimeConfig {
|