openvibers/openvibe.coupons Commits

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

OP OpenVibers committed 10 days ago · 991907b930 · 6 files, +23 −13

* 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 merchant API stays a main section; a shop as JSON is a note, not a link to / (AGT-5 review)

Changes

ddiff --git a/README.md b/README.md
iindex ebed4ce..c20c567 100644
---- a/README.md
++++ b/README.md
@@@ -498,6 +498,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 50a5c0c..4c540f1 100644
---- a/STATUS.json
++++ b/STATUS.json
@@@ -9,11 +9,11 @@
"domain": "openvibe.coupons",
"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-publishing v1.3.0",
"openvibe-contracts v0.222.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 55b1181..0dd0e33 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 3440135..f6416a1 100644
---- a/package.json
++++ b/package.json
@@@ -29,7 +29,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 6d0f128..26f9571 100644
---- a/server/http/discovery.js
++++ b/server/http/discovery.js
@@@ -59,19 +59,27 @@ function createDiscoveryRoutes({ config, store, merchants, coupons, publication
name: 'OpenVibe.Coupons',
summary: pages.SITE_SUMMARY,
details: 'A code\'s status is exactly one of unknown, reported_working, reported_failed, expired or disabled. Only recent reports by people can make a code reported_working or reported_failed; a submission, a source or a model cannot. An expiry that nobody stated is "unknown" (null in JSON), and restrictions that were not stated are absent, not "none". Every shop page has a JSON twin at /m/<slug>.json and every code at /c/<id>.json with the same content. Expired and taken-down codes are not in lists, feeds or sitemaps.',
++ markdown: true,
++ base: config.baseUrl,
sections: [
{ title: 'Start here', links: [
-- { title: 'All shops', url: abs('/'), note: 'with recently added codes' },
++ { title: 'OpenVibe.Coupons', url: abs('/'), note: 'all shops with recently added codes' },
{ title: 'How codes are labelled', url: abs('/about'), note: 'statuses, the confidence formula, expiry, privacy' },
{ title: 'The OpenVibe Companion', url: abs('/companion'), note: 'the open-source browser extension: codes for the shop you are on, tried when you ask; never rewrites referral links' },
-- { title: 'Sitemap', url: abs('/sitemap.xml') },
] },
-- { title: 'Feeds', links: [{ title: 'RSS', url: abs('/feed.xml') }, { title: 'Atom', url: abs('/atom.xml') }, { title: 'JSON Feed', url: abs('/feed.json') }] },
++ // The API is a primary entry for an agent; a shop as JSON is named in its note (a link to "/" would read
++ // as the home's Markdown twin).
{ title: 'Data', links: [
-- { title: 'Shop JSON', url: abs('/'), note: 'append .json to a shop URL (/m/<slug>.json)' },
-- { title: 'Merchant lookup API', url: abs('/api/v1/merchants/resolve?host=amazon.com', { query: ['host'] }), note: 'GET /api/v1/merchants/resolve?host=<shop host> (a worked example above) and GET /api/v1/merchants/<id>/coupons; anonymous, rate-limited' },
++ { title: 'Merchant lookup API', url: abs('/api/v1/merchants/resolve?host=amazon.com', { query: ['host'] }), note: 'any shop as JSON: append .json to its URL (/m/<slug>.json). GET /api/v1/merchants/resolve?host=<shop host> (a worked example above) and GET /api/v1/merchants/<id>/coupons; anonymous, rate-limited' },
] },
],
++ optional: [
++ { title: 'Sitemap', url: abs('/sitemap.xml') },
++ { title: 'RSS', url: abs('/feed.xml') },
++ { title: 'Atom', url: abs('/atom.xml') },
++ { title: 'JSON Feed', url: abs('/feed.json') },
++ { title: 'Full text for language models', url: abs('/llms-full.txt') },
++ ],
}));
});
ddiff --git a/test/pages-discovery.test.js b/test/pages-discovery.test.js
iindex 451b151..3c1b391 100644
---- a/test/pages-discovery.test.js
++++ b/test/pages-discovery.test.js
@@@ -105,6 +105,8 @@ const { boot, check, done } = require('./helpers/boot');
const llms = await t.get('/llms.txt');
assert.match(llms.text, /reported_working/);
assert.match(llms.text, /\/m\/<slug>\.json/);
++ assert.match(llms.text, /\n## Optional\n/);
++ assert.match(llms.text, /\(https:\/\/openvibe\.coupons\/index\.md\)/);
// Every URL the file lists has to answer when it is fetched as a link: a language model that
// follows one and gets a 400 has learned nothing. The merchant lookup is a GET with one
// required parameter, so its link carries the parameter; bare, it answers 400 by design.