eve-hub 0.6.25 → 0.6.26
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 +6 -0
- package/package.json +1 -1
- package/prepare.mjs +3 -3
- package/stubs.mjs +2 -4
- package/templates/execution-context-hosted-main.md +2 -2
- package/tools/remove_agent.js +2 -2
- package/tools/restart_agent.js +1 -1
- package/world.mjs +1 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve-hub",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.26",
|
|
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
|
@@ -57,14 +57,14 @@ import { isBotToken } from "eve-hub/bot-token";
|
|
|
57
57
|
import { parseWorkspace } from "eve-hub/workspace";
|
|
58
58
|
import workspace from "../../../../hub.manifest.json" with { type: "json" };
|
|
59
59
|
|
|
60
|
-
// The roster and subagent cap as deployed, Mac bots included, and the eve-hub version that built it, for the hub to sync from:
|
|
60
|
+
// 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:
|
|
61
61
|
// hub.manifest.json is bundled at build, so a push whose deploy fails never
|
|
62
62
|
// changes it. \`sha\` is the commit the deployment was built from, which the hub
|
|
63
63
|
// syncs by; a deployment with none (\`vercel deploy\` uploads no git metadata)
|
|
64
64
|
// has no manifest to give.
|
|
65
65
|
const sha = process.env.VERCEL_GIT_COMMIT_SHA;
|
|
66
|
-
const { agents, subagentCap } = parseWorkspace(workspace);
|
|
67
|
-
const manifest = { sha, kit: ${JSON.stringify(KIT_VERSION)}, agents, subagentCap };
|
|
66
|
+
const { agents, humans, subagentCap } = parseWorkspace(workspace);
|
|
67
|
+
const manifest = { sha, kit: ${JSON.stringify(KIT_VERSION)}, agents, humans, subagentCap };
|
|
68
68
|
|
|
69
69
|
export default defineChannel({
|
|
70
70
|
routes: [
|
package/stubs.mjs
CHANGED
|
@@ -51,9 +51,7 @@ export const MAIN_KIT_FILES = {
|
|
|
51
51
|
// the kit's bash (HostSandbox's root, the daemon's env; eve's own bash runs
|
|
52
52
|
// instead), the browser and the screenshot paths of attach_image/view_image,
|
|
53
53
|
// the mention gate (the
|
|
54
|
-
// daemon's per-process HUB_AGENT and patched model credential), the
|
|
55
|
-
// remove or restart bots on the hub's disk (a deployment changes its roster by
|
|
56
|
-
// commit; create_agent is that commit, made by the hosted hub), memory (the workspace's files), and main's prune schedule (it cleans the hub machine's disk).
|
|
54
|
+
// daemon's per-process HUB_AGENT and patched model credential), restart_hub (the hub's own code), memory (the workspace's files), and main's prune schedule (it cleans the hub machine's disk).
|
|
57
55
|
// main's compact and dash schedules stay: off the hub's machine compact finds no session to compact
|
|
58
56
|
// (hosted sessions carry no last-model-call time), and dash has no PR data (its lookup runs `gh`).
|
|
59
57
|
export const DEPLOYED_KIT_FILES = new Set([
|
|
@@ -63,7 +61,7 @@ export const DEPLOYED_KIT_FILES = new Set([
|
|
|
63
61
|
"skills/onboarding-profile.ts",
|
|
64
62
|
"tools/onboarding_scripts.ts",
|
|
65
63
|
...["react", "show", "update_thread", "list_threads", "read_thread", "post_message"].map((t) => `tools/${t}.ts`),
|
|
66
|
-
...["create_thread", "set_summary", "move_path", "archive_thread", "unarchive_thread", "list_agents", "agent_send", "create_agent", "tag_threads", "dash_update", "apply_tags"].map((t) => `tools/${t}.ts`),
|
|
64
|
+
...["create_thread", "set_summary", "move_path", "archive_thread", "unarchive_thread", "list_agents", "agent_send", "create_agent", "remove_agent", "restart_agent", "tag_threads", "dash_update", "apply_tags"].map((t) => `tools/${t}.ts`),
|
|
67
65
|
]);
|
|
68
66
|
|
|
69
67
|
// ---- stub text: what each kit stub file says ----
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
- **Team.** `create_agent` takes `runsOn` (`hosted` or `local`) and commits the new bot to the workspace repository; it joins with the next deployment, and a `local` bot then runs on the owner's Mac.
|
|
2
|
-
- **Restarts.**
|
|
1
|
+
- **Team.** `create_agent` takes `runsOn` (`hosted` or `local`) and commits the new bot to the workspace repository; it joins with the next deployment, and a `local` bot then runs on the owner's Mac. `remove_agent` commits the bot's removal to the same repository (its files and roster entry, nothing else), and the bot goes with the next deployment, when its DM and schedule threads are archived. If nobody on the team covers the work well, ask the human before going on.
|
|
2
|
+
- **Restarts.** `restart_agent <name>` redeploys the workspace's hosted bots, all at once and without waiting for idle, since a deployment replaces every running bot; it can't yet restart a bot on the owner's Mac. There is no `restart_hub`.
|
|
3
3
|
- **Memory.** Add an entry as your Memory section says, by committing the file to the workspace repository (see Changing it above). With no repository, write nothing and tell the human to link one first.
|
|
4
4
|
- **Schedules.** Your `dash` schedule runs every 8 minutes: it classifies the threads that changed into the Dash and rewrites track summaries that have news, without PR data (a function has no `gh`). `compact` is deployed but finds nothing to compact until hosted sessions record their last model call. `prune` is not deployed: it cleans the hub machine's disk.
|
package/tools/remove_agent.js
CHANGED
|
@@ -8,8 +8,8 @@ export default defineTool({
|
|
|
8
8
|
inputSchema: z.object({
|
|
9
9
|
name: z.string().regex(/^[a-z][a-z0-9-]{1,30}$/).describe("Lowercase handle, e.g. deep-diver."),
|
|
10
10
|
}),
|
|
11
|
-
async execute({ name }) {
|
|
12
|
-
const res = await registryFetch(`/api/agents/${encodeURIComponent(name)}`, { method: "DELETE" });
|
|
11
|
+
async execute({ name }, ctx) {
|
|
12
|
+
const res = await registryFetch(`/api/agents/${encodeURIComponent(name)}`, { method: "DELETE", headers: { "x-hub-session": ctx.session.id } });
|
|
13
13
|
const body = await res.text();
|
|
14
14
|
if (!res.ok)
|
|
15
15
|
throw new Error(`remove_agent failed: ${res.status} ${body}`);
|
package/tools/restart_agent.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineTool } from "eve/tools";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { registryFetch } from "../registry-fetch.mjs";
|
|
4
4
|
export default defineTool({
|
|
5
|
-
description: "Restart ONE bot's server so hub.workspace.json edits (model, reasoning, role, subagents) and code changes take effect, without touching any other bot. By default it waits until the bot is idle in every thread, then restarts; with whenIdle false it interrupts now, taking over a restart still waiting for idle. Any turn the restart cuts off is re-delivered to a fresh session afterwards, and messages sent meanwhile wait for the bot. Returns right away; check list_agents (its `restart` field) for progress. main can't restart itself (a human can: `hub restart --bot main`).",
|
|
5
|
+
description: "Restart ONE bot's server so hub.workspace.json edits (model, reasoning, role, subagents) and code changes take effect, without touching any other bot. By default it waits until the bot is idle in every thread, then restarts; with whenIdle false it interrupts now, taking over a restart still waiting for idle. Any turn the restart cuts off is re-delivered to a fresh session afterwards, and messages sent meanwhile wait for the bot. Returns right away; check list_agents (its `restart` field) for progress. On a hosted workspace, a hosted bot's restart is a redeploy: it replaces every hosted bot at once, with no idle wait and no re-delivery (whenIdle and timeoutMinutes are ignored). main can't restart itself (a human can: `hub restart --bot main`).",
|
|
6
6
|
inputSchema: z.object({
|
|
7
7
|
name: z.string().describe("The bot to restart, a bot's name, as the workspace state lists it."),
|
|
8
8
|
whenIdle: z.boolean().optional().describe("Wait until it's idle everywhere first (default true)."),
|
package/world.mjs
CHANGED
|
@@ -26932,6 +26932,7 @@ var Requested = external_exports.object({ model: external_exports.string().optio
|
|
|
26932
26932
|
var Cap = Requested.extend({ models: external_exports.array(external_exports.string()).readonly().optional() });
|
|
26933
26933
|
var DeployedWorkspace = external_exports.object({
|
|
26934
26934
|
agents: external_exports.array(external_exports.looseObject({ name: external_exports.string(), role: external_exports.string(), color: external_exports.string(), model: external_exports.string(), runsOn: external_exports.enum(["hosted", "local"]).optional(), subagents: external_exports.record(external_exports.string(), Requested).optional(), subagentCap: Cap.optional() })),
|
|
26935
|
+
humans: external_exports.array(external_exports.looseObject({ name: external_exports.string(), color: external_exports.string().optional() })).optional(),
|
|
26935
26936
|
subagentCap: Cap.optional()
|
|
26936
26937
|
});
|
|
26937
26938
|
var Upgrade = external_exports.object({
|