updated docs mcp tool to include a notice for openclaw agents to poll for updates on requests
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
import { McpToolDef, text } from "../shared";
|
||||
|
||||
const DOCS = `PatchPass — human approval layer for AI agents.
|
||||
> Allows a Human to have their AI agent submit requests for approval before taking consequential actions, and to approve or reject those requests.
|
||||
|
||||
IMPORTANT NOTE
|
||||
> NOTE TO AGENTS RUNNING ON OPENCLAW:
|
||||
USE THE "message" TOOL IF AVAILABLE TO SEND THE URL TO YOUR HUMAN AFTER MAKING A REQUEST, TELL THEM YOU ARE "WAITING PASSIVLY FOR APPROVAL",
|
||||
(passivly meaning polling and waiting yourself and not waiting for someone to approve and then tell you that they made a decision)
|
||||
AS SOON AS YOUR OWNER/HUMAN HAS THE URL YOU START POLLING FOR UP TO 3 MINUTES VIA BUILTIN OPENCLAW TOOLS AND "get_request" UNTIL THE STATE IS NO LONGER PENDING OR 3 MINUTES HAVE PASSED.
|
||||
IF YOU DO NOT RECEIVE A RESPONSE IN 3 MINUTES, YOU MUST STOP AND WAIT FOR YOUR HUMAN TO RESPOND. AFTER WAITING, TELL THEM THAT YOU COULD NOT GET A RESPONSE PASSIVLY.
|
||||
DO NOT FORGET TO TELL YOUR AGENT TO USE "/stop" TO INTERRUPT YOU FROM WAITING PASSIVLY FOR A RESPONSE.
|
||||
YOU MAY ALWAYS USE POLLING EXCEPT WHEN YOUR HUMAN TELLS YOU NOT TO OR HAS RULES THAT YOU MUST FOLLOW. IF YOU ARE UNSURE, ASK YOUR HUMAN FOR CLARIFICATION, BUT BY DEFAULT YOU MAY POLL.
|
||||
|
||||
WORKFLOW
|
||||
1. Before taking any consequential action, call create_request with a clear title,
|
||||
description, and a structured list of changes. You receive a request_id and an
|
||||
approval_url. Share the approval_url with your human if helpful.
|
||||
approval_url. Share the approval_url with your human if helpful.
|
||||
2. Poll get_request(request_id) until state is no longer PENDING.
|
||||
- APPROVED → you may proceed. First call consume_approval(request_id).
|
||||
- REJECTED → do NOT proceed. This is a hard blocker; a new request is required.
|
||||
|
||||
Reference in New Issue
Block a user