eve-hub 0.5.2 → 0.5.4

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 (50) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +2 -2
  3. package/artifacts/types/change-explainer.mjs +6 -5
  4. package/artifacts/types/explainer-assets.gen.mjs +2 -2
  5. package/channels/eve-roster-user.d.ts +1 -1
  6. package/connections/vercel-kit.d.ts +1 -1
  7. package/hooks/mention-gate.d.ts +1 -1
  8. package/hooks/sandbox.d.ts +1 -1
  9. package/host-sandbox.d.ts +16 -4
  10. package/instructions/main.d.ts +3 -1
  11. package/instructions/protocol.d.ts +3 -1
  12. package/memory/bot.d.ts +16 -1
  13. package/memory/workspace.d.ts +16 -1
  14. package/package.json +2 -2
  15. package/schedules/classify.d.ts +4 -1
  16. package/schedules/compact.d.ts +4 -1
  17. package/schedules/dash.d.ts +4 -1
  18. package/schedules/hub.d.mts +26 -0
  19. package/schedules/hub.mjs +2 -2
  20. package/schedules/prune.d.ts +4 -1
  21. package/schedules/tracks.d.ts +4 -1
  22. package/skills/change-explainer.gen.mjs +1 -1
  23. package/tools/agent_send.d.ts +15 -1
  24. package/tools/apply_tags.d.ts +41 -1
  25. package/tools/archive_thread.d.ts +25 -1
  26. package/tools/artifact_list.d.ts +27 -1
  27. package/tools/artifact_publish.d.ts +17 -1
  28. package/tools/artifact_status.d.ts +25 -1
  29. package/tools/attach_image.d.ts +15 -1
  30. package/tools/bash.d.ts +16 -1
  31. package/tools/browser.d.ts +17 -1
  32. package/tools/create_agent.d.ts +25 -1
  33. package/tools/create_thread.d.ts +29 -1
  34. package/tools/dash_update.d.ts +29 -1
  35. package/tools/disabled.d.ts +1 -1
  36. package/tools/list_agents.d.ts +59 -1
  37. package/tools/list_threads.d.ts +23 -1
  38. package/tools/move_path.d.ts +9 -1
  39. package/tools/post_message.d.ts +33 -1
  40. package/tools/react.d.ts +13 -1
  41. package/tools/read_thread.d.ts +14 -2
  42. package/tools/remove_agent.d.ts +13 -1
  43. package/tools/rename_thread.d.ts +21 -1
  44. package/tools/restart_agent.d.ts +11 -1
  45. package/tools/restart_hub.d.ts +9 -1
  46. package/tools/set_summary.d.ts +9 -1
  47. package/tools/show.d.ts +17 -1
  48. package/tools/tag_threads.d.ts +45 -1
  49. package/tools/unarchive_thread.d.ts +15 -1
  50. package/tools/view_image.d.ts +42 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # eve-hub
2
+
3
+ ## 0.5.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 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]`.
8
+
9
+ ## 0.5.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 383e906: Published through Changesets from the release workflow; no API changes.
package/README.md CHANGED
@@ -52,13 +52,13 @@ A bot's role is enforced by its files as well as its prose. `create_agent`'s `pr
52
52
  3. The stubs use the specifiers the `exports` map serves (`eve-hub/tools/x`, `eve-hub/host-sandbox`, `eve-hub/roster-model`, …).
53
53
  4. `eve` and `zod` are peer dependencies. eve's bundler resolves the kit to its realpath, so the kit's own `eve` imports come from hub's install. When the workspace's eve is linked to hub's, that's one eve (verified with eve 0.69).
54
54
 
55
- Bump `version` when a tool's name, schema, or description, the hook's events, or the channel config changes. Hub records each agent's kit version and accepts N and N−1 (D0/D12).
55
+ Add a changeset (`pnpm changeset`, pick `eve-hub`) when a tool's name, schema, or description, the hook's events, or the channel config changes; the release bumps `version` from it. Hub records each agent's kit version and accepts N and N−1 (D0/D12).
56
56
 
57
57
  ## Published package (deployed workspaces)
58
58
 
59
59
  A deployed workspace (`node scripts/workspace-template.mjs <dir>`, lib/workspace-template.mjs) has no hub checkout to link, so it installs the kit from npm, published as [`eve-hub`](https://www.npmjs.com/package/eve-hub): `"eve-hub": "<version>"`. `node packages/agent-kit/scripts/pack.mjs <outDir>` builds the package: every `.ts` module compiled to `.js` + `.d.ts` in place (node won't strip types under `node_modules`), the `exports` map pointed at them, and `templates/` included.
60
60
 
61
- `.github/workflows/publish-eve-hub.yml` publishes it on every push to main whose kit `version` npm doesn't have yet, authenticated by the repo's `NPM_TOKEN` secret (an npm automation token). Bump `version` to ship a kit change to deployed workspaces; the template pins the version this checkout carries.
61
+ Releases go through Changesets, as in eve. A PR that changes the kit adds a changeset (`pnpm changeset`); when it merges, `.github/workflows/release.yml` bumps `version`, writes CHANGELOG.md, commits both to main and runs `changeset publish`: the kit's `prepack` stages the package into `dist/npm` (its `publishConfig.directory`), npm gets it, and the `eve-hub@<version>` GitHub release is created. npm auth is the repo's `NPM_TOKEN` secret (an npm automation token). The template pins the version this checkout carries.
62
62
 
63
63
  The template's main gets a Vercel Sandbox and only the kit stubs that run without the hub's machine (lib/workspace-template.mjs `DEPLOYED_KIT_FILES`; eve's own bash replaces the kit's). The published tarball (`scripts/pack.mjs`) leaves out the kit__worker extension, which mounts only on the hub's machine. The hub reaches each bot's eve channel with `Authorization: Bearer $BOT_TOKEN` (`bot-token.mjs`); the kit's calls to the hub (`registry-fetch.mjs`, at `ROSTER_REGISTRY_URL`) carry `Authorization: Bearer $HUB_TOKEN` and, since the hosted hub keeps Vercel Authentication on, `x-vercel-protection-bypass: $HUB_PROTECTION_BYPASS` (the hub project's automation bypass secret), each when set.
64
64
 
@@ -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
  }