openvibers/openvibe.trade Commits

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

OP OpenVibers committed 10 days ago · 81f3cd2102 · 6 files, +41 −14

* 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: fold the instrument .json hint into a real link (AGT-5)

Changes

ddiff --git a/README.md b/README.md
iindex da9e36d..f9901ce 100644
---- a/README.md
++++ b/README.md
@@@ -277,7 +277,7 @@ services need to call Trade, is under [Grants the Network must hold](#grants-the
- **PostgreSQL 18 and Valkey 9** (OpenVibe.Host `roles/data/`, ADR-035): every read and write is async through
`openvibe-sdk/db`; Valkey holds the per-actor limit counters (optional: without `VALKEY_URL` they count per process).
- **Packages** (pinned by release tarball): `openvibe-contracts` v0.97.0, `openvibe-publishing`
-- v1.3.0 (revisions, authorship, seo, index-hooks, ssr, ingest, publication), `openvibe-shared` v4.107.4 (Frame, app icon,
++ v1.3.0 (revisions, authorship, seo, index-hooks, ssr, ingest, publication), `openvibe-shared` v4.108.0 (Frame, app icon,
footer, legal, release, metrics, ready), `openvibe-sdk` v0.82.0 (events outbox and inbox, webhook
signatures v2, service tokens, per-actor limits, service kit lifecycle).
- **OpenVibe.Network:** SSO (OAuth client `trade`, redirect `https://openvibe.trade/auth/callback`),
@@@ -458,6 +458,6 @@ Part of the [OpenVibe network](https://openvibe.network). Built in the open by [
<!-- versions:start -->
- openvibe-contracts: v0.222.0
- openvibe-sdk: v0.82.0
--- openvibe-shared: v4.107.4
++- openvibe-shared: v4.108.0
- openvibe-publishing: v1.3.0
<!-- versions:end -->
ddiff --git a/STATUS.json b/STATUS.json
iindex 941c394..197db7c 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -10,11 +10,11 @@
"scope": "informational only (ADR-025): no custody, no order execution, no escrow, no listings between users, no personalised advice",
"contracts": "openvibe-contracts v0.222.0",
"sdk": "openvibe-sdk v0.82.0",
-- "shared": "openvibe-shared v4.107.4",
++ "shared": "openvibe-shared v4.108.0",
"packages": [
"openvibe-contracts v0.222.0",
"openvibe-publishing v1.3.0",
-- "openvibe-shared v4.107.4",
++ "openvibe-shared v4.108.0",
"openvibe-sdk v0.82.0"
],
"capabilities": [
ddiff --git a/package-lock.json b/package-lock.json
iindex c5655b7..c0040a9 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.222.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.3.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": {
@@@ -1210,9 +1210,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 bd3b862..6f1b84c 100644
---- a/package.json
++++ b/package.json
@@@ -30,7 +30,7 @@
"openvibe-contracts": "https://codeload.github.com/OpenVibers/OpenVibe.Contracts/tar.gz/refs/tags/v0.222.0",
"openvibe-publishing": "https://codeload.github.com/OpenVibers/OpenVibe.Publishing/tar.gz/refs/tags/v1.3.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": {
ddiff --git a/server/http/discovery.js b/server/http/discovery.js
iindex ccf6ba7..7d7bda4 100644
---- a/server/http/discovery.js
++++ b/server/http/discovery.js
@@@ -91,21 +91,33 @@ function createDiscovery(ctx) {
define(router, 'get', '/llms.txt', 'llmsTxt', (_req, res) => {
res.type('text/plain').set('Cache-Control', cache.htmlHeaders({ maxAge: 3600 })).send(sharedSeo.llmsTxt({
name: SITE_NAME,
++ // Each of this site's own pages is linked at its Markdown twin (AGT-5; openvibe-shared 4.108.0 leaves
++ // files, /api/ and /.well-known/ paths and other sites' links as they are).
++ markdown: true,
++ base: config.baseUrl,
summary: SITE_SUMMARY,
details: 'Every number on an instrument page is an observation with observed_at, retrieved_at and its source; an instrument without observations shows no number. Stale sources are labelled "stale since <time>" and never replaced. Each instrument page has a JSON twin at /i/<SYMBOL>.json with the same data. AI briefs (OpenVibe.AI) are written only from the SEC numbers and filings on the page, cite each one, are labelled as AI-written and not reviewed by a person, and never give advice; editor context drafted by AI is not published before a person reviews it. There is no custody, order execution, escrow, marketplace or personal advice.',
sections: [
{ title: 'Start here', links: [
{ title: 'Front page', url: abs('/'), note: 'AI briefs, euro reference rates, new annual and quarterly reports, filings by form, newest filings' },
-- { title: 'Companies and currencies', url: abs('/instruments'), note: 'all instruments, the newest filing or figure first' },
++ { title: 'Companies and currencies', url: abs('/instruments'), note: 'all instruments, the newest filing or figure first; each instrument page has a JSON twin, so append .json to any instrument URL (/i/<SYMBOL>.json)' },
{ title: 'Filings', url: abs('/filings'), note: 'the newest SEC filings; /filings?form=10-K for one form type' },
{ title: 'Source freshness', url: abs('/sources') },
-- { title: 'Sitemap', url: abs('/sitemap.xml') },
++ ] },
++ // The JSON data is what an agent came for: it stays in a main section, and its URL keeps its URL.
++ { title: 'Data', links: [
++ { title: 'Recent documents (JSON Feed)', url: abs('/feed.json') },
] },
{ title: 'Feeds', links: [
-- { title: 'Recent documents (RSS)', url: abs('/feed.xml') }, { title: 'Atom', url: abs('/atom.xml') }, { title: 'JSON Feed', url: abs('/feed.json') },
-- { title: 'Per instrument', url: abs('/'), note: '/i/<SYMBOL>/documents.xml, .atom and .json' },
++ { title: 'Recent documents (RSS)', url: abs('/feed.xml'), note: 'per instrument, /i/<SYMBOL>/documents.xml, .atom and .json' },
++ { title: 'Atom', url: abs('/atom.xml') },
] },
-- { title: 'Data', links: [{ title: 'Instrument JSON', url: abs('/'), note: 'append .json to an instrument URL (/i/<SYMBOL>.json)' }] },
++ ],
++ // llmstxt.org's "## Optional": what an agent may skip when it needs a shorter context.
++ optional: [
++ { title: 'Sitemap', url: abs('/sitemap.xml') },
++ { title: 'robots.txt', url: abs('/robots.txt') },
++ { title: 'llms-full.txt', url: abs('/llms-full.txt'), note: 'the indexable instrument pages, one short summary each' },
],
}));
});
ddiff --git a/test/pages.test.js b/test/pages.test.js
iindex 4142325..fa2811e 100644
---- a/test/pages.test.js
++++ b/test/pages.test.js
@@@ -85,6 +85,21 @@ const WORDS = (n) => Array.from({ length: n }, (_, i) => `word${i}`).join(' ');
assert.ok(!(await t.get('/sitemaps/instruments.xml')).text.includes('<loc>'), 'no indexable instrument yet');
assertSitemapLastmods((await t.get('/sitemaps/instruments.xml')).text);
assert.ok((await t.get('/llms.txt')).text.startsWith('# OpenVibe.Trade'));
++ // AGT-5: the home at /index.md, each page at its twin, an Optional section last.
++ const llms = (await t.get('/llms.txt')).text;
++ assert.ok(llms.includes('[Front page](https://openvibe.trade/index.md)'), 'the home is /index.md');
++ assert.ok(llms.includes('[Filings](https://openvibe.trade/filings.md)'), 'a page is its twin');
++ assert.ok(llms.includes('[Recent documents (RSS)](https://openvibe.trade/feed.xml)'), 'a feed keeps its URL');
++ assert.ok(!/\]\(https:\/\/openvibe\.trade\/i\/[A-Z<]/.test(llms), 'no instrument URL is invented in llms.txt');
++ assert.match(llms, /\n## Optional\n/);
++ assert.match(llms, /\n## Optional\n\n[\s\S]*\[Sitemap\]\(https:\/\/openvibe\.trade\/sitemap\.xml\)/);
++ assert.strictEqual(llms.lastIndexOf('\n## '), llms.indexOf('\n## Optional'), 'Optional is the last section');
++ const own = [...llms.matchAll(/\]\((https:\/\/openvibe\.trade[^)\s]*)\)( \(HTML\))?/g)];
++ assert.ok(own.length > 5, String(own.length));
++ for (const [, url, html] of own) {
++ const p = new URL(url).pathname;
++ assert.ok(p.endsWith('.md') || /\.[a-z0-9]+$/.test(p) || p.startsWith('/api/') || html, `${url} is a twin, a file or marked (HTML)`);
++ }
});
await check('resolve: one match redirects to the canonical page; a miss says no guess was made', async () => {