Skip to content

Agent Mesh

docs(warm-pool): note token in acquire_worker description and fail-closed behavior

Tomas Tormo6daabb8ba741
diff --git a/development/examples/code-reviewer-pool/manager/server.mjs b/development/examples/code-reviewer-pool/manager/server.mjs
index ebdfe5ed..473be5c1 100644
--- a/development/examples/code-reviewer-pool/manager/server.mjs
+++ b/development/examples/code-reviewer-pool/manager/server.mjs
@@ -74,8 +74,8 @@ server.registerTool(
"acquire_worker",
{
description:
- `Acquire (lease) a free worker from the '${POOL_SERVICE}' pool. Returns {peer_id, tool, lease_id}: ` +
- "call the tool via call_remote_tool, then release_worker with the same peer_id and lease_id. " +
+ `Acquire (lease) a free worker from the '${POOL_SERVICE}' pool. Returns {peer_id, tool, lease_id, token?}: ` +
+ "call the tool via call_remote_tool — forward token in the tool arguments when present (the pool may require it) — then release_worker with the same peer_id and lease_id. " +
"Blocks up to timeout_secs if all workers are busy; returns {available:false} if none free by then.",
inputSchema: { timeout_secs: z.number().optional().describe("Max seconds to wait for a free worker (default 10).") },
},
diff --git a/development/examples/warm-pool/README.md b/development/examples/warm-pool/README.md
index 5de2f3d1..6f9b952f 100644
--- a/development/examples/warm-pool/README.md
+++ b/development/examples/warm-pool/README.md
@@ -136,4 +136,4 @@ By default any peer can call a worker's `review_code` directly. Set the same
`SAM_POOL_SECRET` on the manager and every reviewer to require a lease: the
manager signs a token on `acquire_worker`, the reviewer verifies it offline and
returns `NO_LEASE` for any call without a valid, unexpired one. Unset = open, as
-before.
+before. A secret set on only one side (or a mismatch between them) fails closed: every `review_code` call returns `NO_LEASE`.