eve-hub 0.6.20 → 0.6.22

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.22
4
+
5
+ ### Patch Changes
6
+
7
+ - Move shared hub code (dash, hitl, delta) out of registry/ into hosted-hub/src/domain.
8
+
9
+ ## 0.6.21
10
+
11
+ ### Patch Changes
12
+
13
+ - A failed bot update build carries the step that failed, the commit it built and the last lines of its build log.
14
+
3
15
  ## 0.6.20
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.20",
3
+ "version": "0.6.22",
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",
@@ -1,5 +1,5 @@
1
1
  // The threads part of main's dash pass (schedules/dash-pass.mjs): gives
2
- // every open thread, busy or idle, a Dash entry (registry/dash.mjs: importance,
2
+ // every open thread, busy or idle, a Dash entry (hosted-hub/src/domain/dash.mjs: importance,
3
3
  // lane, reason) and writes them back through POST /api/dash/entries.
4
4
  //
5
5
  // targets open threads (not DMs, schedule threads or archived) that aren't
@@ -41,8 +41,8 @@ const working = (t) => Object.values(t?.status ?? {}).includes("working");
41
41
  // What a classification was made from: the last message, the live status
42
42
  // class (waiting / working / idle) and the project and issue type tags. The entry
43
43
  // keeps it (entry.basis); a thread is classified again once it differs. Kept
44
- // in step with registry/dash.mjs classifyBasis (test/dash-entries.test.mjs).
45
- // The input version (registry/dash.mjs BASIS_VERSION): bumped when what the
44
+ // in step with hosted-hub/src/domain/dash.mjs classifyBasis (test/dash-entries.test.mjs).
45
+ // The input version (hosted-hub/src/domain/dash.mjs BASIS_VERSION): bumped when what the
46
46
  // model reads changes, so every entry made from the older input is
47
47
  // classified once more, then stays quiet.
48
48
  export const BASIS_VERSION = "v:lanes1";
@@ -131,7 +131,7 @@ export const DECISION_MODEL = "openai/gpt-6-luna-decisions";
131
131
 
132
132
  // What the thread is doing for the human, as one pick. Each state is one lane
133
133
  // (the entry's `lane`); `ready` isn't here, the hub derives it from the reviewer's
