create-ampless 1.0.0-beta.182 → 1.0.0-beta.184

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
- // ai: { markdownRoutes: false, llmsTxt: { limit: 100 } },
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.2",
30
- "@ampless/plugin-analytics-ga4": "^0.2.0-beta.43",
31
- "@ampless/plugin-cookie-consent": "^0.1.0-beta.34",
32
- "@ampless/plugin-gtm": "^0.2.0-beta.42",
33
- "@ampless/plugin-og-image": "^0.2.0-beta.59",
34
- "@ampless/plugin-plausible": "^0.2.0-beta.42",
35
- "@ampless/plugin-reading-time": "^0.1.0-beta.33",
36
- "@ampless/plugin-rss": "^0.2.0-beta.59",
37
- "@ampless/plugin-schema-jsonld": "^0.1.1-beta.38",
38
- "@ampless/plugin-seo": "^0.2.0-beta.59",
39
- "@ampless/plugin-webhook": "^0.2.0-beta.60",
40
- "@ampless/admin": "^1.0.0-beta.107",
41
- "@ampless/backend": "^1.0.0-beta.89",
42
- "@ampless/runtime": "^1.0.0-beta.72",
29
+ "@ampless/plugin-ai-actions": "^0.1.0-beta.3",
30
+ "@ampless/plugin-analytics-ga4": "^0.2.0-beta.44",
31
+ "@ampless/plugin-cookie-consent": "^0.1.0-beta.35",
32
+ "@ampless/plugin-gtm": "^0.2.0-beta.43",
33
+ "@ampless/plugin-og-image": "^0.2.0-beta.60",
34
+ "@ampless/plugin-plausible": "^0.2.0-beta.43",
35
+ "@ampless/plugin-reading-time": "^0.1.0-beta.34",
36
+ "@ampless/plugin-rss": "^0.2.0-beta.60",
37
+ "@ampless/plugin-schema-jsonld": "^0.1.1-beta.39",
38
+ "@ampless/plugin-seo": "^0.2.0-beta.60",
39
+ "@ampless/plugin-webhook": "^0.2.0-beta.61",
40
+ "@ampless/admin": "^1.0.0-beta.108",
41
+ "@ampless/backend": "^1.0.0-beta.90",
42
+ "@ampless/runtime": "^1.0.0-beta.73",
43
43
  "@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
44
- "ampless": "^1.0.0-beta.59",
44
+ "ampless": "^1.0.0-beta.60",
45
45
  "aws-amplify": "^6.17.0",
46
46
  "class-variance-authority": "^0.7.1",
47
47
  "clsx": "^2.1.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ampless",
3
- "version": "1.0.0-beta.182",
3
+ "version": "1.0.0-beta.184",
4
4
  "description": "Create a new ampless project",
5
5
  "license": "MIT",
6
6
  "type": "module",