eve-hub 0.15.0 → 0.15.2

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.15.2
4
+
5
+ ### Patch Changes
6
+
7
+ - A wake-up posts at every firing. The hub no longer skips one because the bot had a turn in the thread since setting it, so a turn that only reacted can't cancel a promised check. Only deleting it, or `until` passing, stops it. The tool description and the shared instructions say so.
8
+
9
+ ## 0.15.1
10
+
11
+ ### Patch Changes
12
+
13
+ - `list_agents`: a post that @-mentions an unavailable Mac bot now waits until its setup works, instead of being refused.
14
+
3
15
  ## 0.15.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve-hub",
3
- "version": "0.15.0",
3
+ "version": "0.15.2",
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",
@@ -31,13 +31,13 @@ export declare function wakeAuth(principal: Principal): {
31
31
  issuer?: string | undefined;
32
32
  subject?: string | undefined;
33
33
  } | null;
34
- /** The one call a firing makes: the hub decides whether to post, keyed on the occurrence so a retry posts once.
34
+ /** The one call a firing makes: the hub posts it, keyed on the occurrence so a retry posts once.
35
35
  * A definitive refusal (a 4xx: the session is unknown, the thread archived) is returned, not thrown: retrying it can't change it. */
36
36
  export declare function fireWake(payload: ArmedWake, occurrence: Occurrence, { fetchImpl, base }?: {
37
37
  fetchImpl?: typeof fetch;
38
38
  base?: string;
39
39
  }): Promise<{
40
- status: "posted" | "skipped";
40
+ status: "posted";
41
41
  } | {
42
42
  status: "refused";
43
43
  error: string;
package/schedules/wake.js CHANGED
@@ -10,9 +10,8 @@
10
10
  // before approval and again before writing, and refuses the write if the two differ.
11
11
  // When it was armed is the hub's: it records the schedule record the tool call returns.
12
12
  // When it fires, run() tells the hub (POST /api/wakes, hosted-hub/src/api/wakes.ts)
13
- // as the bot's deployment; the hub skips it if the bot has had a turn in the thread
14
- // since arming or its last firing, and otherwise posts a system @-mention that queues
15
- // behind any running turn. An occurrence scheduled past `until` deletes the schedule
13
+ // as the bot's deployment; the hub posts a system @-mention for every occurrence, which
14
+ // queues behind any running turn. An occurrence scheduled past `until` deletes the schedule
16
15
  // instead. run() never starts a session itself: a session eve starts here is one the
17
16
  // hub cannot see.
18
17
  import { byPrincipal, defineDynamicSchedules, schedules } from "eve/experimental/schedules";
@@ -28,7 +27,7 @@ export function wakeAuth(principal) {
28
27
  return null;
29
28
  return { principalType: principal.type, authenticator: principal.authenticator, principalId: principal.principalId, attributes: {}, ...(principal.issuer === undefined ? {} : { issuer: principal.issuer }), ...(principal.subject === undefined ? {} : { subject: principal.subject }) };
30
29
  }
31
- /** The one call a firing makes: the hub decides whether to post, keyed on the occurrence so a retry posts once.
30
+ /** The one call a firing makes: the hub posts it, keyed on the occurrence so a retry posts once.
32
31
  * A definitive refusal (a 4xx: the session is unknown, the thread archived) is returned, not thrown: retrying it can't change it. */
33
32
  export async function fireWake(payload, occurrence, { fetchImpl = fetch, base } = {}) {
34
33
  const res = await registryFetch("/api/wakes", {
@@ -52,7 +51,7 @@ export async function expireOrFire(payload, occurrence, { remove, fire }) {
52
51
  return fire(payload, occurrence);
53
52
  }
54
53
  const definition = defineDynamicSchedules({
55
- description: "A wake-up for this thread: arm it when you end a turn with your own work unfinished and nothing sure to wake you. One-shot: a delay set to the expected wait. Recurring: a cron expression. Always set `until`, the last time it may fire. The hub posts it into this thread unless you have had a turn here since it was set or last fired.",
54
+ description: "A wake-up for this thread: arm it when you end a turn with your own work unfinished and nothing sure to wake you. One-shot: a delay set to the expected wait. Recurring: a cron expression. Always set `until`, the last time it may fire. Every firing posts into this thread until you delete it or `until` passes.",
56
55
  inputSchema: WakeInput,
57
56
  scope: byPrincipal,
58
57
  tool: true,
@@ -21,8 +21,8 @@
21
21
  - **Waiting**
22
22
  - Never sleep or poll more than 60 seconds in one command. Check CI or a deploy once, report, and say what you're waiting on.
23
23
  - While work runs, post at least every 30 minutes: a result, or the one thing blocking you.
24
- - Ending a turn with your own work unfinished and nothing sure to wake you (CI, a deploy, a background task, stopping partway): arm a wake-up with `schedule__wake__create`, the delay set to the expected wait, the note saying what to pick up and `until` a little after it. It posts into this thread unless you've had a turn here since.
25
- - To check back repeatedly (a long CI run, a slow rollout), arm it with a cron expression, `until` the last time it may fire. It posts each time the thread has been quiet since the last one.
24
+ - Ending a turn with your own work unfinished and nothing sure to wake you (CI, a deploy, a background task, stopping partway): arm a wake-up with `schedule__wake__create`, the delay set to the expected wait, the note saying what to pick up and `until` a little after it. It posts into this thread at that time, whatever happens meanwhile; delete it if the wait is over.
25
+ - To check back repeatedly (a long CI run, a slow rollout), arm it with a cron expression, `until` the last time it may fire. It posts at every firing; delete it once you're done waiting.
26
26
  - Don't arm one while waiting on the human or on a bot you just mentioned: their reply wakes you.
27
27
  - **Ending a turn**
28
28
  - End only with results, a blocker you can't clear, or a question for the human; never "I'll do it next".
@@ -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: "List the workspace's bots right now: each one's role, kind (its place in the team: coordinator, planner, builder, reviewer, git-ops, demo, or other), where it runs (hosted or local), the tools its runtime reports (null when not yet reported), its model, the model and reasoning each of its declared subagents and its built-in `agent` copies resolve to under the workspace subagent cap (clamped from hub.workspace.json, never rejected), whether it's idle, busy (and where; a bot's threads run in parallel, so busy elsewhere doesn't mean it can't start work in a new thread) or unavailable (with `reason`: a Mac bot whose Mac couldn't set up the workspace; a post that @-mentions it is refused, so route the work elsewhere or ask the human), its server's memory (process.rssMb) and uptime (process.uptimeS; only on a local hub, since a hosted hub runs no bot process to measure), and any restart in progress (restart_agent, or the registry recycling a bot that grew too big or ran too long). The team changes; check it before routing work.",
5
+ description: "List the workspace's bots right now: each one's role, kind (its place in the team: coordinator, planner, builder, reviewer, git-ops, demo, or other), where it runs (hosted or local), the tools its runtime reports (null when not yet reported), its model, the model and reasoning each of its declared subagents and its built-in `agent` copies resolve to under the workspace subagent cap (clamped from hub.workspace.json, never rejected), whether it's idle, busy (and where; a bot's threads run in parallel, so busy elsewhere doesn't mean it can't start work in a new thread) or unavailable (with `reason`: a Mac bot whose Mac couldn't set up the workspace; a post that @-mentions it waits until setup works, so route urgent work elsewhere), its server's memory (process.rssMb) and uptime (process.uptimeS; only on a local hub, since a hosted hub runs no bot process to measure), and any restart in progress (restart_agent, or the registry recycling a bot that grew too big or ran too long). The team changes; check it before routing work.",
6
6
  inputSchema: z.object({}),
7
7
  async execute() {
8
8
  // Anything but a 2xx list of bots is an error naming the status and the