openvibers/openvibe.bot Commits

/try and /setup/sd-card have Markdown twins; llms.txt links them (#296)

OP OpenVibers committed 10 days ago · 0d507a54d4 · 3 files, +9 −3

The simulator page and the SD-card setup guide were listed in llms.txt as HTML pages with no twin; they are on the
router the twinned pages render through. The shared legal pages (another handler) stay HTML.

Changes

ddiff --git a/server/agent-pages.js b/server/agent-pages.js
iindex 6a22dc3..b198af7 100644
---- a/server/agent-pages.js
++++ b/server/agent-pages.js
@@@ -5,7 +5,8 @@
// without a session or a cookie, so a twin cannot drift from the page a browser gets and never carries a
// signed-in person's view. A page that is not public (a person's own page, a missing page) answers 404
// and has no twin.
--const TWIN_PATH_RE = /^\/(?:updates|docs(?:\/(?:drivers|profiles|automation|computers))?|robots|models(?:\/[^/]+)?|r\/[^/]+)?$/;
++// /try (the simulator, as text) and /setup/sd-card (the setup guide) since 11-03: llms.txt listed them as HTML pages.
++const TWIN_PATH_RE = /^\/(?:updates|try|setup\/sd-card|docs(?:\/(?:drivers|profiles|automation|computers))?|robots|models(?:\/[^/]+)?|r\/[^/]+)?$/;
/** A request as an anonymous browser makes it: no session, no cookies. */
function anonymousRequest(path, query, host) {
ddiff --git a/server/web/routes.js b/server/web/routes.js
iindex 23dbb41..98fed6e 100644
---- a/server/web/routes.js
++++ b/server/web/routes.js
@@@ -67,7 +67,7 @@ const PUBLIC_PAGES = ['/', '/try', '/robots', '/models', '/docs', '/docs/drivers
const LLMS_NAME = 'OpenVibe.Bot';
const LLMS_SUMMARY = 'An open control panel for robots: pair a robot with one pasted command and drive it from any '
+ 'browser, with roles, limits and a latched emergency stop on every command.';
--const LLMS_NO_TWIN = new Set(['/try', '/setup/sd-card', '/terms', '/privacy', '/dmca']);
++const LLMS_NO_TWIN = new Set(['/terms', '/privacy', '/dmca']);
const LLMS_LEGAL = new Set(['/terms', '/privacy', '/dmca']);
const LLMS_PAGES = [
{
ddiff --git a/test/llms.test.js b/test/llms.test.js
iindex 4a24f58..f00f641 100644
---- a/test/llms.test.js
++++ b/test/llms.test.js
@@@ -39,7 +39,12 @@ const TITLES = ['OpenVibe.Bot — drive your robot from any browser', 'Build for
PATHS.forEach((p, i) => assert.ok(body.includes(`- [${TITLES[i]}](${link(p)}`), `llms.txt lists ${p}`));
const optional = body.split('\n## Optional\n')[1] || '';
assert.ok(legal.every((p) => optional.includes(`${BASE}${p})`)) && optional.includes(`${BASE}/sitemap.xml`), 'the legal pages and the sitemap are optional');
-- assert.ok(body.includes(`(${BASE}/try) (HTML)`), 'the try page has no twin');
++ assert.ok(body.includes(`(${BASE}/try.md)`) && body.includes(`(${BASE}/setup/sd-card.md)`), 'the try page and the SD-card guide have twins (11-03)');
++ for (const p of ['/try.md', '/setup/sd-card.md']) {
++ const r = await get(p);
++ assert.strictEqual(r.status, 200, p);
++ assert.match(r.headers.get('content-type') || '', /^text\/markdown/, p);
++ }
for (const bad of ['/api', '/internal', '/panel/']) assert.ok(!body.includes(bad), `llms.txt does not name ${bad}`);
});