@reworkdigital.io/rework-proof-mcp 1.2.1 → 1.3.2
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/README.md +40 -0
- package/package.json +1 -1
- package/src/ai-trailers.json +197 -2
- package/src/index.js +215 -104
- package/src/mcp-spec.json +323 -0
package/README.md
CHANGED
|
@@ -22,6 +22,46 @@ does **not** claim.
|
|
|
22
22
|
|
|
23
23
|
No API key. No account. Every tool here reads public endpoints.
|
|
24
24
|
|
|
25
|
+
### Or use the hosted server
|
|
26
|
+
|
|
27
|
+
The same four tools are served at a URL, for clients that take a remote
|
|
28
|
+
server (Claude's connectors, for one) and for anyone who would rather not
|
|
29
|
+
install anything:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
https://api.reworkdigital.io/mcp
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
It speaks MCP's Streamable HTTP transport: POST one JSON-RPC message, get one
|
|
36
|
+
JSON response. No login, no session, no cookies. To see the tools it offers:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
curl -s https://api.reworkdigital.io/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Both servers read their tools from the same file,
|
|
43
|
+
[`src/mcp-spec.json`](src/mcp-spec.json), so a tool is described the same way
|
|
44
|
+
whichever one you use. One difference is worth knowing. With this package,
|
|
45
|
+
`lookup_rework_attestation` hashes the credential on your machine and sends
|
|
46
|
+
only the digest. With the hosted server the credential travels to REWORK,
|
|
47
|
+
which hashes it there and stores nothing; pass `digest` yourself if you would
|
|
48
|
+
rather it never left.
|
|
49
|
+
|
|
50
|
+
A certificate credential (the file a certificate's share page downloads) is
|
|
51
|
+
signed afresh each time, so no two copies share a digest and REWORK keeps no
|
|
52
|
+
issuance record for it. Handed one, the lookup says so instead of "not
|
|
53
|
+
issued", and looks up the certificate it names: only that certificate's id is
|
|
54
|
+
sent, and the id is already public on the certificate's own page.
|
|
55
|
+
|
|
56
|
+
The lookup reads every record REWORK keeps by digest: workflow attestations,
|
|
57
|
+
Hugging Face joins, and Hugging Face repository-control challenges. REWORK
|
|
58
|
+
keeps only the newest challenge for each person and repository, so an older
|
|
59
|
+
one is answered as "no record kept" rather than "not issued". A challenge that
|
|
60
|
+
is found says what its claim's state is now; only `verified` shows control.
|
|
61
|
+
|
|
62
|
+
Every tool only reads, and each one says so (`readOnlyHint`), so a client can
|
|
63
|
+
run them without asking each time.
|
|
64
|
+
|
|
25
65
|
## Tools
|
|
26
66
|
|
|
27
67
|
| Tool | What it does |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reworkdigital.io/rework-proof-mcp",
|
|
3
|
-
"version": "1.2
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"mcpName": "io.github.reworkio/rework-proof",
|
|
5
5
|
"description": "MCP server for verifying REWORK credentials — check whether delivered work is genuinely the author's.",
|
|
6
6
|
"license": "MIT",
|
package/src/ai-trailers.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "The one definition of what counts as a DECLARED AI assistant in a commit message. Every runtime that reads commit messages for REWORK Proof loads this file and nothing else, so a commit reads the same from the Action, the App and the MCP server. Each `tools[].pattern` is a regular expression fragment written in the subset that JavaScript and Python evaluate identically: no lookbehind, no named groups, no flags inline. Matching is always case-insensitive. `patterns` are tried in order and the first hit is the verdict; `{{tools}}` expands to the alternation of every tool pattern. A match means the author DECLARED the tool in the message. No match means nothing was declared; it never means nothing was used.",
|
|
3
|
-
"version":
|
|
2
|
+
"$comment": "The one definition of what counts as a DECLARED AI assistant in a commit message. Every runtime that reads commit messages for REWORK Proof loads this file and nothing else, so a commit reads the same from the Action, the App and the MCP server. Each `tools[].pattern` is a regular expression fragment written in the subset that JavaScript and Python evaluate identically: no lookbehind, no named groups, no flags inline. Matching is always case-insensitive. `patterns` are tried in order and the first hit is the verdict; `{{tools}}` expands to the alternation of every tool pattern. A match means the author DECLARED the tool in the message. No match means nothing was declared; it never means nothing was used. Version 2 (2026-11-23) adds more tools and the trailers that projects' own AI policies ask for (`Assisted-by:`, `Generated-by:`, `AI-assisted: true`). Each tool added then carries the `source` its trailer was read from; `observed` means the exact text was read there, `assumed` means it was seen only in passing or is inferred. A tool whose name is an ordinary word or a first name is matched on its address or bot login only, never on the name.",
|
|
3
|
+
"version": 2,
|
|
4
4
|
"tools": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Claude",
|
|
@@ -88,6 +88,171 @@
|
|
|
88
88
|
"pattern": "\\bSWE-agent\\b",
|
|
89
89
|
"example": "Co-authored-by: SWE-agent <swe-agent@example.invalid>",
|
|
90
90
|
"evidence": "assumed"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "OpenHands",
|
|
94
|
+
"pattern": "\\bOpenHands\\b|openhands@all-hands\\.dev",
|
|
95
|
+
"example": "Co-authored-by: openhands <openhands@all-hands.dev>",
|
|
96
|
+
"evidence": "observed",
|
|
97
|
+
"source": "https://github.com/OpenHands/OpenHands/blob/997618d3f26f7234a67fea2494949903dc87f597/src/services/settings.ts"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "opencode",
|
|
101
|
+
"pattern": "noreply@opencode\\.ai|opencode-agent\\[bot\\]",
|
|
102
|
+
"example": "Co-authored-by: opencode <noreply@opencode.ai>",
|
|
103
|
+
"evidence": "observed",
|
|
104
|
+
"source": "https://github.com/numan-cli/numan/commit/bfc9f292767d953f551f43e94d579ee1ee0be6a5",
|
|
105
|
+
"note": "Read in public commits and a contributing guide; the CLI's own source showed no default trailer."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "Crush",
|
|
109
|
+
"pattern": "crush@charm\\.land|\\bCrush:\\S",
|
|
110
|
+
"example": "Co-Authored-By: Crush <crush@charm.land>",
|
|
111
|
+
"evidence": "observed",
|
|
112
|
+
"source": "https://github.com/charmbracelet/crush/blob/main/internal/agent/tools/bash.md.tpl",
|
|
113
|
+
"note": "Crush is an ordinary word, so only its address or the `Crush:<model>` form counts. Its default is `Assisted-by: Crush:<model>` under a `Generated with Crush` line."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "Qwen Code",
|
|
117
|
+
"pattern": "\\bQwen-Coder\\b|qwen-coder@alibabacloud\\.com",
|
|
118
|
+
"example": "Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>",
|
|
119
|
+
"evidence": "observed",
|
|
120
|
+
"source": "https://github.com/QwenLM/qwen-code/blob/56c15cf50286ff55f886d4375a46a362bef806d3/packages/core/src/tools/shell.test.ts"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "Mistral Vibe",
|
|
124
|
+
"pattern": "\\bMistral Vibe\\b|vibe@mistral\\.ai",
|
|
125
|
+
"example": "Co-Authored-By: Mistral Vibe <vibe@mistral.ai>",
|
|
126
|
+
"evidence": "observed",
|
|
127
|
+
"source": "https://github.com/mistralai/mistral-vibe/blob/e76235b203b8965af584e88e69284bc704c31a1f/vibe/core/system_prompt.py"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "Warp",
|
|
131
|
+
"pattern": "agent@warp\\.dev",
|
|
132
|
+
"example": "Co-Authored-By: Warp <agent@warp.dev>",
|
|
133
|
+
"evidence": "observed",
|
|
134
|
+
"source": "https://github.com/warpdotdev/warp/blob/4540015ee515700ddb539d7dc634febaec10b1fc/app/src/ai/agent_sdk/driver/git_credentials.rs",
|
|
135
|
+
"note": "Warp is an ordinary word; only the address counts."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "Factory Droid",
|
|
139
|
+
"pattern": "factory-droid\\[bot\\]",
|
|
140
|
+
"example": "Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>",
|
|
141
|
+
"evidence": "observed",
|
|
142
|
+
"source": "https://github.com/Factory-AI/factory/blob/ddd7d36e2577929ad1a2c1dc5b9ee04580325c3b/docs/guides/droid-exec/github-actions.mdx"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "JetBrains Junie",
|
|
146
|
+
"pattern": "junie@jetbrains\\.com",
|
|
147
|
+
"example": "Co-authored-by: Junie <junie@jetbrains.com>",
|
|
148
|
+
"evidence": "observed",
|
|
149
|
+
"source": "https://github.com/JetBrains/MPS/blob/28d48a47f09e1d13265227389862ed541a21ae1d/.agents/git.md",
|
|
150
|
+
"note": "Junie is also a first name; only the address counts."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "Replit Agent",
|
|
154
|
+
"pattern": "\\bReplit Agent\\b|agent@replit\\.com",
|
|
155
|
+
"example": "Co-authored-by: Replit Agent <agent@replit.com>",
|
|
156
|
+
"evidence": "observed",
|
|
157
|
+
"source": "https://github.com/founder24/-kalukaliya/commit/b030f37a539e8b7a1fef66b0c4e1658bd7a87e61"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "Lovable",
|
|
161
|
+
"pattern": "lovable-dev\\[bot\\]|gpt-engineer-app\\[bot\\]",
|
|
162
|
+
"example": "Co-authored-by: lovable-dev[bot]",
|
|
163
|
+
"evidence": "assumed",
|
|
164
|
+
"source": "https://docs.lovable.dev",
|
|
165
|
+
"note": "Lovable's documentation (its GitHub page) names these bot logins as the commit AUTHOR; a co-author line carrying one is assumed, not observed."
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "v0",
|
|
169
|
+
"pattern": "it\\+v0agent@vercel\\.com",
|
|
170
|
+
"example": "Co-authored-by: v0 <it+v0agent@vercel.com>",
|
|
171
|
+
"evidence": "observed",
|
|
172
|
+
"source": "https://github.com/vercel-labs/vgpu/commit/c290dd32453642eee629db74665d9705bd9664c2",
|
|
173
|
+
"note": "`v0` reads as a version number; only the address counts."
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "Amazon Q Developer",
|
|
177
|
+
"pattern": "amazon-q-developer\\[bot\\]",
|
|
178
|
+
"example": "Co-authored-by: amazon-q-developer[bot] <208079219+amazon-q-developer[bot]@users.noreply.github.com>",
|
|
179
|
+
"evidence": "observed",
|
|
180
|
+
"source": "https://github.com/CyanAutomation/motioninocean/commit/785ab4d34b62a2c589e1280c4a5f66f4f7457325"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "Kilo Code",
|
|
184
|
+
"pattern": "\\bKilo Code\\b|kilo-code-bot\\[bot\\]|kilo-code@users\\.noreply\\.github\\.com",
|
|
185
|
+
"example": "Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>",
|
|
186
|
+
"evidence": "observed",
|
|
187
|
+
"source": "https://github.com/Jonathan-Harris1975/AIMS/commit/bcd15d51308504721777ad5566d0909560ab77b5"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "Goose",
|
|
191
|
+
"pattern": "\\bGoose\\s*<opensource@block\\.xyz>",
|
|
192
|
+
"example": "Co-authored-by: Goose <opensource@block.xyz>",
|
|
193
|
+
"evidence": "observed",
|
|
194
|
+
"source": "https://github.com/block/ghost/commit/c55888ea181aeef7b4f5bd2af85129239986702f",
|
|
195
|
+
"note": "Goose is an ordinary word and the address is Block's general open-source one, so the two have to appear together."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "Trae",
|
|
199
|
+
"pattern": "\\bTRAE CLI\\b|traecli@bytedance\\.com",
|
|
200
|
+
"example": "Co-authored-by: TRAE CLI <traecli@bytedance.com>",
|
|
201
|
+
"evidence": "observed",
|
|
202
|
+
"source": "https://github.com/volcengine/OpenViking/commit/55c531e2e84ff681095fb69cdbb76fb6ce613c62"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "Rovo Dev",
|
|
206
|
+
"pattern": "\\bRovo Dev\\b|rovo-dev@atlassian\\.com",
|
|
207
|
+
"example": "Co-authored-by: Rovo Dev <rovo-dev@atlassian.com>",
|
|
208
|
+
"evidence": "observed",
|
|
209
|
+
"source": "https://github.com/dkds/spring-security-lab/commit/d340fbacffc1351be20f11c80e9de73c0ab018f6"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "Codegen",
|
|
213
|
+
"pattern": "codegen-sh\\[bot\\]",
|
|
214
|
+
"example": "Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>",
|
|
215
|
+
"evidence": "observed",
|
|
216
|
+
"source": "https://github.com/evgenygurin/codegen-bridge/commit/c94a55a728307c9f29adce84f2159bfdeb9caced"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "Sweep AI",
|
|
220
|
+
"pattern": "sweep-ai\\[bot\\]",
|
|
221
|
+
"example": "Co-authored-by: sweep-ai[bot] <128439645+sweep-ai[bot]@users.noreply.github.com>",
|
|
222
|
+
"evidence": "observed",
|
|
223
|
+
"source": "https://github.com/Aaqibhafeezkhan/polyglot-utilities-toolkit/commit/ee49f14a70d2cceda4a53bd8b721f277e4dbef62",
|
|
224
|
+
"note": "An unrelated `Sweep Bot` account exists; only the `sweep-ai[bot]` login counts."
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "Tembo",
|
|
228
|
+
"pattern": "tembo(?:-io)?\\[bot\\]",
|
|
229
|
+
"example": "Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>",
|
|
230
|
+
"evidence": "observed",
|
|
231
|
+
"source": "https://github.com/solidjs/solid/commit/88581892b67aa2cadd0d116f17677601d4ff5009"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "Kimi",
|
|
235
|
+
"pattern": "noreply@moonshot\\.cn",
|
|
236
|
+
"example": "Co-Authored-By: Kimi <noreply@moonshot.cn>",
|
|
237
|
+
"evidence": "assumed",
|
|
238
|
+
"source": "https://github.com/ShaulLavo/bun-wasm/commit/3c8080b84a04222c9bec0afcee0ba57ae1a1588f",
|
|
239
|
+
"note": "Seen in commit search results, not confirmed as the tool's default. Kimi is also a first name; only the address counts."
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "Grok",
|
|
243
|
+
"pattern": "noreply@x\\.ai",
|
|
244
|
+
"example": "Co-Authored-By: Grok 4.7 <noreply@x.ai>",
|
|
245
|
+
"evidence": "assumed",
|
|
246
|
+
"source": "https://github.com/OpenSesame-Labs/OpenSesame/commit/133eb7f76e7000eb0d60f3b5afe1d6c9234ea7b7",
|
|
247
|
+
"note": "Seen in commit search results, not confirmed as the tool's default; only the address counts."
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "Antigravity",
|
|
251
|
+
"pattern": "antigravity@google\\.com",
|
|
252
|
+
"example": "Co-authored-by: Antigravity <antigravity@google.com>",
|
|
253
|
+
"evidence": "assumed",
|
|
254
|
+
"source": "https://github.com/vorlie/kioku/commit/ba1b2dfeece54f415fe3e8cdb3407741af688698",
|
|
255
|
+
"note": "Read in one public commit, which may have been written by hand."
|
|
91
256
|
}
|
|
92
257
|
],
|
|
93
258
|
"patterns": [
|
|
@@ -115,6 +280,36 @@
|
|
|
115
280
|
"id": "robot-generated",
|
|
116
281
|
"what": "The robot-emoji form, `🤖 Generated ...`, which some tools write without naming themselves on the same line.",
|
|
117
282
|
"regex": "🤖\\s*Generated"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"id": "assisted-by",
|
|
286
|
+
"what": "An `Assisted-by:` trailer naming one of the tools above. The trailer several projects' AI policies ask for (LLVM, OpenStack, OpenInfra, OpenSSL).",
|
|
287
|
+
"regex": "(?:^|\\n)[ \\t]*Assisted-by:[^\\n]*?(?:{{tools}})"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"id": "assisted-by-agent-model",
|
|
291
|
+
"what": "An `Assisted-by:` trailer in the `AGENT:MODEL` form (`Assisted-by: my-agent:my-model-v1`), whatever the agent is called. That form is what the Linux kernel's 7.0 and 7.1 documentation and OpenSSL's policy specify, and a person's name is not written that way. A link (`https://...`) is not an agent.",
|
|
292
|
+
"regex": "(?:^|\\n)[ \\t]*Assisted-by:[ \\t]*[^\\s:<]+:(?!//)[^\\s<]+"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"id": "generated-by",
|
|
296
|
+
"what": "A `Generated-by:` trailer naming one of the tools above (the Apache Software Foundation's and OpenStack's form).",
|
|
297
|
+
"regex": "(?:^|\\n)[ \\t]*Generated-by:[^\\n]*?(?:{{tools}})"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"id": "ai-assisted-true",
|
|
301
|
+
"what": "The line `AI-assisted: true` (or `yes`), which some projects write beside a co-author line. `AI-Assisted: none` is the opposite statement and never matches.",
|
|
302
|
+
"regex": "(?:^|\\n)[ \\t]*AI-assisted:[ \\t]*(?:true|yes)\\b"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"id": "replit-commit-author",
|
|
306
|
+
"what": "The `Replit-Commit-Author: Agent` trailer Replit writes on commits its agent makes.",
|
|
307
|
+
"regex": "(?:^|\\n)[ \\t]*Replit-Commit-Author:[ \\t]*Agent\\b"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"id": "crush-generated",
|
|
311
|
+
"what": "The `Generated with Crush` line Crush writes above its `Assisted-by:` trailer.",
|
|
312
|
+
"regex": "💘\\s*Generated\\s+with\\s+Crush\\b"
|
|
118
313
|
}
|
|
119
314
|
]
|
|
120
315
|
}
|
package/src/index.js
CHANGED
|
@@ -33,10 +33,8 @@ const readJson = (name) => JSON.parse(fs.readFileSync(path.join(__dirname, name)
|
|
|
33
33
|
// this now. package.json sits one level up from src/, inside the tarball.
|
|
34
34
|
const SERVER_VERSION = readJson('../package.json').version;
|
|
35
35
|
|
|
36
|
-
// Protocol revisions this server understands
|
|
37
|
-
//
|
|
38
|
-
// client decides whether it can proceed.
|
|
39
|
-
const SUPPORTED_PROTOCOLS = ['2025-06-18', '2025-03-26', '2024-11-05'];
|
|
36
|
+
// Protocol revisions this server understands, newest first, read further
|
|
37
|
+
// down from mcp-spec.json (SUPPORTED_PROTOCOLS and STATELESS_PROTOCOLS).
|
|
40
38
|
const HTTP_TIMEOUT_MS = 15000;
|
|
41
39
|
|
|
42
40
|
const log = (...a) => process.stderr.write(a.join(' ') + '\n');
|
|
@@ -51,6 +49,24 @@ const log = (...a) => process.stderr.write(a.join(' ') + '\n');
|
|
|
51
49
|
* ceiling.
|
|
52
50
|
*/
|
|
53
51
|
const ASSURANCE_SPEC = readJson('assurance.json');
|
|
52
|
+
// The tools and the fixed sentences this server returns (see TOOLS below).
|
|
53
|
+
const SPEC = readJson('mcp-spec.json');
|
|
54
|
+
|
|
55
|
+
// Two eras of the protocol, both spoken here:
|
|
56
|
+
// handshake the client sends `initialize` first; its revision is echoed
|
|
57
|
+
// when it is known, otherwise the newest is offered.
|
|
58
|
+
// stateless (2026-07-28) no handshake. Every request names its revision
|
|
59
|
+
// and the client's capabilities in `params._meta`, every result
|
|
60
|
+
// says `resultType`, and `server/discover` answers what the
|
|
61
|
+
// handshake used to.
|
|
62
|
+
// A request carrying the stateless `_meta` is served that way; anything else
|
|
63
|
+
// is served as before.
|
|
64
|
+
const SUPPORTED_PROTOCOLS = SPEC.protocols.handshake;
|
|
65
|
+
const STATELESS_PROTOCOLS = SPEC.protocols.stateless;
|
|
66
|
+
const META_VERSION = 'io.modelcontextprotocol/protocolVersion';
|
|
67
|
+
const META_CLIENT_CAPABILITIES = 'io.modelcontextprotocol/clientCapabilities';
|
|
68
|
+
const META_SERVER_INFO = 'io.modelcontextprotocol/serverInfo';
|
|
69
|
+
const LIST_TTL_MS = 3600000;
|
|
54
70
|
const ASSURANCE = ASSURANCE_SPEC.levels;
|
|
55
71
|
|
|
56
72
|
/**
|
|
@@ -62,94 +78,27 @@ const ASSURANCE = ASSURANCE_SPEC.levels;
|
|
|
62
78
|
*/
|
|
63
79
|
const AI_TRAILERS = readJson('ai-trailers.json');
|
|
64
80
|
const AI_DECLARATION = {
|
|
65
|
-
reads:
|
|
66
|
-
+ 'Claude-Session or Amp-Thread-ID trailer, or a "Generated with" line.',
|
|
81
|
+
reads: SPEC.ai_declaration.reads,
|
|
67
82
|
tools: AI_TRAILERS.tools.map((t) => t.name),
|
|
68
|
-
zero_means:
|
|
69
|
-
|
|
70
|
-
declared_means: 'The author chose to say so. It is reported as a fact and never lowers a result.',
|
|
83
|
+
zero_means: SPEC.ai_declaration.zero_means,
|
|
84
|
+
declared_means: SPEC.ai_declaration.declared_means,
|
|
71
85
|
};
|
|
72
86
|
|
|
73
|
-
const CREDENTIAL_TYPES =
|
|
74
|
-
REWORKWorkflowAttestation: 'A CI run whose repository identity GitHub attested via OIDC.',
|
|
75
|
-
REWORKHfJoinedPublication: 'A Hugging Face publication joined to the CI run that preceded it, confirmed by REWORK\'s own read of the Hub.',
|
|
76
|
-
REWORKProofOfWorkCredential: 'A submitted piece of work that passed REWORK verification.',
|
|
77
|
-
REWORKVideoProvenanceReceipt: 'A reviewed demonstration video, fingerprinted against reuse.',
|
|
78
|
-
REWORKReputationPassport: "A holder's full verified history in one signed credential.",
|
|
79
|
-
REWORKReputationSummary: 'A summary of already-public verified facts about a holder.',
|
|
80
|
-
};
|
|
87
|
+
const CREDENTIAL_TYPES = SPEC.credential_types;
|
|
81
88
|
|
|
82
89
|
// ── tools ──────────────────────────────────────────────────────────────────
|
|
83
90
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
credential: {
|
|
96
|
-
type: 'string',
|
|
97
|
-
description: 'The compact VC-JWT, three base64url segments separated by dots.',
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
required: ['credential'],
|
|
101
|
-
additionalProperties: false,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: 'get_rework_issuer_keys',
|
|
106
|
-
description:
|
|
107
|
-
"Fetch REWORK's public signing keys (JWKS). Use this to verify a credential "
|
|
108
|
-
+ 'offline yourself instead of trusting this server, or to confirm the issuer '
|
|
109
|
-
+ 'key a credential names actually belongs to REWORK.',
|
|
110
|
-
inputSchema: { type: 'object', properties: {}, additionalProperties: false },
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'explain_rework_assurance',
|
|
114
|
-
description:
|
|
115
|
-
'Explain what a REWORK assurance level or credential type proves, and what it '
|
|
116
|
-
+ 'explicitly does not prove. Use this before relying on a credential, so a '
|
|
117
|
-
+ 'weak claim is not read as a strong one.',
|
|
118
|
-
inputSchema: {
|
|
119
|
-
type: 'object',
|
|
120
|
-
properties: {
|
|
121
|
-
assurance: {
|
|
122
|
-
type: 'string',
|
|
123
|
-
description: 'Assurance level, e.g. "workflow-identity". Omit to list all.',
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
additionalProperties: false,
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
name: 'lookup_rework_attestation',
|
|
131
|
-
description:
|
|
132
|
-
'Check whether REWORK actually ISSUED a credential - not just whether its '
|
|
133
|
-
+ 'signature verifies. A forged-but-well-formed token fails this; a real one '
|
|
134
|
-
+ 'returns its issuance record and the CURRENT OpenTimestamps receipt, which '
|
|
135
|
-
+ 'may have been upgraded to a Bitcoin confirmation since issue. Pass the '
|
|
136
|
-
+ 'credential (its sha256 is the lookup key) or the digest directly.',
|
|
137
|
-
inputSchema: {
|
|
138
|
-
type: 'object',
|
|
139
|
-
properties: {
|
|
140
|
-
credential: {
|
|
141
|
-
type: 'string',
|
|
142
|
-
description: 'The VC-JWT. Hashed locally; never sent anywhere.',
|
|
143
|
-
},
|
|
144
|
-
digest: {
|
|
145
|
-
type: 'string',
|
|
146
|
-
description: 'sha256 hex of the credential, if you already have it.',
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
additionalProperties: false,
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
];
|
|
91
|
+
/**
|
|
92
|
+
* The tools, from `mcp-spec.json`: one definition for this server and for the
|
|
93
|
+
* hosted one REWORK runs (the Claude directory lists a server by URL, and it
|
|
94
|
+
* requires each tool to carry a title and a read-only or destructive hint).
|
|
95
|
+
* Every tool here only reads, so each carries readOnlyHint.
|
|
96
|
+
*/
|
|
97
|
+
const TOOLS = SPEC.tools.map((t) => JSON.parse(JSON.stringify(t)));
|
|
98
|
+
// Here the lookup hashes the credential in this process, which is a stronger
|
|
99
|
+
// promise than the shared wording makes, so this server says so.
|
|
100
|
+
TOOLS.find((t) => t.name === 'lookup_rework_attestation').inputSchema.properties.credential.description =
|
|
101
|
+
'The VC-JWT. Hashed locally and never sent anywhere. For a certificate credential, the certificate id it names (already public) is looked up as well.';
|
|
153
102
|
|
|
154
103
|
async function http(path, { method = 'GET', body } = {}) {
|
|
155
104
|
const ctl = new AbortController();
|
|
@@ -171,26 +120,95 @@ async function http(path, { method = 'GET', body } = {}) {
|
|
|
171
120
|
}
|
|
172
121
|
}
|
|
173
122
|
|
|
123
|
+
/**
|
|
124
|
+
* What a credential SAYS it is, read without checking its signature: the kind
|
|
125
|
+
* of REWORK credential, and the certificate it names when it is a certificate
|
|
126
|
+
* credential. Never evidence on its own: a forger writes these too.
|
|
127
|
+
*/
|
|
128
|
+
function stated(credential) {
|
|
129
|
+
const out = { type: null, certificate_id: null };
|
|
130
|
+
const parts = typeof credential === 'string' ? credential.trim().split('.') : [];
|
|
131
|
+
if (parts.length !== 3) return out;
|
|
132
|
+
let payload;
|
|
133
|
+
try {
|
|
134
|
+
payload = JSON.parse(Buffer.from(parts[1], 'base64url').toString('utf8'));
|
|
135
|
+
} catch {
|
|
136
|
+
return out;
|
|
137
|
+
}
|
|
138
|
+
const vc = payload && typeof payload === 'object' ? payload.vc : null;
|
|
139
|
+
if (!vc || typeof vc !== 'object' || Array.isArray(vc)) return out;
|
|
140
|
+
for (const kind of Array.isArray(vc.type) ? vc.type : []) {
|
|
141
|
+
if (typeof kind === 'string' && Object.prototype.hasOwnProperty.call(CREDENTIAL_TYPES, kind)) {
|
|
142
|
+
out.type = kind;
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (out.type === SPEC.registry.certificate_type) {
|
|
147
|
+
const subject = vc.credentialSubject;
|
|
148
|
+
const achievement = subject && typeof subject === 'object' ? subject.achievement : null;
|
|
149
|
+
const found = (achievement && typeof achievement === 'object' ? achievement.identifier : null) || payload.jti;
|
|
150
|
+
if (typeof found === 'string' && /^[A-Za-z0-9_-]{1,64}$/.test(found)) out.certificate_id = found;
|
|
151
|
+
}
|
|
152
|
+
return out;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* What REWORK holds for a certificate id. Only the id is sent, and it is
|
|
157
|
+
* already public on the certificate's own page; `found` and `revoked` are null
|
|
158
|
+
* when the API could not be reached, so "could not look" is never reported as
|
|
159
|
+
* "no such certificate".
|
|
160
|
+
*/
|
|
161
|
+
async function certificateRecord(id) {
|
|
162
|
+
const fallback = { id, found: null, revoked: null, verify_url: `${SPEC.site}/verify/${id}` };
|
|
163
|
+
try {
|
|
164
|
+
const res = await http(`/proofs/certificates/${encodeURIComponent(id)}/status`);
|
|
165
|
+
return {
|
|
166
|
+
id,
|
|
167
|
+
found: typeof res.found === 'boolean' ? res.found : null,
|
|
168
|
+
revoked: typeof res.revoked === 'boolean' ? res.revoked : null,
|
|
169
|
+
verify_url: fallback.verify_url,
|
|
170
|
+
};
|
|
171
|
+
} catch (err) {
|
|
172
|
+
log(`certificate ${id} could not be read: ${err.message}`);
|
|
173
|
+
return fallback;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
174
177
|
async function callTool(name, args) {
|
|
175
178
|
if (name === 'verify_rework_credential') {
|
|
176
179
|
const credential = (args && args.credential) || '';
|
|
177
|
-
if (!credential.trim()) throw new Error(
|
|
180
|
+
if (!credential.trim()) throw new Error(SPEC.errors.credential_required);
|
|
178
181
|
const res = await http('/proofs/credentials/verify', {
|
|
179
182
|
method: 'POST',
|
|
180
183
|
body: { credential },
|
|
181
184
|
});
|
|
182
185
|
const subject = res.credential_subject || {};
|
|
183
186
|
const assurance = subject.assurance;
|
|
187
|
+
// The API checks the signature, the expiry, and whether REWORK has since
|
|
188
|
+
// revoked the credential. `revoked` is true, false, or null (nothing to
|
|
189
|
+
// check, or it could not be read); a server that predates the check
|
|
190
|
+
// sends nothing, which is null too.
|
|
191
|
+
const revoked = typeof res.revoked === 'boolean' ? res.revoked : null;
|
|
192
|
+
// The API has checked the signature by here, so what the credential
|
|
193
|
+
// states about its kind is REWORK's word.
|
|
194
|
+
const kind = (res.valid === true || revoked === true) ? stated(credential).type : null;
|
|
195
|
+
let note;
|
|
196
|
+
if (revoked === true) note = SPEC.notes.revoked;
|
|
197
|
+
else if (assurance && ASSURANCE[assurance]) note = ASSURANCE[assurance].does_not_mean;
|
|
198
|
+
// A kind of credential with no assurance level by design (a certificate,
|
|
199
|
+
// a receipt, a passport): say what it is and its ceiling.
|
|
200
|
+
else if ((assurance === undefined || assurance === null) && kind) note = `${CREDENTIAL_TYPES[kind]} ${SPEC.notes.no_assurance_level}`;
|
|
201
|
+
else note = SPEC.notes.unknown_assurance;
|
|
184
202
|
return {
|
|
185
203
|
valid: res.valid === true,
|
|
186
204
|
reason: res.reason || null,
|
|
205
|
+
revoked,
|
|
187
206
|
issuer: res.issuer || null,
|
|
207
|
+
credential_type: kind,
|
|
188
208
|
credential_subject: subject,
|
|
189
209
|
// An agent that only reads `valid` would treat every credential as
|
|
190
210
|
// equally strong. Ship the ceiling alongside the verdict.
|
|
191
|
-
assurance_note:
|
|
192
|
-
? ASSURANCE[assurance].does_not_mean
|
|
193
|
-
: 'Assurance level not recognised — do not assume this proves more than it states.',
|
|
211
|
+
assurance_note: note,
|
|
194
212
|
};
|
|
195
213
|
}
|
|
196
214
|
|
|
@@ -222,28 +240,40 @@ async function callTool(name, args) {
|
|
|
222
240
|
digest = crypto.createHash('sha256').update(args.credential, 'utf8').digest('hex');
|
|
223
241
|
}
|
|
224
242
|
if (!digest || !/^[0-9a-f]{64}$/.test(String(digest).toLowerCase())) {
|
|
225
|
-
throw new Error(
|
|
243
|
+
throw new Error(SPEC.errors.digest_required);
|
|
226
244
|
}
|
|
227
245
|
digest = String(digest).toLowerCase();
|
|
228
246
|
try {
|
|
229
247
|
const record = await http(`/github-app/attestations/${digest}`);
|
|
248
|
+
// A repository-control challenge can be genuine and still prove
|
|
249
|
+
// nothing today: say so unless its claim is verified.
|
|
250
|
+
const claim = record && typeof record.claim === 'object' && record.claim !== null ? record.claim : null;
|
|
251
|
+
const note = claim && claim.status !== 'verified'
|
|
252
|
+
? SPEC.notes.claim_not_current.replace('{status}', String(claim.status || 'unknown'))
|
|
253
|
+
: SPEC.notes.issued;
|
|
230
254
|
return {
|
|
231
255
|
...record,
|
|
232
|
-
assurance_note:
|
|
233
|
-
'Issuance confirms REWORK signed a credential with this digest. It is '
|
|
234
|
-
+ 'still not a review of the code or a claim the work is any good - '
|
|
235
|
-
+ 'and a "submitted" timestamp is a calendar promise, only "confirmed" '
|
|
236
|
-
+ 'means anchored in Bitcoin.',
|
|
256
|
+
assurance_note: note,
|
|
237
257
|
};
|
|
238
258
|
} catch (err) {
|
|
239
259
|
if (String(err.message).includes('REWORK API 404')) {
|
|
260
|
+
const said = args && args.credential ? stated(args.credential) : { type: null, certificate_id: null };
|
|
261
|
+
if (SPEC.registry.newest_only.includes(said.type)) {
|
|
262
|
+
return { issued: null, digest_sha256: digest, credential_type: said.type, assurance_note: SPEC.notes.registry_newest_only };
|
|
263
|
+
}
|
|
264
|
+
if (SPEC.registry.signed_afresh.includes(said.type)) {
|
|
265
|
+
// Signed afresh on every download: no two copies share a digest, so
|
|
266
|
+
// there was never a record to find, and "not issued" would be a
|
|
267
|
+
// false alarm about a genuine credential.
|
|
268
|
+
const answer = { issued: null, digest_sha256: digest, credential_type: said.type };
|
|
269
|
+
if (said.certificate_id) answer.certificate = await certificateRecord(said.certificate_id);
|
|
270
|
+
answer.assurance_note = SPEC.notes.registry_not_kept;
|
|
271
|
+
return answer;
|
|
272
|
+
}
|
|
240
273
|
return {
|
|
241
274
|
issued: false,
|
|
242
275
|
digest_sha256: digest,
|
|
243
|
-
assurance_note:
|
|
244
|
-
'REWORK has no record of issuing a credential with this digest. A '
|
|
245
|
-
+ 'valid signature with no issuance record deserves suspicion: it '
|
|
246
|
-
+ 'could predate the registry, or it could be a key compromise.',
|
|
276
|
+
assurance_note: SPEC.notes.not_issued,
|
|
247
277
|
};
|
|
248
278
|
}
|
|
249
279
|
throw err;
|
|
@@ -260,11 +290,79 @@ function send(msg) {
|
|
|
260
290
|
}
|
|
261
291
|
|
|
262
292
|
function result(id, value) { send({ jsonrpc: '2.0', id, result: value }); }
|
|
263
|
-
function failure(id, code, message
|
|
293
|
+
function failure(id, code, message, data) {
|
|
294
|
+
const error = data === undefined ? { code, message } : { code, message, data };
|
|
295
|
+
send({ jsonrpc: '2.0', id, error });
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const serverInfo = () => ({
|
|
299
|
+
name: SPEC.server.name, title: SPEC.server.title, version: SERVER_VERSION, description: SPEC.server.description,
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
const TOOL_NAMES = new Set(TOOLS.map((t) => t.name));
|
|
303
|
+
|
|
304
|
+
/** A request of the stateless era: answered whole, with no handshake before it. */
|
|
305
|
+
async function handleStateless(msg, meta) {
|
|
306
|
+
const { id, method, params } = msg;
|
|
307
|
+
if (id === undefined || id === null) return undefined;
|
|
308
|
+
const requested = meta[META_VERSION];
|
|
309
|
+
if (!STATELESS_PROTOCOLS.includes(requested)) {
|
|
310
|
+
return failure(id, -32022, 'Unsupported protocol version',
|
|
311
|
+
{ supported: [...STATELESS_PROTOCOLS, ...SUPPORTED_PROTOCOLS], requested });
|
|
312
|
+
}
|
|
313
|
+
const caps = meta[META_CLIENT_CAPABILITIES];
|
|
314
|
+
if (!caps || typeof caps !== 'object' || Array.isArray(caps)) {
|
|
315
|
+
return failure(id, -32602, `Invalid params: params._meta must carry ${META_CLIENT_CAPABILITIES} (an object, which may be empty)`);
|
|
316
|
+
}
|
|
317
|
+
if (method === 'server/discover') {
|
|
318
|
+
return result(id, {
|
|
319
|
+
resultType: 'complete',
|
|
320
|
+
supportedVersions: [...STATELESS_PROTOCOLS, ...SUPPORTED_PROTOCOLS],
|
|
321
|
+
capabilities: { tools: {} },
|
|
322
|
+
instructions: SPEC.server.instructions,
|
|
323
|
+
ttlMs: LIST_TTL_MS,
|
|
324
|
+
cacheScope: 'public',
|
|
325
|
+
_meta: { [META_SERVER_INFO]: serverInfo() },
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
if (method === 'tools/list') {
|
|
329
|
+
return result(id, { resultType: 'complete', tools: TOOLS, ttlMs: LIST_TTL_MS, cacheScope: 'public' });
|
|
330
|
+
}
|
|
331
|
+
if (method === 'tools/call') {
|
|
332
|
+
const name = params && params.name;
|
|
333
|
+
const args = params && params.arguments;
|
|
334
|
+
// No such tool, or arguments that are not an object: the request is
|
|
335
|
+
// malformed, a protocol error. What is wrong inside the arguments is the
|
|
336
|
+
// tool's to report, as a result the model can read.
|
|
337
|
+
if (typeof name !== 'string' || !TOOL_NAMES.has(name)) return failure(id, -32602, `Unknown tool: ${name}`);
|
|
338
|
+
if (args !== undefined && args !== null && (typeof args !== 'object' || Array.isArray(args))) {
|
|
339
|
+
return failure(id, -32602, 'Invalid params: arguments must be an object');
|
|
340
|
+
}
|
|
341
|
+
try {
|
|
342
|
+
const out = await callTool(name, args || {});
|
|
343
|
+
return result(id, {
|
|
344
|
+
resultType: 'complete',
|
|
345
|
+
content: [{ type: 'text', text: JSON.stringify(out, null, 2) }],
|
|
346
|
+
structuredContent: out,
|
|
347
|
+
isError: false,
|
|
348
|
+
});
|
|
349
|
+
} catch (err) {
|
|
350
|
+
return result(id, {
|
|
351
|
+
resultType: 'complete',
|
|
352
|
+
content: [{ type: 'text', text: `Tool ${name} failed: ${err.message}` }],
|
|
353
|
+
isError: true,
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return failure(id, -32601, `Method not found: ${method}`);
|
|
358
|
+
}
|
|
264
359
|
|
|
265
360
|
async function handle(msg) {
|
|
266
361
|
const { id, method, params } = msg;
|
|
267
362
|
|
|
363
|
+
const meta = params && params._meta && typeof params._meta === 'object' ? params._meta : null;
|
|
364
|
+
if (meta && META_VERSION in meta) return handleStateless(msg, meta);
|
|
365
|
+
|
|
268
366
|
// A notification has no id and must never be answered - replying to one is
|
|
269
367
|
// a protocol violation the client reports as an unsolicited response.
|
|
270
368
|
const isNotification = id === undefined || id === null;
|
|
@@ -274,7 +372,8 @@ async function handle(msg) {
|
|
|
274
372
|
return result(id, {
|
|
275
373
|
protocolVersion: SUPPORTED_PROTOCOLS.includes(asked) ? asked : SUPPORTED_PROTOCOLS[0],
|
|
276
374
|
capabilities: { tools: { listChanged: false } },
|
|
277
|
-
serverInfo:
|
|
375
|
+
serverInfo: serverInfo(),
|
|
376
|
+
instructions: SPEC.server.instructions,
|
|
278
377
|
});
|
|
279
378
|
}
|
|
280
379
|
|
|
@@ -289,8 +388,12 @@ async function handle(msg) {
|
|
|
289
388
|
const name = params && params.name;
|
|
290
389
|
try {
|
|
291
390
|
const out = await callTool(name, (params && params.arguments) || {});
|
|
391
|
+
// The same answer twice: as data a client can read field by field
|
|
392
|
+
// (each tool declares its outputSchema), and as text for a client that
|
|
393
|
+
// only reads text.
|
|
292
394
|
return result(id, {
|
|
293
395
|
content: [{ type: 'text', text: JSON.stringify(out, null, 2) }],
|
|
396
|
+
structuredContent: out,
|
|
294
397
|
isError: false,
|
|
295
398
|
});
|
|
296
399
|
} catch (err) {
|
|
@@ -308,6 +411,7 @@ async function handle(msg) {
|
|
|
308
411
|
}
|
|
309
412
|
|
|
310
413
|
let buffer = '';
|
|
414
|
+
const inFlight = new Set();
|
|
311
415
|
process.stdin.setEncoding('utf8');
|
|
312
416
|
process.stdin.on('data', (chunk) => {
|
|
313
417
|
buffer += chunk;
|
|
@@ -323,14 +427,21 @@ process.stdin.on('data', (chunk) => {
|
|
|
323
427
|
log(`dropping unparseable frame: ${err.message}`);
|
|
324
428
|
continue;
|
|
325
429
|
}
|
|
326
|
-
Promise.resolve(handle(msg)).catch((err) => {
|
|
430
|
+
const work = Promise.resolve(handle(msg)).catch((err) => {
|
|
327
431
|
log(`handler error: ${err.stack || err.message}`);
|
|
328
432
|
if (msg && msg.id !== undefined && msg.id !== null) {
|
|
329
433
|
failure(msg.id, -32603, `Internal error: ${err.message}`);
|
|
330
434
|
}
|
|
331
435
|
});
|
|
436
|
+
inFlight.add(work);
|
|
437
|
+
work.finally(() => inFlight.delete(work));
|
|
332
438
|
}
|
|
333
439
|
});
|
|
334
440
|
|
|
335
|
-
|
|
441
|
+
// When the client closes its end, answer what it already asked before
|
|
442
|
+
// leaving. Exiting at once dropped any tool call still waiting on the
|
|
443
|
+
// network, so a client that sent a call and then closed got no answer.
|
|
444
|
+
process.stdin.on('end', () => {
|
|
445
|
+
Promise.allSettled([...inFlight]).then(() => process.exit(0));
|
|
446
|
+
});
|
|
336
447
|
log(`rework-proof MCP server ready (api=${API})`);
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "The REWORK Proof MCP server's tools and the fixed sentences it returns, in one file. Two servers read it: this package (stdio, index.js beside this file) and the hosted server REWORK runs at https://api.reworkdigital.io/mcp, so neither can describe a tool, or the ceiling on a claim, differently from the other. Every tool only reads: readOnlyHint is true on all of them.",
|
|
3
|
+
"server": {
|
|
4
|
+
"name": "rework-proof",
|
|
5
|
+
"title": "REWORK Proof",
|
|
6
|
+
"description": "Check whether delivered work is genuinely the author's: verify a REWORK credential, see whether it was revoked or ever issued, and read what it does and does not prove.",
|
|
7
|
+
"instructions": "Read `assurance_note` with every result: it states the ceiling on what the result proves. A valid signature is not a review of the work."
|
|
8
|
+
},
|
|
9
|
+
"protocols": {
|
|
10
|
+
"_comment": "Revisions of the Model Context Protocol this server speaks, newest first. `handshake` revisions begin with `initialize`. `stateless` revisions have no handshake: every request names its revision in `params._meta`.",
|
|
11
|
+
"handshake": [
|
|
12
|
+
"2025-11-25",
|
|
13
|
+
"2025-06-18",
|
|
14
|
+
"2025-03-26",
|
|
15
|
+
"2024-11-05"
|
|
16
|
+
],
|
|
17
|
+
"stateless": [
|
|
18
|
+
"2026-07-28"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"tools": [
|
|
22
|
+
{
|
|
23
|
+
"name": "verify_rework_credential",
|
|
24
|
+
"title": "Verify a REWORK credential",
|
|
25
|
+
"description": "Check whether a REWORK Verifiable Credential (a VC-JWT) is authentic, and report what it claims. Use this when someone presents a credential as evidence that they produced a piece of work. Returns whether the signature is valid, whether REWORK has since revoked it, who issued it, and the credential subject.",
|
|
26
|
+
"inputSchema": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"credential": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "The compact VC-JWT, three base64url segments separated by dots."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"credential"
|
|
36
|
+
],
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
},
|
|
39
|
+
"outputSchema": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"valid": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"description": "True only when the signature verifies against REWORK's key, the credential has not expired, and REWORK has not revoked it."
|
|
45
|
+
},
|
|
46
|
+
"reason": {
|
|
47
|
+
"type": [
|
|
48
|
+
"string",
|
|
49
|
+
"null"
|
|
50
|
+
],
|
|
51
|
+
"description": "Why the credential is not valid; null when it is."
|
|
52
|
+
},
|
|
53
|
+
"revoked": {
|
|
54
|
+
"type": [
|
|
55
|
+
"boolean",
|
|
56
|
+
"null"
|
|
57
|
+
],
|
|
58
|
+
"description": "True when REWORK revoked the credential after issuing it; false when it was checked and stands; null when there is nothing to check (not a certificate credential, or not valid) or the status could not be read."
|
|
59
|
+
},
|
|
60
|
+
"issuer": {
|
|
61
|
+
"description": "Who issued the credential, as the credential states it; null when it is not valid."
|
|
62
|
+
},
|
|
63
|
+
"credential_subject": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"description": "What the credential claims. Empty when it is not valid."
|
|
66
|
+
},
|
|
67
|
+
"assurance_note": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "The ceiling on what this result proves. Read it before relying on the result."
|
|
70
|
+
},
|
|
71
|
+
"credential_type": {
|
|
72
|
+
"type": [
|
|
73
|
+
"string",
|
|
74
|
+
"null"
|
|
75
|
+
],
|
|
76
|
+
"description": "Which kind of REWORK credential this is, as the credential states it; null when it is not valid or not a known kind."
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": [
|
|
80
|
+
"valid",
|
|
81
|
+
"reason",
|
|
82
|
+
"revoked",
|
|
83
|
+
"credential_subject",
|
|
84
|
+
"assurance_note"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"annotations": {
|
|
88
|
+
"title": "Verify a REWORK credential",
|
|
89
|
+
"readOnlyHint": true,
|
|
90
|
+
"destructiveHint": false,
|
|
91
|
+
"idempotentHint": true,
|
|
92
|
+
"openWorldHint": true
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "get_rework_issuer_keys",
|
|
97
|
+
"title": "Get REWORK's public signing keys",
|
|
98
|
+
"description": "Fetch REWORK's public signing keys (JWKS). Use this to verify a credential offline yourself instead of trusting this server, or to confirm the issuer key a credential names actually belongs to REWORK.",
|
|
99
|
+
"inputSchema": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"properties": {},
|
|
102
|
+
"additionalProperties": false
|
|
103
|
+
},
|
|
104
|
+
"outputSchema": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"keys": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "object"
|
|
111
|
+
},
|
|
112
|
+
"description": "REWORK's public signing keys, as a JSON Web Key Set."
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": [
|
|
116
|
+
"keys"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"annotations": {
|
|
120
|
+
"title": "Get REWORK's public signing keys",
|
|
121
|
+
"readOnlyHint": true,
|
|
122
|
+
"destructiveHint": false,
|
|
123
|
+
"idempotentHint": true,
|
|
124
|
+
"openWorldHint": true
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "explain_rework_assurance",
|
|
129
|
+
"title": "Explain a REWORK assurance level",
|
|
130
|
+
"description": "Explain what a REWORK assurance level or credential type proves, and what it explicitly does not prove. Use this before relying on a credential, so a weak claim is not read as a strong one.",
|
|
131
|
+
"inputSchema": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"properties": {
|
|
134
|
+
"assurance": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "Assurance level, e.g. \"workflow-identity\". Omit to list all."
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"additionalProperties": false
|
|
140
|
+
},
|
|
141
|
+
"outputSchema": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"description": "One level when `assurance` was given, every level otherwise, or `error` with the known levels when the level asked for does not exist.",
|
|
144
|
+
"properties": {
|
|
145
|
+
"assurance": {
|
|
146
|
+
"type": "string"
|
|
147
|
+
},
|
|
148
|
+
"assurance_levels": {
|
|
149
|
+
"type": "object"
|
|
150
|
+
},
|
|
151
|
+
"what_the_check_reads": {},
|
|
152
|
+
"ai_declaration": {
|
|
153
|
+
"type": "object"
|
|
154
|
+
},
|
|
155
|
+
"credential_types": {
|
|
156
|
+
"type": "object"
|
|
157
|
+
},
|
|
158
|
+
"error": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"known": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"items": {
|
|
164
|
+
"type": "string"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"annotations": {
|
|
170
|
+
"title": "Explain a REWORK assurance level",
|
|
171
|
+
"readOnlyHint": true,
|
|
172
|
+
"destructiveHint": false,
|
|
173
|
+
"idempotentHint": true,
|
|
174
|
+
"openWorldHint": true
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "lookup_rework_attestation",
|
|
179
|
+
"title": "Look up whether REWORK issued a credential",
|
|
180
|
+
"description": "Check whether REWORK actually ISSUED a credential - not just whether its signature verifies. A forged-but-well-formed token fails this; a real one returns its issuance record and the CURRENT OpenTimestamps receipt, which may have been upgraded to a Bitcoin confirmation since issue. Pass the credential (its sha256 is the lookup key) or the digest directly. Workflow attestations and Hugging Face credentials are recorded. Certificate, video-receipt and passport credentials are signed afresh on every download and have no issuance record: pass the credential itself (not its digest) and the answer says so, with the certificate it names looked up instead.",
|
|
181
|
+
"inputSchema": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"properties": {
|
|
184
|
+
"credential": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"description": "The VC-JWT. Only its sha256 digest is used as the lookup key; the credential itself is not stored. For a certificate credential, the certificate id it names is looked up as well."
|
|
187
|
+
},
|
|
188
|
+
"digest": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"description": "sha256 hex of the credential, if you already have it."
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"additionalProperties": false
|
|
194
|
+
},
|
|
195
|
+
"outputSchema": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"properties": {
|
|
198
|
+
"issued": {
|
|
199
|
+
"type": [
|
|
200
|
+
"boolean",
|
|
201
|
+
"null"
|
|
202
|
+
],
|
|
203
|
+
"description": "Whether REWORK has a record of issuing a credential with this digest. Null when REWORK keeps no per-digest record for this kind of credential, so the lookup can neither confirm nor deny it."
|
|
204
|
+
},
|
|
205
|
+
"digest_sha256": {
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"assurance_note": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"description": "The ceiling on what this result proves. Read it before relying on the result."
|
|
211
|
+
},
|
|
212
|
+
"credential_type": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"description": "The kind of credential: from REWORK's record when one was found, otherwise as the credential states it (unverified)."
|
|
215
|
+
},
|
|
216
|
+
"certificate": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"description": "Present for a certificate credential: the certificate it names, looked up by id.",
|
|
219
|
+
"properties": {
|
|
220
|
+
"id": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
"found": {
|
|
224
|
+
"type": [
|
|
225
|
+
"boolean",
|
|
226
|
+
"null"
|
|
227
|
+
],
|
|
228
|
+
"description": "Whether REWORK has that certificate; null when it could not be read."
|
|
229
|
+
},
|
|
230
|
+
"revoked": {
|
|
231
|
+
"type": [
|
|
232
|
+
"boolean",
|
|
233
|
+
"null"
|
|
234
|
+
],
|
|
235
|
+
"description": "Whether it has been revoked; null when not found or not read."
|
|
236
|
+
},
|
|
237
|
+
"verify_url": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"description": "Its public page."
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"required": [
|
|
243
|
+
"id",
|
|
244
|
+
"found",
|
|
245
|
+
"revoked",
|
|
246
|
+
"verify_url"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"github": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"description": "For a Hugging Face join: the GitHub Actions run, as REWORK recorded it."
|
|
252
|
+
},
|
|
253
|
+
"huggingface": {
|
|
254
|
+
"type": "object",
|
|
255
|
+
"description": "For a Hugging Face credential: the repository (and for a join, the exact content state) REWORK recorded."
|
|
256
|
+
},
|
|
257
|
+
"claim": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"description": "For a repository-control challenge: the claim's state now (status, verdict, lease). Only a status of verified shows control today."
|
|
260
|
+
},
|
|
261
|
+
"timestamp": {
|
|
262
|
+
"type": "object",
|
|
263
|
+
"description": "The OpenTimestamps receipt as REWORK holds it now. Only a status of confirmed is anchored in Bitcoin."
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"required": [
|
|
267
|
+
"issued",
|
|
268
|
+
"digest_sha256",
|
|
269
|
+
"assurance_note"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"annotations": {
|
|
273
|
+
"title": "Look up whether REWORK issued a credential",
|
|
274
|
+
"readOnlyHint": true,
|
|
275
|
+
"destructiveHint": false,
|
|
276
|
+
"idempotentHint": true,
|
|
277
|
+
"openWorldHint": true
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"credential_types": {
|
|
282
|
+
"REWORKWorkflowAttestation": "A CI run whose repository identity GitHub attested via OIDC.",
|
|
283
|
+
"REWORKHfJoinedPublication": "A Hugging Face publication joined to the CI run that preceded it, confirmed by REWORK's own read of the Hub.",
|
|
284
|
+
"REWORKHfRepoControl": "A challenge REWORK issued to prove write control of a Hugging Face repository. It shows control only while REWORK holds the claim as verified.",
|
|
285
|
+
"REWORKProofOfWorkCredential": "A submitted piece of work that passed REWORK verification.",
|
|
286
|
+
"REWORKVideoProvenanceReceipt": "A reviewed demonstration video, fingerprinted against reuse.",
|
|
287
|
+
"REWORKReputationPassport": "A holder's full verified history in one signed credential.",
|
|
288
|
+
"REWORKReputationSummary": "A summary of already-public verified facts about a holder."
|
|
289
|
+
},
|
|
290
|
+
"ai_declaration": {
|
|
291
|
+
"reads": "Commit messages only: a Co-authored-by, Assisted-by or Generated-by trailer naming one of the tools below; an Assisted-by trailer in the AGENT:MODEL form; a Claude-Session, Amp-Thread-ID or Replit-Commit-Author trailer; an `AI-assisted: true` line; or a \"Generated with\" line.",
|
|
292
|
+
"zero_means": "No commit message declared a tool. It does not mean no tool was used; a message with no trailer looks the same either way.",
|
|
293
|
+
"declared_means": "The author chose to say so. It is reported as a fact and never lowers a result."
|
|
294
|
+
},
|
|
295
|
+
"notes": {
|
|
296
|
+
"unknown_assurance": "Assurance level not recognised - do not assume this proves more than it states.",
|
|
297
|
+
"issued": "Issuance confirms REWORK signed a credential with this digest. It is still not a review of the code or a claim the work is any good - and a \"submitted\" timestamp is a calendar promise, only \"confirmed\" means anchored in Bitcoin.",
|
|
298
|
+
"not_issued": "REWORK has no record of issuing a credential with this digest. A valid signature with no issuance record deserves suspicion: it could predate the registry, or it could be a key compromise.",
|
|
299
|
+
"revoked": "REWORK revoked this credential after issuing it. Its signature still verifies, which is exactly why revocation has to be checked: do not rely on it.",
|
|
300
|
+
"revocation_unchecked": "Whether this credential has since been revoked could not be checked just now. The signature is valid; treat the result as incomplete.",
|
|
301
|
+
"no_assurance_level": "This type of credential carries no assurance level. A valid signature shows REWORK issued it and that it has not been altered; it is not a review of how good the work is.",
|
|
302
|
+
"registry_not_kept": "REWORK keeps no per-digest record for this type of credential: it is signed afresh each time it is downloaded, so no two copies share a digest, and this lookup can neither confirm nor deny it. That is not a sign of forgery. Check its signature with verify_rework_credential; what the credential says about itself here is unverified until then.",
|
|
303
|
+
"registry_newest_only": "REWORK keeps a record of only the newest repository-control challenge for each person and repository: starting the ceremony again replaces it. An older challenge missing here is not a sign of forgery. Check its signature and expiry with verify_rework_credential; what the credential says about itself here is unverified until then.",
|
|
304
|
+
"claim_not_current": "REWORK issued this challenge, but the claim it belongs to is now {status}: it does not show control of the repository today."
|
|
305
|
+
},
|
|
306
|
+
"errors": {
|
|
307
|
+
"credential_required": "credential is required: pass the compact VC-JWT (three base64url segments separated by dots)",
|
|
308
|
+
"digest_required": "pass either `credential` (the VC-JWT) or `digest` (64 hex chars)"
|
|
309
|
+
},
|
|
310
|
+
"site": "https://reworkio.com",
|
|
311
|
+
"registry": {
|
|
312
|
+
"signed_afresh": [
|
|
313
|
+
"REWORKProofOfWorkCredential",
|
|
314
|
+
"REWORKVideoProvenanceReceipt",
|
|
315
|
+
"REWORKReputationPassport",
|
|
316
|
+
"REWORKReputationSummary"
|
|
317
|
+
],
|
|
318
|
+
"certificate_type": "REWORKProofOfWorkCredential",
|
|
319
|
+
"newest_only": [
|
|
320
|
+
"REWORKHfRepoControl"
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
}
|