openvibers/openvibe.host Commits

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

OP OpenVibers committed 10 days ago · 5e1eb2bb92 · 6 files, +23 −9

* 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)

Changes

ddiff --git a/README.md b/README.md
iindex fb7b2a4..2ee8409 100644
---- a/README.md
++++ b/README.md
@@@ -382,7 +382,7 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
<!-- versions:start -->
- openvibe-contracts: v0.272.0
- openvibe-sdk: v0.82.0
--- openvibe-shared: v4.107.4
++- openvibe-shared: v4.108.0
- openvibe-publishing: v1.4.0
<!-- versions:end -->
---
ddiff --git a/STATUS.json b/STATUS.json
iindex 7c3db34..4f9cc98 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -15,11 +15,11 @@
"domain": "openvibe.host",
"contracts": "openvibe-contracts v0.272.0",
"sdk": "openvibe-sdk v0.82.0",
-- "shared": "openvibe-shared v4.107.4",
++ "shared": "openvibe-shared v4.108.0",
"packages": [
"openvibe-contracts v0.272.0",
"openvibe-sdk v0.82.0",
-- "openvibe-shared v4.107.4"
++ "openvibe-shared v4.108.0"
],
"capabilities": [
"host.catalog.manage"
ddiff --git a/package-lock.json b/package-lock.json
iindex 92b0bb6..5e981f8 100644
---- a/package-lock.json
++++ b/package-lock.json
@@@ -18,7 +18,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.272.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.4.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"
},
"bin": {
@@@ -1596,9 +1596,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 a24d68f..f75a2ff 100644
---- a/package.json
++++ b/package.json
@@@ -34,7 +34,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.272.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.4.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 55bde01..32365d9 100644
---- a/server/app.js
++++ b/server/app.js
@@@ -171,7 +171,11 @@ async function createApp(opts = {}) {
...(await catalog.providers()).map((p) => ({ title: p.name, url: `/catalog/providers/${p.slug}`, text: `Hosting plans from ${p.name}.` })),
...(await catalog.domains.sitemap()).map((t) => ({ title: `${require('./catalog/domains').displayTld(t.tld)} domain prices`, url: `/catalog/domains/${encodeURIComponent(t.tld)}`, text: 'Every registrar\'s price for this ending.' })),
...(await catalog.sitemapPlans()).map((p) => ({ title: `Hosting plan ${p.id}`, url: `/catalog/plans/${p.id}`, text: 'Sourced plan and price history.' }))];
-- app.get('/llms.txt', async (_req, res, next) => { try { res.type('text/plain').send(sharedSeo.llmsTxt({ name: 'OpenVibe.Host', summary, sections: [{ title: 'Public pages', links: (await allPages()).map((p) => ({ title: p.title, url: `${config.baseUrl}${p.url}` })) }] })); } catch (err) { next(err); } });
++ // AGT-5: each of Host's own pages is linked at its Markdown twin (openvibe-shared 4.108.0 leaves files and other
++ // links as they are). /terms, /privacy and /dmca are shared legal pages with no twin, so they are linked as HTML;
++ // what an agent may skip (the update log, /catalog/promos) is in `optional`, written last.
++ const LLMS_TWINLESS = new Set(legalPaths);
++ app.get('/llms.txt', async (_req, res, next) => { try { res.type('text/plain').send(sharedSeo.llmsTxt({ name: 'OpenVibe.Host', summary, markdown: true, base: config.baseUrl, sections: [{ title: 'Public pages', links: (await allPages()).map((p) => ({ title: p.title, url: `${config.baseUrl}${p.url}`, ...(LLMS_TWINLESS.has(p.url) ? { html: true } : {}) })) }], optional: [{ title: 'Hosting promotions', url: `${config.baseUrl}/catalog/promos`, note: 'current provider promotions' }, { title: 'What shipped on OpenVibe.Host', url: `${config.baseUrl}/updates`, note: 'the public update log' }, { title: 'Sitemap', url: `${config.baseUrl}/sitemap.xml` }, { title: 'Full text for language models', url: `${config.baseUrl}/llms-full.txt` }] })); } catch (err) { next(err); } });
app.get('/llms-full.txt', async (_req, res, next) => { try { res.type('text/plain').send(sharedSeo.llmsFull({ site: { name: 'OpenVibe.Host', url: config.baseUrl }, summary, base: config.baseUrl, maxBytes: 512 * 1024, sections: [{ title: 'Public pages', pages: await allPages() }] })); } catch (err) { next(err); } });
// /auth/me is the navbar's who-is-signed-in read on every page, so it is not counted with sign-ins: 60 page views in 15 minutes made a signed-in visitor look signed out.
app.use('/auth/', rateLimit({ windowMs: 15 * 60_000, max: 60, skip: (req) => req.path === '/me', standardHeaders: true, legacyHeaders: false }));
ddiff --git a/test/catalog-domains.test.js b/test/catalog-domains.test.js
iindex 969b299..80c0bf8 100644
---- a/test/catalog-domains.test.js
++++ b/test/catalog-domains.test.js
@@@ -162,6 +162,16 @@ function fakeRegistry() {
assert.strictEqual((await t.api('GET', '/domains/abc')).status, 410, 'old custom-domain pages still say hosting moved');
});
++ await check('llms.txt links each page at its Markdown twin, and ends with the Optional section (AGT-5)', async () => {
++ const r = await t.api('GET', '/llms.txt');
++ assert.strictEqual(r.status, 200);
++ assert.match(r.text, /\]\(https:\/\/openvibe\.host\/index\.md\)/, 'the home link is its twin');
++ assert.match(r.text, /\]\(https:\/\/openvibe\.host\/catalog\.md\)/);
++ assert.match(r.text, /\]\(https:\/\/openvibe\.host\/catalog\/providers\/porkbun\.md\)/, 'a catalog page is its twin');
++ assert.match(r.text, /\]\(https:\/\/openvibe\.host\/terms\) \(HTML\)/, 'the shared legal pages have no twin');
++ assert.match(r.text, /\n## Optional\n/);
++ });
++
await check('a name check: typed name read, registry asked, the same name priced at other endings; bad names are 422', async () => {
const free = await t.api('GET', '/catalog/domains/check?name=OpenVibe.dev');
assert.strictEqual(free.status, 200);