openvibers/openvibe.connect Commits
/.well-known/agent.json: what this site serves, for agents (SEO-2) (#26)
Changes
nnew file mode 100644@@@ -0,0 +1,14 @@++'use strict';++// What OpenVibe Connect 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: "connect",++ name: "OpenVibe Connect",++ purpose: "Share one port on your computer at https://<name>--<username>.openvibe.website, behind OpenVibe sign-in; programs pass with a share's API key, MCP clients sign in with OAuth.",++ home: "https://connect.openvibe.website",++ site: "connect.openvibe.website",++ api: "/api/v1",++ policy: {++ auth: ["Network OIDC"],++ },++};@@@ -159,6 +159,9 @@ async function createApp(opts = {}) {log.error('[OpenVibe.Connect] share request failed:', err && err.message);if (!res.headersSent) { res.statusCode = 502; res.end('Something went wrong on our side.'); } else res.destroy();});++ // /.well-known/agent.json (openvibe-shared/agent-layer, SEO-2): what this site serves, for agents.++ // After the share hosts: a share's own /.well-known/agent.json belongs to the share.++ require('openvibe-shared/agent-layer').mount(app, { descriptor: require('./agent-descriptor') });});const release = require('openvibe-shared/release').createRelease({ service: 'connect', 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://connect.openvibe.website');++assert.ok(m.purpose && m.purpose.length > 40, 'a purpose');++assert.ok(/^https:\/\//.test(m.api), 'its API, absolute');++assert.strictEqual(m.llms, 'https://connect.openvibe.website/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,14 @@
@@ -0,0 +1,14 @@
+'use strict';
+// What OpenVibe Connect 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: "connect",
+ name: "OpenVibe Connect",
+ purpose: "Share one port on your computer at https://<name>--<username>.openvibe.website, behind OpenVibe sign-in; programs pass with a share's API key, MCP clients sign in with OAuth.",
+ home: "https://connect.openvibe.website",
+ site: "connect.openvibe.website",
+ api: "/api/v1",
+ policy: {
+ auth: ["Network OIDC"],
+ },
+};
@@ -159,6 +159,9 @@ async function createApp(opts = {}) {
@@ -159,6 +159,9 @@ async function createApp(opts = {}) {
log.error('[OpenVibe.Connect] share request failed:', err && err.message);
log.error('[OpenVibe.Connect] share request failed:', err && err.message);
if (!res.headersSent) { res.statusCode = 502; res.end('Something went wrong on our side.'); } else res.destroy();
if (!res.headersSent) { res.statusCode = 502; res.end('Something went wrong on our side.'); } else res.destroy();
});
});
+ // /.well-known/agent.json (openvibe-shared/agent-layer, SEO-2): what this site serves, for agents.
+ // After the share hosts: a share's own /.well-known/agent.json belongs to the share.
+ require('openvibe-shared/agent-layer').mount(app, { descriptor: require('./agent-descriptor') });
});
});
const release = require('openvibe-shared/release').createRelease({ service: 'connect', root: path.join(__dirname, '..') });
const release = require('openvibe-shared/release').createRelease({ service: 'connect', 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://connect.openvibe.website');
+assert.ok(m.purpose && m.purpose.length > 40, 'a purpose');
+assert.ok(/^https:\/\//.test(m.api), 'its API, absolute');
+assert.strictEqual(m.llms, 'https://connect.openvibe.website/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');