@olonjs/core 1.0.103 → 1.0.105

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olonjs/core",
3
- "version": "1.0.103",
3
+ "version": "1.0.105",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/olonjs-core.umd.cjs",
@@ -50,29 +50,28 @@
50
50
  "@dnd-kit/sortable": "^9.0.0",
51
51
  "@dnd-kit/utilities": "^3.2.2",
52
52
  "@radix-ui/react-popover": "^1.1.4",
53
+ "@radix-ui/react-slot": "^1.1.0",
53
54
  "@radix-ui/react-scroll-area": "^1.2.2",
54
55
  "@radix-ui/react-select": "^2.1.6",
55
- "@radix-ui/react-slot": "^1.1.0",
56
56
  "@radix-ui/react-tooltip": "^1.1.6",
57
- "clsx": "^2.1.1",
58
57
  "lucide-react": "^0.474.0",
59
- "mqtt": "^5.15.1",
60
58
  "radix-ui": "^1.4.3",
61
- "tailwind-merge": "^3.0.1"
59
+ "tailwind-merge": "^3.0.1",
60
+ "clsx": "^2.1.1"
62
61
  },
63
62
  "devDependencies": {
64
63
  "@olonjs/stack": "^1.0.0",
64
+ "vite": "^6.0.0",
65
+ "@vitejs/plugin-react": "^4.0.0",
66
+ "vite-plugin-dts": "^4.0.0",
67
+ "typescript": "^5.7.3",
68
+ "@types/react": "^19.0.0",
69
+ "@types/react-dom": "^19.0.0",
65
70
  "@tailwindcss/vite": "^4.0.0",
66
71
  "@testing-library/jest-dom": "^6.6.3",
67
72
  "@testing-library/react": "^16.2.0",
68
73
  "@testing-library/user-event": "^14.6.1",
69
- "@types/react": "^19.0.0",
70
- "@types/react-dom": "^19.0.0",
71
- "@vitejs/plugin-react": "^4.0.0",
72
74
  "jsdom": "^26.0.0",
73
- "typescript": "^5.7.3",
74
- "vite": "^6.0.0",
75
- "vite-plugin-dts": "^4.0.0",
76
75
  "vitest": "^3.0.0"
77
76
  }
78
77
  }
@@ -315,6 +315,12 @@ export function buildPageManifest({ slug, pageConfig, schemas, siteConfig }) {
315
315
  mimeType: 'application/json',
316
316
  description: `Structured content for the ${slug} page.`,
317
317
  },
318
+ {
319
+ uri: 'olon://pages',
320
+ name: 'Site Map',
321
+ mimeType: 'application/json',
322
+ description: 'Structured content for the map of this site',
323
+ },
318
324
  ],
319
325
  },
320
326
  sectionTypes: contract.sectionTypes,
@@ -346,4 +352,37 @@ export function buildSiteManifest({ pages, schemas, siteConfig }) {
346
352
  };
347
353
  }),
348
354
  };
355
+ }
356
+
357
+ export function buildLlmsTxt({ pages, schemas, siteConfig }) {
358
+ const site = siteConfig && typeof siteConfig === 'object' ? siteConfig : {};
359
+ const siteTitle = site.identity?.title || 'OlonJS Site';
360
+
361
+ const manifestIndex = buildSiteManifest({ pages, schemas, siteConfig });
362
+
363
+ let md = `# ${siteTitle}\n\n`;
364
+
365
+ if (manifestIndex.pages.some(p => p.slug === 'home')) {
366
+ const homePage = manifestIndex.pages.find(p => p.slug === 'home');
367
+ if (homePage.description) {
368
+ md += `${homePage.description}\n\n`;
369
+ }
370
+ }
371
+
372
+ md += `> **AI Agents:** This site is built with OlonJS. It exposes a native Model Context Protocol (MCP) manifest for direct structural interaction. \n`;
373
+ md += `> To read the site map or access structured content, use the URI \`olon://pages\` or \`olon://pages/[slug]\`.\n`;
374
+ md += `> Endpoint: \`/mcp-manifest.json\`\n\n`;
375
+
376
+ md += `## Pages\n\n`;
377
+
378
+ for (const page of manifestIndex.pages) {
379
+ const urlPath = page.slug === 'home' ? '/' : `/${page.slug}`;
380
+ md += `- **[${page.title}](${urlPath})** (\`${page.slug}\`)\n`;
381
+ if (page.description) {
382
+ md += ` ${page.description}\n`;
383
+ }
384
+ md += ` *Contract:* \`${page.contractHref}\` | *Manifest:* \`${page.manifestHref}\`\n\n`;
385
+ }
386
+
387
+ return md.trim();
349
388
  }