eve-hub 0.16.6 → 0.16.8

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/prepare.mjs +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve-hub",
3
- "version": "0.16.6",
3
+ "version": "0.16.8",
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/prepare.mjs CHANGED
@@ -17,6 +17,7 @@
17
17
  // from, for the hub to sync from: a custom channel on main, routed in
18
18
  // vercel.mjs. From the hub, as on each bot's eve channel (hub-oidc.mjs).
19
19
  import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, rmdirSync, unlinkSync, writeFileSync } from "node:fs";
20
+ import { createRequire } from "node:module";
20
21
  import { basename, dirname, join } from "node:path";
21
22
  import { DEPLOYED_KIT_FILES, KIT_FILES, MAIN_KIT_FILES } from "./stubs.mjs";
22
23
  import KIT_MODULES from "./kit-modules.json" with { type: "json" };
@@ -86,20 +87,22 @@ export default code({ worker: { model, reasoning } });
86
87
  });
87
88
 
88
89
  const KIT_VERSION = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8")).version;
90
+ // eve is the kit's peer: the one resolved from here is the one the workspace's bots build with.
91
+ const EVE_VERSION = createRequire(import.meta.url)("eve/package.json").version;
89
92
  const MANIFEST_CHANNEL = `import { defineChannel, GET } from "eve/channels";
90
93
  import { getVercelOidcToken } from "@vercel/oidc";
91
94
  import { isHubRequest } from "eve-hub/hub-oidc";
92
95
  import { parseWorkspace } from "eve-hub/workspace";
93
96
  import workspace from "../../../../hub.manifest.json" with { type: "json" };
94
97
 
95
- // The roster, humans and subagent cap as deployed, Mac bots included, and the eve-hub version that built it, for the hub to sync from:
98
+ // The roster, humans and subagent cap as deployed, Mac bots included, and the eve-hub and eve versions that built it, for the hub to sync from:
96
99
  // hub.manifest.json is bundled at build, so a push whose deploy fails never
97
100
  // changes it. \`sha\` is the commit the deployment was built from, which the hub
98
101
  // syncs by; a deployment with none (\`vercel deploy\` uploads no git metadata)
99
102
  // has no manifest to give.
100
103
  const sha = process.env.VERCEL_GIT_COMMIT_SHA;
101
104
  const { agents, humans, subagentCap, hopLimit } = parseWorkspace(workspace);
102
- const manifest = { sha, kit: ${JSON.stringify(KIT_VERSION)}, agents, humans, subagentCap, ...(hopLimit === undefined ? {} : { hopLimit }) };
105
+ const manifest = { sha, kit: ${JSON.stringify(KIT_VERSION)}, eve: ${JSON.stringify(EVE_VERSION)}, agents, humans, subagentCap, ...(hopLimit === undefined ? {} : { hopLimit }) };
103
106
 
104
107
  export default defineChannel({
105
108
  routes: [