create-ampless 1.0.0-beta.182 → 1.0.0-beta.185
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.
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ampless } from '@/lib/ampless'
|
|
2
|
+
import { createPublicMcpRouteHandler } from '@ampless/runtime/routes'
|
|
3
|
+
|
|
4
|
+
// Anonymous, read-only public MCP endpoint (JSON-RPC 2.0 over POST).
|
|
5
|
+
// Only active when `cms.config.ai.publicMcp === true`; otherwise every
|
|
6
|
+
// method 404s. The factory returns BOTH handlers — destructure them so
|
|
7
|
+
// the CORS preflight (OPTIONS) is wired up too. A single
|
|
8
|
+
// `export const POST = createPublicMcpRouteHandler(ampless)` would drop
|
|
9
|
+
// OPTIONS.
|
|
10
|
+
const handlers = createPublicMcpRouteHandler(ampless)
|
|
11
|
+
export const POST = handlers.POST
|
|
12
|
+
export const OPTIONS = handlers.OPTIONS
|
|
13
|
+
|
|
14
|
+
// Node runtime required: the route's circuit breaker is module-scope
|
|
15
|
+
// state that only persists on a warm Node lambda.
|
|
16
|
+
export const runtime = 'nodejs'
|
|
@@ -48,8 +48,13 @@ export default defineConfig({
|
|
|
48
48
|
// history: { retentionDays: 0 }, // 0 = keep every revision forever; e.g. 365 to expire after a year
|
|
49
49
|
// AI-readable publishing. `/<slug>.md` serves a markdown projection of
|
|
50
50
|
// each published post and `/llms.txt` serves a site-wide AI index
|
|
51
|
-
// (both default: enabled).
|
|
52
|
-
//
|
|
51
|
+
// (both default: enabled). `publicMcp` (default: false) exposes an
|
|
52
|
+
// anonymous, read-only MCP endpoint at `/api/mcp` — published posts
|
|
53
|
+
// only, never writes. Because it is unauthenticated it is opt-in, and
|
|
54
|
+
// its built-in circuit breaker is a coarse warm-instance guard, not a
|
|
55
|
+
// per-IP rate limiter: pair `publicMcp: true` with CloudFront / WAF for
|
|
56
|
+
// real abuse protection.
|
|
57
|
+
// ai: { markdownRoutes: false, llmsTxt: { limit: 100 }, publicMcp: true },
|
|
53
58
|
// Active plugins. Order doesn't matter; the runtime aggregates metadata
|
|
54
59
|
// and runs hooks for events each plugin subscribes to.
|
|
55
60
|
//
|
|
@@ -26,22 +26,22 @@
|
|
|
26
26
|
"@tiptap/pm": "^3.23.6",
|
|
27
27
|
"@tiptap/react": "^3.23.6",
|
|
28
28
|
"@tiptap/starter-kit": "^3.23.6",
|
|
29
|
-
"@ampless/plugin-ai-actions": "^0.1.0-beta.
|
|
30
|
-
"@ampless/plugin-analytics-ga4": "^0.2.0-beta.
|
|
31
|
-
"@ampless/plugin-cookie-consent": "^0.1.0-beta.
|
|
32
|
-
"@ampless/plugin-gtm": "^0.2.0-beta.
|
|
33
|
-
"@ampless/plugin-og-image": "^0.2.0-beta.
|
|
34
|
-
"@ampless/plugin-plausible": "^0.2.0-beta.
|
|
35
|
-
"@ampless/plugin-reading-time": "^0.1.0-beta.
|
|
36
|
-
"@ampless/plugin-rss": "^0.2.0-beta.
|
|
37
|
-
"@ampless/plugin-schema-jsonld": "^0.1.1-beta.
|
|
38
|
-
"@ampless/plugin-seo": "^0.2.0-beta.
|
|
39
|
-
"@ampless/plugin-webhook": "^0.2.0-beta.
|
|
40
|
-
"@ampless/admin": "^1.0.0-beta.
|
|
41
|
-
"@ampless/backend": "^1.0.0-beta.
|
|
42
|
-
"@ampless/runtime": "^1.0.0-beta.
|
|
29
|
+
"@ampless/plugin-ai-actions": "^0.1.0-beta.4",
|
|
30
|
+
"@ampless/plugin-analytics-ga4": "^0.2.0-beta.45",
|
|
31
|
+
"@ampless/plugin-cookie-consent": "^0.1.0-beta.36",
|
|
32
|
+
"@ampless/plugin-gtm": "^0.2.0-beta.44",
|
|
33
|
+
"@ampless/plugin-og-image": "^0.2.0-beta.61",
|
|
34
|
+
"@ampless/plugin-plausible": "^0.2.0-beta.44",
|
|
35
|
+
"@ampless/plugin-reading-time": "^0.1.0-beta.35",
|
|
36
|
+
"@ampless/plugin-rss": "^0.2.0-beta.61",
|
|
37
|
+
"@ampless/plugin-schema-jsonld": "^0.1.1-beta.40",
|
|
38
|
+
"@ampless/plugin-seo": "^0.2.0-beta.61",
|
|
39
|
+
"@ampless/plugin-webhook": "^0.2.0-beta.62",
|
|
40
|
+
"@ampless/admin": "^1.0.0-beta.109",
|
|
41
|
+
"@ampless/backend": "^1.0.0-beta.91",
|
|
42
|
+
"@ampless/runtime": "^1.0.0-beta.74",
|
|
43
43
|
"@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
|
|
44
|
-
"ampless": "^1.0.0-beta.
|
|
44
|
+
"ampless": "^1.0.0-beta.61",
|
|
45
45
|
"aws-amplify": "^6.17.0",
|
|
46
46
|
"class-variance-authority": "^0.7.1",
|
|
47
47
|
"clsx": "^2.1.1",
|