openvibers/openvibe.community Commits

openvibe-shared v4.108.0 (was v4.107.4) (#252)

OP OpenVibers committed 10 days ago · 4a27d92723 · 8 files, +33 −21

* openvibe-shared v4.108.0 (was v4.107.4)

Opened by scripts/pin-bump.js in OpenVibers/OpenVibe.Shared after the v4.108.0 release.

* llms.txt links each page at its Markdown twin, with an ## Optional section (AGT-5)

* llms.txt: the OpenAPI document stays a main section, not Optional (AGT-5 review)

Changes

ddiff --git a/README.md b/README.md
iindex 84caf20..d27a826 100644
---- a/README.md
++++ b/README.md
@@@ -42,7 +42,7 @@ little progressive JavaScript for pagination, copy buttons and the upload path.
(a space's room), OpenVibe.Events (the outbox relay and the Pulse and account subscriptions)
- OpenVibe.Live only for old VOD/clip comment imports (it reads and writes no pastes here any more)
- `openvibe-contracts` v0.112.0, `openvibe-sdk` v0.82.0 (events outbox, per-actor limits, no-looks),
-- `openvibe-shared` v4.107.4, pinned by release tarball
++ `openvibe-shared` v4.108.0, pinned by release tarball
## How it fits the network
@@@ -852,5 +852,5 @@ release after paste comments moved onto the typed comment threads. [Submissions]
<!-- versions:start -->
- openvibe-contracts: v0.222.0
- openvibe-sdk: v0.82.0
--- openvibe-shared: v4.107.4
++- openvibe-shared: v4.108.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex 9d9cd86..abca60d 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -9,7 +9,7 @@
"domain": "openvibe.community",
"contracts": "openvibe-contracts v0.222.0",
"sdk": "openvibe-sdk v0.82.0",
-- "shared": "openvibe-shared v4.107.4",
++ "shared": "openvibe-shared v4.108.0",
"capabilities": [
"community.paste.create",
"community.paste.write",
ddiff --git a/package-lock.json b/package-lock.json
iindex 1966d8c..7017da5 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -19,7 +19,7 @@
"multer": "^2.4.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.82.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.107.4",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.108.0",
"pg": "^8.23.0"
},
"devDependencies": {
@@@ -1236,9 +1236,9 @@
}
},
"node_modules/openvibe-shared": {
-- "version": "4.107.4",
-- "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.107.4",
-- "integrity": "sha512-tThN0m3KMncEHVcBOvE+ysHjsZTlVIDLG1P+/i2Mulmxfc/AUpebAXhpWWrut50OChZ8o+HeePxsSrPI8mUQOQ==",
++ "version": "4.108.0",
++ "resolved": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.108.0",
++ "integrity": "sha512-NPzwjxpzGIpFpIm4uw3+VwHfsxbJ2+cD9yuhRzSwolSwqv2kCmwaVtHJ0DA9gKO3K8PCBfIP3UpKzpuSbYEJ+g==",
"license": "MIT",
"dependencies": {
"jsonwebtoken": "^9.0.0",
ddiff --git a/package.json b/package.json
iindex a1b633d..6f17b7b 100644
---- a/package.json
++++ b/package.json
@@@ -30,7 +30,7 @@
"multer": "^2.4.0",
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-sdk": "https://codeload.github.com/OpenVibers/OpenVibe.SDK/tar.gz/refs/tags/v0.82.0",
-- "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.107.4",
++ "openvibe-shared": "https://codeload.github.com/OpenVibers/OpenVibe.Shared/tar.gz/refs/tags/v4.108.0",
"pg": "^8.23.0"
},
"engines": {
ddiff --git a/server/app.js b/server/app.js
iindex 37c0a0a..ae3d612 100644
---- a/server/app.js
++++ b/server/app.js
@@@ -278,8 +278,9 @@ async function createApp(opts = {}) {
app.get('/robots.txt', (_req, res) => res.type('text/plain').set('Cache-Control', cache.htmlHeaders({ maxAge: 3600 }))
.send(seo.robotsTxt({ sitemaps: [`${config.baseUrl}/sitemap.xml`], disallow: discovery.ROBOTS_DISALLOW })
+ `# Agent manifest: ${config.baseUrl}/.well-known/agent.json\n`));
++ const { sections: llmsSections, optional: llmsOptional } = discovery.llmsSections();
app.get('/llms.txt', (_req, res) => res.type('text/plain').set('Cache-Control', cache.htmlHeaders({ maxAge: 3600 }))
-- .send(seo.llmsTxt({ name: SITE_NAME, summary: discovery.SUMMARY, details: discovery.CONTENT_LABELS, sections: discovery.llmsSections() })));
++ .send(seo.llmsTxt({ name: SITE_NAME, summary: discovery.SUMMARY, details: discovery.CONTENT_LABELS, markdown: true, base: config.baseUrl, sections: llmsSections, optional: llmsOptional })));
app.get('/llms-full.txt', wrap(async (_req, res) => res.type('text/plain').set('Cache-Control', cache.htmlHeaders({ maxAge: 3600 }))
.send(seo.llmsFull({ site: SITE_NAME, summary: discovery.SUMMARY, base: config.baseUrl, sections: await discovery.llmsFullSections(), maxBytes: 512 * 1024 }))));
app.get('/sitemap.xml', async (_req, res) => {
ddiff --git a/server/discovery.js b/server/discovery.js
iindex 5349fe7..672dc49 100644
---- a/server/discovery.js
++++ b/server/discovery.js
@@@ -24,20 +24,24 @@ function useForum(forum) { _forum = forum || null; resetCaches(); }
// ── llms.txt / llms-full.txt (llmstxt.org) ───────────────────
function llmsSections() {
const u = config.baseUrl;
-- return [
-- { title: 'Browse', links: [
-- { title: 'Pastes', url: `${u}/pastes`, note: 'public pastes, newest first (?type=pastes|images|all, ?sort=views, ?lang=<language>)' },
-- { title: 'Forum', url: `${u}/s`, note: 'open discussion forums and their threads' },
-- { title: 'Pulse', url: `${u}/pulse`, note: 'network activity' },
-- ] },
-- { title: 'Machine-readable', links: [
++ return {
++ sections: [
++ { title: 'Browse', links: [
++ { title: 'OpenVibe.Community', url: `${u}/`, note: 'pastes, forum and network activity' },
++ { title: 'Pastes', url: `${u}/pastes`, note: 'public pastes, newest first (?type=pastes|images|all, ?sort=views, ?lang=<language>)' },
++ { title: 'Forum', url: `${u}/s`, note: 'open discussion forums and their threads', html: true },
++ { title: 'Pulse', url: `${u}/pulse`, note: 'network activity', html: true },
++ ] },
++ // The API is a primary entry for an agent, not something to skip.
++ { title: 'API', links: [{ title: 'OpenAPI 3.1 document', url: `${u}/openapi.json`, note: 'every /api route, with its fields' }] },
++ ],
++ optional: [
{ title: 'Sitemap', url: `${u}/sitemap.xml` },
{ title: 'Latest pastes (RSS)', url: `${u}/feed.xml` },
{ title: 'Latest threads (RSS)', url: `${u}/s/feed.xml` },
{ title: 'Full text for language models', url: `${u}/llms-full.txt` },
-- ] },
-- { title: 'API', links: [{ title: 'OpenAPI 3.1 document', url: `${u}/openapi.json`, note: 'every /api route, with its fields' }] },
-- ];
++ ],
++ };
}
/** The latest public threads and text pastes in full (no NSFW, no burn-after-read, nothing gated). */
ddiff --git a/test/discovery.test.js b/test/discovery.test.js
iindex 6af3e72..0b3aea0 100644
---- a/test/discovery.test.js
++++ b/test/discovery.test.js
@@@ -25,8 +25,13 @@ const { check, done } = require('./helpers/app');
});
await check('llms.txt sections link the site, the feeds and llms-full.txt', () => {
-- const txt = seo.llmsTxt({ name: 'OpenVibe.Community', summary: discovery.SUMMARY, details: discovery.CONTENT_LABELS, sections: discovery.llmsSections() });
-- assert.ok(txt.includes('## Browse\n\n- [Pastes](https://openvibe.community/pastes): public pastes, newest first'));
++ const { sections, optional } = discovery.llmsSections();
++ const txt = seo.llmsTxt({ name: 'OpenVibe.Community', summary: discovery.SUMMARY, details: discovery.CONTENT_LABELS, markdown: true, base: 'https://openvibe.community', sections, optional });
++ assert.ok(txt.includes('## Browse\n\n- [OpenVibe.Community](https://openvibe.community/index.md): pastes, forum and network activity'));
++ assert.ok(txt.includes('- [Pastes](https://openvibe.community/pastes.md): public pastes, newest first'));
++ assert.ok(txt.includes('- [Forum](https://openvibe.community/s) (HTML): open discussion forums and their threads'));
++ assert.ok(txt.includes('- [Pulse](https://openvibe.community/pulse) (HTML): network activity'));
++ assert.ok(txt.includes('## Optional\n\n- [Sitemap](https://openvibe.community/sitemap.xml)'));
assert.ok(txt.includes('- [Latest threads (RSS)](https://openvibe.community/s/feed.xml)'));
assert.ok(txt.includes('- [Full text for language models](https://openvibe.community/llms-full.txt)'));
assert.ok(txt.includes('labelled as AI-generated'));
ddiff --git a/test/seo.test.js b/test/seo.test.js
iindex 828ec04..4609792 100644
---- a/test/seo.test.js
++++ b/test/seo.test.js
@@@ -50,6 +50,8 @@ const { boot, check, done } = require('./helpers/app');
assert.strictEqual(r.status, 200);
assert.ok(r.headers.get('content-type').startsWith('text/plain'));
assert.ok(r.text.startsWith('# OpenVibe.Community\n'));
++ assert.ok(r.text.includes('[OpenVibe.Community](https://openvibe.community/index.md)'));
++ assert.ok(r.text.includes('## Optional\n'));
assert.ok(r.text.includes('- [Latest pastes (RSS)](https://openvibe.community/feed.xml)'));
assert.ok(r.text.includes('- [Full text for language models](https://openvibe.community/llms-full.txt)'));
const full = await t.get('/llms-full.txt');