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.
- package/package.json +1 -1
- package/vercel.mjs +9 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve-hub",
|
|
3
|
-
"version": "0.16.
|
|
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
|
-
|
|
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
|
|
13
|
-
// route (agents
|
|
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:
|
|
20
|
+
routes: [{ src: "^/hub/manifest$", destination: { type: "service", service: `eve-${coordinator}` } }],
|
|
16
21
|
});
|