134
- // ship verdict on the PR's current head (entriesOf, registry/dash.mjs).
134
+ // ship verdict on the PR's current head (entriesOf, hosted-hub/src/domain/dash.mjs).
135
135
  export const STATES = {
136
136
  "asks-you": "needs-you",
137
137
  stuck: "running", // a stall is a bot's to steer; it shows on the thread's own row, not as the human's task
@@ -14,7 +14,7 @@ import { said, lastSaid } from "./thread-brief.mjs";
14
14
 
15
15
  // ---------------------------------------------------------------------------
16
16
  // dash: what changed since the last scan that could put something on the
17
- // human's Dash (registry/dash.mjs), with no model call. Four parts, each kept
17
+ // human's Dash (hosted-hub/src/domain/dash.mjs), with no model call. Four parts, each kept
18
18
  // exactly (by id, not time) in the saved state:
19
19
  // p the human's PRs: CI, review, draft, merge conflicts, open/merged/closed,
20
20
  // and every PR a Dash item waits on, whoever wrote it. A PR that leaves
@@ -1,6 +1,6 @@
1
1
  // Types for hub.mjs: main's schedules' client of the hub's HTTP API. Bodies
2
2
  // the schedules only pass through are `unknown`.
3
- import type { DashEntries } from '../../../registry/dash.mjs';
3
+ import type { DashEntries } from '../../../hosted-hub/src/domain/dash.mjs';
4
4
 
5
5
  type Notice = { schedule: string; text: string; clientId?: string };
6
6
  type Post = { text: string; clientId?: string };
package/schedules/hub.mjs CHANGED
@@ -42,14 +42,14 @@ export function createHub({ base = registryBase(), agent = "main", fetchImpl = f
42
42
  // With `report` ({ trigger, reportTo: "<bot>/<schedule>" }) the hub posts
43
43
  // this compaction's report lines into that schedule's thread itself.
44
44
  compact: (threadId, bot, by, report = {}) => call(`/api/threads/${encodeURIComponent(threadId)}/compact`, { method: "POST", body: JSON.stringify({ agent: bot, by, ...report }) }),
45
- // The Dash was scanned now (registry/dash.mjs checkedAt), changed or not.
45
+ // The Dash was scanned now (hosted-hub/src/domain/dash.mjs checkedAt), changed or not.
46
46
  // `prFacts` ({ "owner/repo#12": { head, ci } }): what the scan's GitHub query said of the PRs reviews are about.
47
47
  dashChecked: (prFacts = {}) => must("/api/dash/checked", { method: "POST", body: JSON.stringify({ by: agent, prFacts }) }),
48
48
  // A track's summary (set_summary's endpoint, as main).
49
49
  setSummary: (path, text) => must("/api/summaries", { method: "POST", body: JSON.stringify({ by: agent, scope: `path:${path}`, text }) }),
50
- // A classifier pass finished (registry/dash.mjs classifiedAt).
50
+ // A classifier pass finished (hosted-hub/src/domain/dash.mjs classifiedAt).
51
51
  dashClassified: () => must("/api/dash/classified", { method: "POST", body: JSON.stringify({ by: agent }) }),
52
- // Dash entries from the classifier (registry/dash.mjs), merged per field.
52
+ // Dash entries from the classifier (hosted-hub/src/domain/dash.mjs), merged per field.
53
53
  // File an unfiled thread into a track (the classifier's pick), as a bot:
54
54
  // the hub refuses a thread that's already filed and doesn't lock it.
55
55
  fileThread: (threadId, path) => must(`/api/threads/${encodeURIComponent(threadId)}/track`, { method: "POST", body: JSON.stringify({ by: agent, path }) }),
@@ -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
  // main only (the registry refuses other bots). Writes Dash entries
5
- // (registry/dash.mjs): importance / lane / reason / deferred on existing,
5
+ // (hosted-hub/src/domain/dash.mjs): importance / lane / reason / deferred on existing,
6
6
  // non-archived threads, merged field by field (POST /api/dash/entries). The
7
7
  // dash schedule classifies idle threads on its own; this is for corrections.
8
8
  const entry = z.object({
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  import { registryFetch } from "../registry-fetch.mjs";
4
4
  // main only (the registry refuses anyone else). The registry hands the restart
5
5
  // to a detached `hub restart`, which replaces the registry and keeps each bot
6
- // whose inputs are unchanged (registry/fingerprint.mjs); a turn the restart
6
+ // whose inputs are unchanged (lib/fingerprint.mjs); a turn the restart
7
7
  // cuts off is re-delivered, so it can't strand the turn that asked for it
8
8
  // (packages/agent-kit/self-restart.mjs).
9
9
  export default defineTool({
package/world.mjs CHANGED
@@ -26785,8 +26785,18 @@ var HostedUpdate = object2({
26785
26785
  commit: maybe(string5()),
26786
26786
  /** `updated`: the Vercel page of the deployment that made the move; absent for a move recorded before it was kept. */
26787
26787
  deployment: maybe(string5()),
26788
- /** `kind`: sign-in (the owner signs in again) | build (`url` is the failed build) | other. */
26789
- error: maybe(object2({ kind: string5(), message: string5(), url: maybe(string5()) }))
26788
+ /**
26789
+ * `kind`: sign-in (the owner signs in again) | build (`url` is the failed build) | other. A failed build also carries
26790
+ * what Vercel says of it once the hub has read it: the `step` that failed, the `sha` it built, and the `log`'s last lines.
26791
+ */
26792
+ error: maybe(object2({
26793
+ kind: string5(),
26794
+ message: string5(),
26795
+ url: maybe(string5()),
26796
+ step: maybe(string5()),
26797
+ sha: maybe(string5()),
26798
+ log: maybe(array2(string5()))
26799
+ }))
26790
26800
  }).meta({ id: "HostedUpdate" });
26791
26801
  var HostedWorkspace = object2({
26792
26802
  project: object2({ name: string5(), url: string5() }),
@@ -26927,7 +26937,8 @@ var Upgrade = external_exports.object({
26927
26937
  at: external_exports.string(),
26928
26938
  error: external_exports.object({ kind: external_exports.enum(["sign-in", "other"]), message: external_exports.string() }).nullable().default(null)
26929
26939
  });
26930
- var Attempt = external_exports.object({ id: external_exports.string().nullable(), key: external_exports.string().nullable(), state: external_exports.string(), url: external_exports.string() });
26940
+ var Failure = external_exports.object({ step: external_exports.string().nullable(), message: external_exports.string().nullable(), log: external_exports.array(external_exports.string()) });
26941
+ var Attempt = external_exports.object({ id: external_exports.string().nullable(), key: external_exports.string().nullable(), state: external_exports.string(), url: external_exports.string(), failure: Failure.nullable().default(null) });
26931
26942
  var StoredHosted = HostedWorkspace.omit({ eveHub: true, commits: true, update: true }).extend({
26932
26943
  workspaceEveHub: external_exports.string().nullable(),
26933
26944
  commit: external_exports.string().nullable().default(null),