eve-hub 0.16.19 → 0.16.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vercel.mjs +9 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve-hub",
3
- "version": "0.16.19",
3
+ "version": "0.16.20",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Bot-side code shared by every hub agent: registry tools, the roster hook, the eve channel, the host sandbox and browser, and model helpers.",
6
6
  "type": "module",
package/vercel.mjs CHANGED
@@ -5,12 +5,17 @@
5
5
  // Vercel build: elsewhere this file's cwd is a person's checkout.
6
6
  import { withEve } from "eve/vercel";
7
7
  import { prepareDeployment } from "./prepare.mjs";
8
+ import { coordinatorOf, readWorkspaceFile } from "./workspace.mjs";
8
9
 
9
- if (process.env.VERCEL) prepareDeployment(process.cwd());
10
+ const dir = process.cwd();
11
+ if (process.env.VERCEL) prepareDeployment(dir);
10
12
 
11
13
  // Each agents/<name>/agent is its own service at /eve/<name>/v1/*. eve
12
- // publishes only its own transport routes, so main's /hub/manifest channel
13
- // route (agents/main/agent/channels/manifest.ts) is routed here.
14
+ // publishes only its own transport routes, so the coordinator's /hub/manifest
15
+ // channel route (agents/<coordinator>/agent/channels/manifest.ts, which
16
+ // prepare.mjs writes) is routed here.
17
+ const coordinator = coordinatorOf(readWorkspaceFile(dir).agents);
18
+ if (!coordinator) throw new Error(`${dir}: hub.workspace.json names no coordinator to serve /hub/manifest`);
14
19
  export default await withEve({
15
- routes: [{ src: "^/hub/manifest$", destination: { type: "service", service: "eve-main" } }],
20
+ routes: [{ src: "^/hub/manifest$", destination: { type: "service", service: `eve-${coordinator}` } }],
16
21
  });