eve-hub 0.16.42 → 0.16.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve-hub",
3
- "version": "0.16.42",
3
+ "version": "0.16.43",
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",
@@ -20,6 +20,20 @@ export declare const artifactInput: z.ZodObject<{
20
20
  }>;
21
21
  title: z.ZodString;
22
22
  }, z.core.$strip>;
23
+ export declare const trackerRow: z.ZodObject<{
24
+ id: z.ZodString;
25
+ title: z.ZodString;
26
+ state: z.ZodEnum<{
27
+ backlog: "backlog";
28
+ canceled: "canceled";
29
+ completed: "completed";
30
+ started: "started";
31
+ unstarted: "unstarted";
32
+ }>;
33
+ owner: z.ZodString;
34
+ waitsOn: z.ZodOptional<z.ZodString>;
35
+ ref: z.ZodString;
36
+ }, z.core.$strip>;
23
37
  /** An artifact's link: the one given (a sandbox path uploaded), else the post's first link, else its PR. */
24
38
  export declare function artifactUrl(given: string | undefined, text: string, pr: string | undefined, open: (path: string) => Promise<string>): Promise<string>;
25
39
  declare const _default: import("eve/tools").ToolDefinition<{
@@ -47,6 +61,14 @@ declare const _default: import("eve/tools").ToolDefinition<{
47
61
  title: string;
48
62
  url?: string | undefined;
49
63
  } | undefined;
64
+ step?: {
65
+ id: string;
66
+ title: string;
67
+ state: "backlog" | "canceled" | "completed" | "started" | "unstarted";
68
+ owner: string;
69
+ waitsOn?: string | undefined;
70
+ ref?: string | undefined;
71
+ } | undefined;
50
72
  }, {
51
73
  messageId: string;
52
74
  threadId: string;
@@ -78,6 +100,14 @@ declare const _default: import("eve/tools").ToolDefinition<{
78
100
  title: string;
79
101
  url?: string | undefined;
80
102
  } | undefined;
103
+ step?: {
104
+ id: string;
105
+ title: string;
106
+ state: "backlog" | "canceled" | "completed" | "started" | "unstarted";
107
+ owner: string;
108
+ waitsOn?: string | undefined;
109
+ ref?: string | undefined;
110
+ } | undefined;
81
111
  }, ctx: import("eve/tools").ToolContext): Promise<{
82
112
  messageId: string;
83
113
  threadId: string;
@@ -133,6 +133,15 @@ export const artifactInput = z.object({
133
133
  kind: z.enum(["walkthrough", "sitrep", "plan", "review", "pr", "decision", "doc"]).describe("What the artifact is."),
134
134
  title: z.string().min(1).max(80).describe("Names the thing, at most 80 characters, e.g. 'First-sync walk-through'. A newer post under the same kind and title is marked as the latest version; older versions stay listed."),
135
135
  });
136
+ // The hub checks each row again (packages/wire/src/state.ts TrackerRow); this is what the model reads.
137
+ export const trackerRow = z.object({
138
+ id: z.string().describe("Your stable id for the row, e.g. 'review'. Send the same id again to move the row; the hub merges by id."),
139
+ title: z.string().describe("What the work is, in a few words, e.g. 'Review the fix'."),
140
+ state: z.enum(["backlog", "unstarted", "started", "completed", "canceled"]).describe("started: being worked on now; unstarted: next, ready to start; backlog: needed before the goal is done, not next; completed: done; canceled: dropped."),
141
+ owner: z.string().describe("Who acts on it: a bot name or the human's handle."),
142
+ waitsOn: z.string().optional().describe("Who or what it is blocked on, e.g. 'rconti' or 'an eve maintainer'."),
143
+ ref: z.string().describe("What the row opens; every row needs one: a post as thr_ID#msg_ID (a hash, never a slash), a PR or issue as owner/repo#N or its github.com URL, or an https URL."),
144
+ });
136
145
  /** An artifact's link: the one given (a sandbox path uploaded), else the post's first link, else its PR. */
137
146
  export async function artifactUrl(given, text, pr, open) {
138
147
  if (given)
@@ -177,8 +186,12 @@ export default defineTool({
177
186
  .extend({ url: z.string().optional().describe("What a tap opens: a sandbox path (uploaded), hub://upload link or https URL. Default: the post's first link, else metadata.pr.") })
178
187
  .optional()
179
188
  .describe("Tags this post as one of the thread's artifacts, shown in the thread's Artifacts pane: a walk-through, sitrep, plan, review, PR, decision or doc. The pane lists every version and marks the newest per kind and title as latest, so post a new version under the same title to supersede the old one."),
189
+ step: trackerRow
190
+ .extend({ ref: z.string().optional().describe("What the row opens. Default: this post.") })
191
+ .optional()
192
+ .describe("The thread's tracker row this post marks, written with the post: e.g. on a status post handing a PR to review, {id: 'review', title: 'Review the fix', state: 'started', owner: 'reviewer'}. The hub merges it by id, so the same id on a later post moves the same row, and stamps the time and your name when its state, owner or wait changes. Optional."),
180
193
  }),
181
- async execute({ threadId, agent, text, images, policy, status, metadata, verdict, decisions, tested, artifact }, ctx) {
194
+ async execute({ threadId, agent, text, images, policy, status, metadata, verdict, decisions, tested, artifact, step }, ctx) {
182
195
  const bad = textError(text);
183
196
  if (bad)
184
197
  throw new Error(bad);
@@ -194,7 +207,7 @@ export default defineTool({
194
207
  const res = await registryFetch(`/api/threads/${encodeURIComponent(target)}/messages`, {
195
208
  method: "POST",
196
209
  headers: { "content-type": "application/json" },
197
- body: JSON.stringify({ text: posted, sessionId: ctx.session.id, ...(attachments.length ? { attachments: attachments.map(({ id, name }) => ({ id, name })) } : {}), ...(policy ? { policy } : {}), ...(status ? { status } : {}), ...(metadata ? { metadata } : {}), ...(verdict ? { verdict } : {}), ...(decisions ? { decisions } : {}), ...(tested ? { tested } : {}), ...(tagged ? { artifact: tagged } : {}) }),
210
+ body: JSON.stringify({ text: posted, sessionId: ctx.session.id, ...(attachments.length ? { attachments: attachments.map(({ id, name }) => ({ id, name })) } : {}), ...(policy ? { policy } : {}), ...(status ? { status } : {}), ...(metadata ? { metadata } : {}), ...(verdict ? { verdict } : {}), ...(decisions ? { decisions } : {}), ...(tested ? { tested } : {}), ...(tagged ? { artifact: tagged } : {}), ...(step ? { step } : {}) }),
198
211
  });
199
212
  if (!res.ok)
200
213
  throw new Error(`post_message failed: ${res.status} ${await res.text()}`);
@@ -9,7 +9,6 @@ declare const _default: import("eve/tools").ToolDefinition<{
9
9
  state: "backlog" | "canceled" | "completed" | "started" | "unstarted";
10
10
  owner: string;
11
11
  waitsOn?: string | undefined;
12
- since?: string | undefined;
13
12
  ref: string;
14
13
  }[] | undefined;
15
14
  pathLabel?: string | undefined;
@@ -32,7 +31,6 @@ declare const _default: import("eve/tools").ToolDefinition<{
32
31
  state: "backlog" | "canceled" | "completed" | "started" | "unstarted";
33
32
  owner: string;
34
33
  waitsOn?: string | undefined;
35
- since?: string | undefined;
36
34
  ref: string;
37
35
  }[] | undefined;
38
36
  pathLabel?: string | undefined;
@@ -9,17 +9,7 @@ import { defineTool } from "eve/tools";
9
9
  import { z } from "zod";
10
10
  import { registryFetch } from "../registry-fetch.mjs";
11
11
  import { documentUrl } from "../hub-upload.js";
12
- import { artifactInput, artifactUrl } from "./post_message.js";
13
- // The hub checks each row again (packages/wire/src/state.ts TrackerRow); this is what the model reads.
14
- const trackerRow = z.object({
15
- id: z.string().describe("Your stable id for the row, unique in the list, e.g. 'server-step-12'. Keep it across rewrites."),
16
- title: z.string().describe("What the work is, in a few words, e.g. 'Build server step 12'."),
17
- state: z.enum(["backlog", "unstarted", "started", "completed", "canceled"]).describe("started: being worked on now; unstarted: next, ready to start; backlog: needed before the goal is done, not next; completed: done; canceled: dropped."),
18
- owner: z.string().describe("Who acts on it: a bot name or the human's handle."),
19
- waitsOn: z.string().optional().describe("Who or what it is blocked on, e.g. 'rconti' or 'an eve maintainer'."),
20
- since: z.string().optional().describe("With waitsOn: the ISO date the wait began, e.g. '2026-11-03'."),
21
- ref: z.string().describe("What the row opens; every row needs one: a post as thr_ID#msg_ID (a hash, never a slash), a PR or issue as owner/repo#N or its github.com URL, or an https URL."),
22
- });
12
+ import { artifactInput, artifactUrl, trackerRow } from "./post_message.js";
23
13
  export default defineTool({
24
14
  description: "Update a workspace thread you're in: its title, track, issue type and tracker, in one call. Retitle when the work's scope has changed and the old title no longer fits: everyone sees a short 'renamed this thread: old → new' line; the history is kept. Keep titles short (at most 80 characters). File it on a path (project/track, e.g. 'web/checkout': the first segment is the project, the second the track) and tag an issue type (the kind of work, e.g. 'feature', 'bugfix', 'infra'). Reuse a project, track and issue type in use whenever one fits. File under the project alone until at least 3 threads share a track. For a new tag, also give its display name (projectLabel, pathLabel or issueTypeLabel, e.g. 'Payments API'). The thread's summary isn't yours to write: the hub derives where it stands from its posts after each one. The reply's `inUse` lists the tags in use with their thread counts and flags a tag no other thread uses; when one in use fits better than yours, call update_thread again with it. Tags a human set by hand stay. DMs and archived threads can't be updated.",
25
15
  inputSchema: z.object({
@@ -31,7 +21,7 @@ export default defineTool({
31
21
  .array(trackerRow)
32
22
  .max(50)
33
23
  .optional()
34
- .describe("The thread's whole tracker: every piece of work toward its goal, one row each, drawn as the Artifacts pane's Pending now (started, unstarted), Pending until done (backlog), Done (completed) and Dropped (canceled) lists. Replaces the previous list; [] clears it. Omit to leave it. Keep it current: send the whole list again whenever a row's state, owner or wait changes. A row whose ref is a PR moves to Done or Dropped by itself when the PR merges or closes."),
24
+ .describe("Tracker rows to add or change: the thread's pieces of work toward its goal, one row each, drawn as the Artifacts pane's Done (completed), Pending now (started, unstarted), Pending until done (backlog) and Dropped (canceled) lists. The hub merges them by id: a row with a known id is replaced, a new id is added, and rows you don't send stay as they are, so send only the rows that changed. To drop a row, send it as canceled. The hub stamps the time and your name on each row whose state, owner or wait changes. For a step that has its own post, prefer post_message's `step`. A row whose ref is a PR moves to Done or Dropped by itself when the PR merges or closes."),
35
25
  pathLabel: z.string().optional().describe("Display name for a new path's last segment, e.g. 'Cart'. Only names a path that has none yet."),
36
26
  projectLabel: z.string().optional().describe("Display name for a new project (a path's first segment), shown as its sidebar group, e.g. 'Payments API' for payments-api. Only names a project that has none yet."),
37
27
  issueTypeLabel: z.string().optional().describe("Display name for a new issue type tag, e.g. 'Bug fixes' for bugfix. Only names a tag that has none yet."),