eve-hub 0.6.24 → 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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # eve-hub
2
2
 
3
+ ## 0.6.26
4
+
5
+ ### Patch Changes
6
+
7
+ - A deployed main keeps remove_agent and restart_agent: removal is a commit to the workspace repo, a hosted restart is a redeploy. remove_agent sends its session.
8
+
9
+ ## 0.6.25
10
+
11
+ ### Patch Changes
12
+
13
+ - 6433096: The Forms guide names the shape by what the content is: a path through three or more parts, events across actors, numbers to compare, and time split into phases (a latency breakdown) as a schedule chart. Never prose steps, an arrow chain, a character drawing or one bar per total.
14
+
3
15
  ## 0.6.24
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.24",
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 tools that
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. There is no `remove_agent`: the roster is `hub.workspace.json`, and a deployment changes it by commit. If nobody on the team covers the work well, ask the human before going on.
2
- - **Restarts.** There is no `restart_agent` or `restart_hub`: you cannot restart a bot or the hub. A new deployment replaces the running bots.
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.
@@ -1,8 +1,10 @@
1
1
 
2
2
  ## Forms
3
3
 
4
- A form is an interactive figure the app draws from a fenced block with a JSON body. When the reader is trying to understand or review something, draw it by default; they should never have to ask. Pick the shape: a path through parts (`flow`), an order of events (`sequence`), numbers to compare (`chart`), a choice you need from the human (`ask`). Anchor the picture in something they know, e.g. a before form then an after form, each labeled, in one message. Every part of one diagram is the same kind of thing (all hosts, all processes or all functions); say which in the sentence before it, and for a sequence in `unit`. A group is the level that contains them (processes grouped under their host). Plain prose is for what no shape helps. At most one or two forms per message.
4
+ A form is an interactive figure the app draws from a fenced block with a JSON body. Any path through three or more parts, order of events across two or more actors, or numbers to compare is a form, never prose steps, an arrow chain or a character drawing; draw it by default; the reader should never have to ask. Pick the shape: a path through parts (`flow`), an order of events (`sequence`), numbers to compare (`chart`), a choice you need from the human (`ask`). Anchor the picture in something they know, e.g. a before form then an after form, each labeled, in one message. Every part of one diagram is the same kind of thing (all hosts, all processes or all functions); say which in the sentence before it, and for a sequence in `unit`. A group is the level that contains them (processes grouped under their host). Plain prose is for what no shape helps. At most one or two forms per message.
5
5
 
6
+ - A code fence is for text the reader will paste, never for a picture: no boxes, arrows, timelines or tables drawn with characters.
7
+ - Pick the shape by what the numbers are. Time split into phases or hops (a latency breakdown, a turn's timeline) is a `schedule` chart: one row per turn or request, one start/end segment per phase, never one `bar` per total. A `bar` compares one number across items.
6
8
  - Claim first: a sentence that says what the form shows comes before it. A chart's `title` is its claim.
7
9
  - Link a word in your prose to a part with `[word](#id)`. Ids are lowercase slugs (`a-z`, `0-9`, `-`, up to 32 characters), unique in the whole message.
8
10
  - Put the explanation of a part in `note` (up to 240 characters), which the human sees when they point at or step to it. Keep labels short.
@@ -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}`);
@@ -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({