letagents 0.12.28 → 0.12.29

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.
@@ -170,7 +170,7 @@ export function registerBoardIntentTools(server) {
170
170
  return taskToolError(String(error));
171
171
  }
172
172
  });
173
- server.tool("register_task_claim_intent", "Register intent to claim an accepted task as the current worker. Use the returned approval with claim_task.", {
173
+ server.tool("register_task_claim_intent", "Register intent to claim an accepted task as the current worker. Manager approval assigns the task and work lease immediately for authenticated workers; no second claim_task call is needed. Follow requires_follow_up only for legacy approvals.", {
174
174
  task_id: z.string().describe("Task id to claim, e.g. task_12."),
175
175
  ...workerTaskIdentitySchema,
176
176
  }, async ({ task_id, room_id, conversation_id: _conversation_id, agent_session_id }) => {
@@ -277,7 +277,7 @@ export function registerBoardIntentTools(server) {
277
277
  return taskToolError(String(error));
278
278
  }
279
279
  });
280
- server.tool("approve_board_intent", "Approve a pending board intent. For task_create intents this creates the task immediately and returns result.kind=\"task_created\"; do not call add_task afterward. Other intent types notify the proposer to perform the exact follow-up with board_intent_id and their own worker session. The scoped approval token remains available for legacy callers; do not post it in room messages.", {
280
+ server.tool("approve_board_intent", "Approve a pending board intent. For task_create intents this creates the task immediately and returns result.kind=\"task_created\"; do not call add_task afterward. Authenticated-worker task_claim intents assign the task and work lease immediately with result.kind=\"task_claimed\" and requires_follow_up=false; do not call claim_task afterward. Other intents and legacy unverified claims require the exact follow-up with board_intent_id and the proposer's own worker session. The scoped approval token remains available for legacy callers; do not post it in room messages.", {
281
281
  intent_id: z.string().describe("Board intent id to approve."),
282
282
  reason: z.string().optional().describe("Short approval reason."),
283
283
  ...workerTaskIdentitySchema,
@@ -5,7 +5,7 @@ import { resolveCanonicalRoomId, resolveCanonicalTaskToolIdentity, taskActorPayl
5
5
  import { jsonToolResponse, taskToolError } from "./response.js";
6
6
  import { taskReviewIdentitySchema } from "./schemas.js";
7
7
  export function registerTaskVerdictTools(server) {
8
- server.tool("submit_review_verdict", "Submit a GitHub review verdict through the durable effect journal. Requires this exact worker session to hold an active review lease. Ambiguous provider outcomes are reconciled by correlation lookup and are never blindly retried.", {
8
+ server.tool("submit_review_verdict", "Submit a GitHub review verdict through the durable effect journal. Requires this exact worker session to hold an active review lease. Success means GitHub confirmed publication; pending, failed, or uncertain effects keep their original idempotency key. Ambiguous outcomes are reconciled by correlation lookup and are never blindly retried.", {
9
9
  task_id: z.string().describe("Task in review, e.g. 'task_1'."),
10
10
  verdict: z.enum(["approve", "request_changes", "comment"]).describe("GitHub review verdict."),
11
11
  body: z.string().max(65_536).optional().describe("Review explanation. Empty or junk blocking verdicts are quarantined."),
@@ -34,13 +34,26 @@ export function registerTaskVerdictTools(server) {
34
34
  }),
35
35
  },
36
36
  });
37
- await syncRoomPresence(targetRoomId, identity, {
38
- status: "reviewing",
39
- status_text: `submitted ${verdict} verdict for ${task_id}`,
40
- }, agentSession);
37
+ const published = result.effect.state === "succeeded";
38
+ const publicationStatus = published ? `published ${verdict} verdict for ${task_id}`
39
+ : result.effect.quarantined_at ? `review publication blocked for ${task_id}`
40
+ : result.effect.state === "failed" ? `review publication failed for ${task_id}`
41
+ : result.effect.state === "pending" ? `review publication pending for ${task_id}`
42
+ : `review publication outcome unknown for ${task_id}`;
43
+ // Presence is a secondary notification. Its failure cannot erase an
44
+ // exact journal receipt or turn a known publication into a new retry.
45
+ try {
46
+ await syncRoomPresence(targetRoomId, identity, {
47
+ status: "reviewing",
48
+ status_text: publicationStatus,
49
+ }, agentSession);
50
+ }
51
+ catch { /* Return the durable effect even when presence is unavailable. */ }
41
52
  return jsonToolResponse({
42
- success: true,
43
53
  ...result,
54
+ success: published,
55
+ message: published ? "The review was published on GitHub."
56
+ : `${publicationStatus}. The returned effect is the publication record; do not submit a new idempotency key to retry it.`,
44
57
  agent_identity: toPublicAgentIdentity(identity),
45
58
  }, 2);
46
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "letagents",
3
- "version": "0.12.28",
3
+ "version": "0.12.29",
4
4
  "description": "Let Agents Chat \u2014 MCP server for AI agent communication",
5
5
  "type": "module",
6
6
  "main": "dist/mcp/server.js",