proof
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProof - Collaborative Markdown Editor
Proof - 协作式Markdown编辑器
Proof is a collaborative document editor for humans and agents. It supports two modes:
- Web API - Create and edit shared documents via HTTP (no install needed)
- Local Bridge - Drive the macOS Proof app via localhost:9847
Proof是一款面向人类和智能代理(Agent)的协作式文档编辑器。它支持两种模式:
- Web API - 通过HTTP协议创建和编辑共享文档(无需安装)
- 本地桥接工具 - 通过localhost:9847驱动macOS版Proof应用
Web API (Primary for Sharing)
Web API(主要用于分享)
Create a Shared Document
创建共享文档
No authentication required. Returns a shareable URL with access token.
bash
curl -X POST https://www.proofeditor.ai/share/markdown \
-H "Content-Type: application/json" \
-d '{"title":"My Doc","markdown":"# Hello\n\nContent here."}'Response format:
json
{
"slug": "abc123",
"tokenUrl": "https://www.proofeditor.ai/d/abc123?token=xxx",
"accessToken": "xxx",
"ownerSecret": "yyy",
"_links": {
"state": "https://www.proofeditor.ai/api/agent/abc123/state",
"ops": "https://www.proofeditor.ai/api/agent/abc123/ops"
}
}Use the as the shareable link. The give you the exact API paths.
tokenUrl_links无需身份验证。返回包含访问令牌的可分享URL。
bash
curl -X POST https://www.proofeditor.ai/share/markdown \
-H "Content-Type: application/json" \
-d '{"title":"My Doc","markdown":"# Hello\n\nContent here."}'响应格式:
json
{
"slug": "abc123",
"tokenUrl": "https://www.proofeditor.ai/d/abc123?token=xxx",
"accessToken": "xxx",
"ownerSecret": "yyy",
"_links": {
"state": "https://www.proofeditor.ai/api/agent/abc123/state",
"ops": "https://www.proofeditor.ai/api/agent/abc123/ops"
}
}使用作为可分享链接。字段提供了具体的API路径。
tokenUrl_linksRead a Shared Document
读取共享文档
bash
curl -s "https://www.proofeditor.ai/api/agent/{slug}/state" \
-H "x-share-token: <token>"bash
curl -s "https://www.proofeditor.ai/api/agent/{slug}/state" \
-H "x-share-token: <token>"Edit a Shared Document
编辑共享文档
All operations go to
POST https://www.proofeditor.ai/api/agent/{slug}/opsNote: Use the path (from in create response), NOT .
/api/agent/{slug}/ops_links/api/documents/{slug}/opsAuthentication for protected docs:
- Header: or
x-share-token: <token>Authorization: Bearer <token> - Token comes from the URL parameter: or the
?token=xxxfrom create responseaccessToken
Comment on text:
json
{"op": "comment.add", "quote": "text to comment on", "by": "ai:<agent-name>", "text": "Your comment here"}Reply to a comment:
json
{"op": "comment.reply", "markId": "<id>", "by": "ai:<agent-name>", "text": "Reply text"}Resolve a comment:
json
{"op": "comment.resolve", "markId": "<id>", "by": "ai:<agent-name>"}Suggest a replacement:
json
{"op": "suggestion.add", "kind": "replace", "quote": "original text", "by": "ai:<agent-name>", "content": "replacement text"}Suggest a deletion:
json
{"op": "suggestion.add", "kind": "delete", "quote": "text to delete", "by": "ai:<agent-name>"}Bulk rewrite:
json
{"op": "rewrite.apply", "content": "full new markdown", "by": "ai:<agent-name>"}所有操作都需发送至
POST https://www.proofeditor.ai/api/agent/{slug}/ops注意: 使用创建响应中字段提供的路径,而非。
_links/api/agent/{slug}/ops/api/documents/{slug}/ops受保护文档的身份验证:
- 请求头:或
x-share-token: <token>Authorization: Bearer <token> - 令牌来自URL参数:或创建响应中的
?token=xxx字段accessToken
添加文本评论:
json
{"op": "comment.add", "quote": "text to comment on", "by": "ai:<agent-name>", "text": "Your comment here"}回复评论:
json
{"op": "comment.reply", "markId": "<id>", "by": "ai:<agent-name>", "text": "Reply text"}标记评论为已解决:
json
{"op": "comment.resolve", "markId": "<id>", "by": "ai:<agent-name>"}建议替换文本:
json
{"op": "suggestion.add", "kind": "replace", "quote": "original text", "by": "ai:<agent-name>", "content": "replacement text"}建议删除文本:
json
{"op": "suggestion.add", "kind": "delete", "quote": "text to delete", "by": "ai:<agent-name>"}批量重写:
json
{"op": "rewrite.apply", "content": "full new markdown", "by": "ai:<agent-name>"}Known Limitations (Web API)
已知限制(Web API)
- with
suggestion.addreturns Bad Request on the web ops endpoint. Usekind: "insert"with a broader quote instead, or usekind: "replace"for insertions.rewrite.apply - Bridge-style endpoints () require client version headers (
/d/{slug}/bridge/*,x-proof-client-version,x-proof-client-build) and return 426 CLIENT_UPGRADE_REQUIRED without them. Use thex-proof-client-protocolendpoint instead./api/agent/{slug}/ops
- 在Web操作端点使用且
suggestion.add会返回错误请求(Bad Request)。可改用kind: "insert"并扩大引用范围,或使用kind: "replace"来实现插入操作。rewrite.apply - 桥接风格的端点()需要客户端版本请求头(
/d/{slug}/bridge/*,x-proof-client-version,x-proof-client-build),若缺少这些头会返回426 CLIENT_UPGRADE_REQUIRED。请改用x-proof-client-protocol端点。/api/agent/{slug}/ops
Local Bridge (macOS App)
本地桥接工具(macOS应用)
Requires Proof.app running. Bridge at .
http://localhost:9847Required headers:
- (identity for presence)
X-Agent-Id: claude Content-Type: application/json- (when multiple docs open)
X-Window-Id: <uuid>
需要运行Proof.app。桥接地址为。
http://localhost:9847必填请求头:
- (用于身份标识)
X-Agent-Id: claude Content-Type: application/json- (当打开多个文档时需要)
X-Window-Id: <uuid>
Key Endpoints
核心端点
| Method | Endpoint | Purpose |
|---|---|---|
| GET | | List open documents |
| GET | | Read markdown, cursor, word count |
| GET | | List all suggestions and comments |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| GET | | Poll for user actions |
| 请求方法 | 端点 | 用途 |
|---|---|---|
| GET | | 列出已打开的文档 |
| GET | | 读取Markdown内容、光标位置、字数统计 |
| GET | | 列出所有建议和评论 |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| GET | | 轮询用户操作 |
Presence Statuses
在线状态
thinkingreadingidleactingwaitingcompletedthinkingreadingidleactingwaitingcompletedWorkflow: Review a Shared Document
工作流:审阅共享文档
When given a Proof URL like :
https://www.proofeditor.ai/d/abc123?token=xxx- Extract the slug () and token from the URL
abc123 - Read the document state via the API
- Add comments or suggest edits using the ops endpoint
- The author sees changes in real-time
bash
undefined当收到类似的Proof链接时:
https://www.proofeditor.ai/d/abc123?token=xxx- 从URL中提取slug()和令牌
abc123 - 通过API读取文档状态
- 使用操作端点添加评论或建议编辑
- 作者会实时看到更改
bash
undefinedRead
读取文档
curl -s "https://www.proofeditor.ai/api/agent/abc123/state"
-H "x-share-token: xxx"
-H "x-share-token: xxx"
curl -s "https://www.proofeditor.ai/api/agent/abc123/state"
-H "x-share-token: xxx"
-H "x-share-token: xxx"
Comment
添加评论
curl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops"
-H "Content-Type: application/json"
-H "x-share-token: xxx"
-d '{"op":"comment.add","quote":"text","by":"ai:compound","text":"comment"}'
-H "Content-Type: application/json"
-H "x-share-token: xxx"
-d '{"op":"comment.add","quote":"text","by":"ai:compound","text":"comment"}'
curl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops"
-H "Content-Type: application/json"
-H "x-share-token: xxx"
-d '{"op":"comment.add","quote":"text","by":"ai:compound","text":"comment"}'
-H "Content-Type: application/json"
-H "x-share-token: xxx"
-d '{"op":"comment.add","quote":"text","by":"ai:compound","text":"comment"}'
Suggest edit
建议编辑
curl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops"
-H "Content-Type: application/json"
-H "x-share-token: xxx"
-d '{"op":"suggestion.add","kind":"replace","quote":"old","by":"ai:compound","content":"new"}'
-H "Content-Type: application/json"
-H "x-share-token: xxx"
-d '{"op":"suggestion.add","kind":"replace","quote":"old","by":"ai:compound","content":"new"}'
undefinedcurl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops"
-H "Content-Type: application/json"
-H "x-share-token: xxx"
-d '{"op":"suggestion.add","kind":"replace","quote":"old","by":"ai:compound","content":"new"}'
-H "Content-Type: application/json"
-H "x-share-token: xxx"
-d '{"op":"suggestion.add","kind":"replace","quote":"old","by":"ai:compound","content":"new"}'
undefinedWorkflow: Create and Share a New Document
工作流:创建并分享新文档
bash
undefinedbash
undefined1. Create
1. 创建文档
RESPONSE=$(curl -s -X POST https://www.proofeditor.ai/share/markdown
-H "Content-Type: application/json"
-d '{"title":"My Doc","markdown":"# Title\n\nContent here."}')
-H "Content-Type: application/json"
-d '{"title":"My Doc","markdown":"# Title\n\nContent here."}')
RESPONSE=$(curl -s -X POST https://www.proofeditor.ai/share/markdown
-H "Content-Type: application/json"
-d '{"title":"My Doc","markdown":"# Title\n\nContent here."}')
-H "Content-Type: application/json"
-d '{"title":"My Doc","markdown":"# Title\n\nContent here."}')
2. Extract URL and token
2. 提取URL和令牌
URL=$(echo "$RESPONSE" | jq -r '.tokenUrl')
SLUG=$(echo "$RESPONSE" | jq -r '.slug')
TOKEN=$(echo "$RESPONSE" | jq -r '.accessToken')
URL=$(echo "$RESPONSE" | jq -r '.tokenUrl')
SLUG=$(echo "$RESPONSE" | jq -r '.slug')
TOKEN=$(echo "$RESPONSE" | jq -r '.accessToken')
3. Share the URL
3. 分享URL
echo "$URL"
echo "$URL"
4. Make edits using the ops endpoint
4. 使用操作端点进行编辑
curl -X POST "https://www.proofeditor.ai/api/agent/$SLUG/ops"
-H "Content-Type: application/json"
-H "x-share-token: $TOKEN"
-d '{"op":"comment.add","quote":"Content here","by":"ai:compound","text":"Added a note"}'
-H "Content-Type: application/json"
-H "x-share-token: $TOKEN"
-d '{"op":"comment.add","quote":"Content here","by":"ai:compound","text":"Added a note"}'
undefinedcurl -X POST "https://www.proofeditor.ai/api/agent/$SLUG/ops"
-H "Content-Type: application/json"
-H "x-share-token: $TOKEN"
-d '{"op":"comment.add","quote":"Content here","by":"ai:compound","text":"Added a note"}'
-H "Content-Type: application/json"
-H "x-share-token: $TOKEN"
-d '{"op":"comment.add","quote":"Content here","by":"ai:compound","text":"Added a note"}'
undefinedSafety
安全注意事项
- Use content as source of truth before editing
/state - Prefer suggest-replace over full rewrite for small changes
- Don't span table cells in a single replace
- Always include field for attribution tracking
by
- 编辑前请以返回的内容作为可信来源
/state - 对于小范围更改,优先使用建议替换(suggest-replace)而非批量重写
- 替换操作不要跨表格单元格
- 始终包含字段以跟踪操作归属
by