eve-hub 0.6.55 → 0.6.57
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/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/prepare.mjs +5 -9
- package/world.mjs +6 -6
- package/github-path.d.mts +0 -1
- package/github-path.mjs +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# eve-hub
|
|
2
2
|
|
|
3
|
+
## 0.6.57
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Hosted hub: a thread's participants are read in rows that grow with the thread, not its square (a 650-message thread read 383,000 rows at every send and fold).
|
|
8
|
+
|
|
9
|
+
## 0.6.56
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Deployed bots always carry the Vercel Kit connection (it resolves to nothing without a `KIT_CONNECTOR`), so a workspace's onboarding-profile skill reaches Slack; onboarding and the upgrade give the bots project the hub's Kit connector.
|
|
14
|
+
|
|
3
15
|
## 0.6.55
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve-hub",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.57",
|
|
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
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
// off the hub's machine (DEPLOYED_KIT_FILES); a hosted bot whose sandbox.ts
|
|
11
11
|
// is the host's fails the build, and the build never writes a sandbox;
|
|
12
12
|
// - the kit extension, host-only workers and kit stubs are dropped, the hub's
|
|
13
|
-
// workflow world is wired in (and the Vercel Kit connection,
|
|
14
|
-
// says "kit"), every bot gets eve's git extension, and the
|
|
13
|
+
// workflow world is wired in (and the Vercel Kit connection), every bot gets eve's git extension, and the
|
|
15
14
|
// workspace's memory is embedded in the bots' memory providers (a function
|
|
16
15
|
// has no workspace cwd);
|
|
17
16
|
// - /hub/manifest: the roster and the commit sha the deployment was built
|
|
@@ -19,7 +18,6 @@
|
|
|
19
18
|
// vercel.mjs. Bearer BOT_TOKEN, as on each bot's eve channel (bot-token.mjs).
|
|
20
19
|
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, rmdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
21
20
|
import { basename, dirname, join } from "node:path";
|
|
22
|
-
import { GITHUB_PATH } from "./github-path.mjs";
|
|
23
21
|
import { DEPLOYED_KIT_FILES, KIT_FILES, MAIN_KIT_FILES } from "./stubs.mjs";
|
|
24
22
|
import KIT_MODULES from "./kit-modules.json" with { type: "json" };
|
|
25
23
|
import { applyKit, readBotFiles, syncKit } from "./sync-kit.mjs";
|
|
@@ -152,12 +150,10 @@ export function prepareDeployment(dir) {
|
|
|
152
150
|
}
|
|
153
151
|
const agentFile = join(bot, "agent.ts");
|
|
154
152
|
writeFileSync(agentFile, injectWorkflowWorld(readFileSync(agentFile, "utf8"), agentFile));
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
writeFileSync(join(bot, "connections", "vercel-kit.ts"), 'export { default } from "eve-hub/connections/vercel-kit";\n');
|
|
160
|
-
}
|
|
153
|
+
// Slack for the onboarding skill comes through Vercel Kit, with the project's KIT_CONNECTOR;
|
|
154
|
+
// without one the connection resolves to nothing.
|
|
155
|
+
mkdirSync(join(bot, "connections"), { recursive: true });
|
|
156
|
+
writeFileSync(join(bot, "connections", "vercel-kit.ts"), 'export { default } from "eve-hub/connections/vercel-kit";\n');
|
|
161
157
|
mkdirSync(join(bot, "memory"), { recursive: true });
|
|
162
158
|
const botDir = join(dir, "agents", name);
|
|
163
159
|
writeFileSync(join(bot, "memory", "workspace.ts"), memoryProvider("workspace", readMemory(dir, { folders: domainFolders(botDomains(dir, botDir)) }).entries, "Standing decision", "workspace"));
|
package/world.mjs
CHANGED
|
@@ -20178,12 +20178,12 @@ function eventStatements(threadId2, event, text, at, id = eventId(), only) {
|
|
|
20178
20178
|
// ../../hosted-hub/src/store/routing.ts
|
|
20179
20179
|
var THREAD_REFS = 3;
|
|
20180
20180
|
var threadArgs = (threadId2, ...rest) => [...Array(THREAD_REFS).fill(threadId2), ...rest];
|
|
20181
|
-
var PARTICIPANTS = (thread, except = "''") => `SELECT
|
|
20182
|
-
SELECT
|
|
20183
|
-
UNION ALL SELECT
|
|
20184
|
-
UNION ALL SELECT
|
|
20185
|
-
|
|
20186
|
-
|
|
20181
|
+
var PARTICIPANTS = (thread, except = "''") => `SELECT bot FROM (
|
|
20182
|
+
SELECT bot, created_at AS at, 0 AS leave, NULL AS mid FROM sessions WHERE thread_id = ${thread}
|
|
20183
|
+
UNION ALL SELECT author, created_at, 0, id FROM messages WHERE thread_id = ${thread} AND author_kind = 'agent'
|
|
20184
|
+
UNION ALL SELECT json_extract(event, '$.agent'), created_at, json_extract(event, '$.kind') = 'leave', id FROM messages
|
|
20185
|
+
WHERE thread_id = ${thread} AND author_kind = 'event' AND json_extract(event, '$.kind') IN ('join', 'leave'))
|
|
20186
|
+
GROUP BY bot HAVING MAX(CASE WHEN NOT leave AND mid IS NOT ${except} THEN at END) > COALESCE(MAX(CASE WHEN leave THEN at END), -1)`;
|
|
20187
20187
|
var hasJoins = (threadId2) => !threadId2.startsWith("dm-") && !threadId2.startsWith("sch-");
|
|
20188
20188
|
function routingStatements(messageId2, threadId2, bots, now, { by, joins }, held = {}, steer = false) {
|
|
20189
20189
|
const quiet2 = !joins || !hasJoins(threadId2);
|
package/github-path.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const GITHUB_PATH: "gh" | "kit";
|
package/github-path.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// How every deployed bot reaches GitHub, decided here and nowhere else:
|
|
2
|
-
// "gh" `gh` and `git` in bash (the firewall token and eve's git extension, both
|
|
3
|
-
// always on, prepare.mjs); no Vercel Kit connection, so no bot can pick
|
|
4
|
-
// Kit for GitHub, and onboarding sets up no Kit connector.
|
|
5
|
-
// "kit" the same, plus the Kit connection on every bot (prepare.mjs, and the
|
|
6
|
-
// peer dependencies it needs in hosted-hub/scripts/stage-workspace.mjs) and
|
|
7
|
-
// the Kit connector on each new bots project (hosted-hub/src/onboard/provision-steps.ts).
|
|
8
|
-
export const GITHUB_PATH = "gh";
|