openvibers/openvibe.casino Commits
/.well-known/agent.json: what this site serves, for agents (SEO-2) (#41)
Changes
nnew file mode 100644@@@ -0,0 +1,15 @@++'use strict';++// What OpenVibe.Casino tells an agent about itself (openvibe-shared/agent-layer): /.well-known/agent.json (SEO-2).++// Every field is something this site really serves; the purpose is its own llms.txt summary.++module.exports = {++ id: "casino",++ name: "OpenVibe.Casino",++ purpose: "Learn casino games, play them with chips worth nothing, and see exactly what each bet costs: open engines, exact house edges, simulations in the browser. Never real money.",++ home: "https://openvibe.casino",++ site: "openvibe.casino",++ api: "/api/v1",++ docs: "/developers",++ policy: {++ auth: ["none", "Network OIDC"],++ },++};@@@ -67,6 +67,8 @@ async function createApp(opts = {}) {};const app = express();++ // /.well-known/agent.json (openvibe-shared/agent-layer, SEO-2): what this site serves, for agents.++ require('openvibe-shared/agent-layer').mount(app, { descriptor: require('./agent-descriptor') });app.disable('x-powered-by');app.set('trust proxy', config.trustProxy);const release = require('openvibe-shared/release').createRelease({ service: 'casino', root: path.join(__dirname, '..') });nnew file mode 100644@@@ -0,0 +1,19 @@++'use strict';++// SEO-2: /.well-known/agent.json answered 404 here (11-03 check of all 55 sites). The shared agent layer serves this++// site's descriptor; every field is something it really serves.++const assert = require('assert');++const fs = require('fs');++const path = require('path');++const descriptor = require('../server/agent-descriptor');++const { agentManifest } = require('openvibe-shared/agent-layer');++++const m = agentManifest(descriptor);++assert.strictEqual(m.network, 'OpenVibe');++assert.strictEqual(m.home, 'https://openvibe.casino');++assert.ok(m.purpose && m.purpose.length > 40, 'a purpose');++assert.ok(/^https:\/\//.test(m.api), 'its API, absolute');++assert.strictEqual(m.llms, 'https://openvibe.casino/llms.txt');++assert.ok(Array.isArray(m.policy.auth) && m.policy.auth.length, 'how it is called');++const app = fs.readFileSync(path.join(__dirname, '..', 'server', 'app.js'), 'utf8');++assert.match(app, /require\('openvibe-shared\/agent-layer'\)\.mount\(app, \{ descriptor: require\('\.\/agent-descriptor'\) \}\);/);++console.log('agent.json: ok');
new file mode 100644
new file mode 100644
@@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
+'use strict';
+// What OpenVibe.Casino tells an agent about itself (openvibe-shared/agent-layer): /.well-known/agent.json (SEO-2).
+// Every field is something this site really serves; the purpose is its own llms.txt summary.
+module.exports = {
+ id: "casino",
+ name: "OpenVibe.Casino",
+ purpose: "Learn casino games, play them with chips worth nothing, and see exactly what each bet costs: open engines, exact house edges, simulations in the browser. Never real money.",
+ home: "https://openvibe.casino",
+ site: "openvibe.casino",
+ api: "/api/v1",
+ docs: "/developers",
+ policy: {
+ auth: ["none", "Network OIDC"],
+ },
+};
@@ -67,6 +67,8 @@ async function createApp(opts = {}) {
@@ -67,6 +67,8 @@ async function createApp(opts = {}) {
};
};
const app = express();
const app = express();
+ // /.well-known/agent.json (openvibe-shared/agent-layer, SEO-2): what this site serves, for agents.
+ require('openvibe-shared/agent-layer').mount(app, { descriptor: require('./agent-descriptor') });
app.disable('x-powered-by');
app.disable('x-powered-by');
app.set('trust proxy', config.trustProxy);
app.set('trust proxy', config.trustProxy);
const release = require('openvibe-shared/release').createRelease({ service: 'casino', root: path.join(__dirname, '..') });
const release = require('openvibe-shared/release').createRelease({ service: 'casino', root: path.join(__dirname, '..') });
new file mode 100644
new file mode 100644
@@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
+'use strict';
+// SEO-2: /.well-known/agent.json answered 404 here (11-03 check of all 55 sites). The shared agent layer serves this
+// site's descriptor; every field is something it really serves.
+const assert = require('assert');
+const fs = require('fs');
+const path = require('path');
+const descriptor = require('../server/agent-descriptor');
+const { agentManifest } = require('openvibe-shared/agent-layer');
+
+const m = agentManifest(descriptor);
+assert.strictEqual(m.network, 'OpenVibe');
+assert.strictEqual(m.home, 'https://openvibe.casino');
+assert.ok(m.purpose && m.purpose.length > 40, 'a purpose');
+assert.ok(/^https:\/\//.test(m.api), 'its API, absolute');
+assert.strictEqual(m.llms, 'https://openvibe.casino/llms.txt');
+assert.ok(Array.isArray(m.policy.auth) && m.policy.auth.length, 'how it is called');
+const app = fs.readFileSync(path.join(__dirname, '..', 'server', 'app.js'), 'utf8');
+assert.match(app, /require\('openvibe-shared\/agent-layer'\)\.mount\(app, \{ descriptor: require\('\.\/agent-descriptor'\) \}\);/);
+console.log('agent.json: ok');