eve-hub 0.5.3 → 0.5.5

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.5.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 2d21596: Publish the `update_thread` tool (replaces `rename_thread`). The published 0.5.4 predates it, so a workspace whose agents import `eve-hub/tools/update_thread` fails to build.
8
+
9
+ ## 0.5.4
10
+
11
+ ### Patch Changes
12
+
13
+ - 8f951a0: Change explainer: a `prs[]` entry without `number` publishes as a commit range (no fake PR number), and step names may index with brackets, e.g. `CODES[code]`.
14
+
3
15
  ## 0.5.3
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -4,7 +4,7 @@ The bot-side code every hub agent shares (milestone M3 in [`docs/architecture`](
4
4
 
5
5
  | Module | What it is | Bots use it as |
6
6
  |---|---|---|
7
- | `tools/rename_thread.ts`, `list_threads.ts`, `read_thread.ts`, `react.ts`, `show.ts`, `attach_image.ts`, `browser.ts` | Registry and workspace tools (`defineTool`) | `agent/tools/<same name>.ts` |
7
+ | `tools/update_thread.ts`, `list_threads.ts`, `read_thread.ts`, `react.ts`, `show.ts`, `attach_image.ts`, `browser.ts` | Registry and workspace tools (`defineTool`) | `agent/tools/<same name>.ts` |
8
8
  | `tools/create_thread.ts`, `post_message.ts`, `archive_thread.ts`, `unarchive_thread.ts`, `list_agents.ts`, `create_agent.ts`, `remove_agent.ts`, `restart_agent.ts`, `agent_send.ts`, `tag_threads.ts`, `apply_tags.ts` | The orchestrator's tools | `main`'s `agent/tools/<same name>.ts` |
9
9
  | `hooks/sandbox.ts` | Migrates legacy Docker sessions to the host sandbox (`defineHook`) | `agent/hooks/sandbox.ts` |
10
10
  | `instructions/main.ts`, `main-instructions.mjs` | main's instructions (`defineInstructions`), rendered at build time from the kit's `templates/main-instructions.md` + `workspace-protocol.md`, so no workspace carries a copy | `main`'s `agent/instructions.ts`; workspace-only additions in `agent/instructions/*.md` |
@@ -28,8 +28,8 @@ The `hubChannel` from D0 isn't here yet. Turn lifecycle and replies are owned by
28
28
  eve discovers tools, hooks, and channels by file under `agent/tools`, `agent/hooks`, and `agent/channels`. A tool's name is its file name, so the file has to exist in the bot. The stub just re-exports the kit's default:
29
29
 
30
30
  ```ts
31
- // agents/<bot>/agent/tools/rename_thread.ts
32
- export { default } from "eve-hub/tools/rename_thread";
31
+ // agents/<bot>/agent/tools/update_thread.ts
32
+ export { default } from "eve-hub/tools/update_thread";
33
33
  ```
34
34
 
35
35
  `sandbox.ts` stays a small module of its own, because each agent and subagent declares its own `environment`:
@@ -21,14 +21,15 @@ export function firstSentence(text = "") {
21
21
  return sentence.length > 220 ? `${sentence.slice(0, 219).replace(/\s+\S*$/, "")}…` : sentence;
22
22
  }
23
23
 
24
- // Card fields from the fixture: what the change is, and which commits.
25
- export function cardOf(fixture, overview) {
24
+ // Card fields from the fixture: what the change is, and which commits. A
25
+ // change with no PRs (a local repo) names its branch instead.
26
+ export function cardOf(fixture, overview, branch) {
26
27
  const short = (sha) => String(sha ?? "").slice(0, 9);
27
- const prs = (fixture.prs ?? []).map((p) => `#${p.number}`);
28
+ const prs = (fixture.prs ?? []).filter((p) => p.number !== undefined).map((p) => `#${p.number}`);
28
29
  return {
29
30
  title: fixture.title ?? fixture.id,
30
31
  gist: firstSentence(overview?.thesis),
31
- subtitle: [fixture.repo, prs.join(" ")].filter(Boolean).join(" "),
32
+ subtitle: [fixture.repo, ...(prs.length ? prs : [branch])].filter(Boolean).join(" "),
32
33
  ref: `${short(fixture.base)}..${short(fixture.head)}`,
33
34
  };
34
35
  }
@@ -51,7 +52,7 @@ async function build(source, { sandbox }) {
51
52
  });
52
53
  const listing = await run(sandbox, ["find", data, "-type", "f", "-print0"]);
53
54
  for (const file of listing.split("\0").filter(Boolean)) files.push({ file: `data/${file.slice(data.length + 1)}`, data: await sandbox.readBinaryFile({ path: file }) });
54
- return { files, card: cardOf(fixture, overview), meta: { repo: fixture.repo, base, head, prs: (fixture.prs ?? []).map((p) => p.number) } };
55
+ return { files, card: cardOf(fixture, overview, source.branch), meta: { repo: fixture.repo, base, head, prs: (fixture.prs ?? []).flatMap((p) => p.number ?? []) } };
55
56
  } finally {
56
57
  await sandbox.removePath({ path: work, recursive: true, force: true });
57
58
  }