@reworkdigital.io/rework-proof-mcp 1.1.0 → 1.2.1
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 +30 -1
- package/package.json +3 -2
- package/src/ai-trailers.json +120 -0
- package/src/assurance.json +41 -0
- package/src/index.js +45 -29
package/README.md
CHANGED
|
@@ -41,6 +41,35 @@ vouched for who wrote the commits — it says nothing about whether the code
|
|
|
41
41
|
works or is any good. Returning the verdict without its ceiling would invite
|
|
42
42
|
exactly that misreading, so the ceiling travels with it.
|
|
43
43
|
|
|
44
|
+
The ceilings are read at runtime from [`src/assurance.json`](src/assurance.json),
|
|
45
|
+
the one file every REWORK surface renders them from:
|
|
46
|
+
|
|
47
|
+
<!-- rework-assurance:begin -->
|
|
48
|
+
**Workflow identity** (`workflow-identity`), moderate: strong on identity, silent on quality
|
|
49
|
+
|
|
50
|
+
Proves: GitHub cryptographically vouched that a specific workflow run belongs to a specific repository and commit, and REWORK recorded the authorship signals that run observed: commit signature state, whether each commit resolves to the pull request author, and how many commit messages declared AI assistance.
|
|
51
|
+
|
|
52
|
+
Does not prove: Nobody reviewed the code, ran it, or judged its quality. It does not say the work is good, only who the git history says wrote it. The AI count is what authors declared in commit messages: a zero means nothing was declared, not that no tool was used.
|
|
53
|
+
|
|
54
|
+
**Reviewed reference** (`reviewed-reference`), moderate: human-checked, but of a demonstration rather than the artefact
|
|
55
|
+
|
|
56
|
+
Proves: A REWORK reviewer watched a demonstration video and confirmed it corresponds to the claimed work, and the video is fingerprinted so reuse is detectable.
|
|
57
|
+
|
|
58
|
+
Does not prove: The reviewer did not audit the source, reproduce the result, or verify claims made verbally in the video.
|
|
59
|
+
|
|
60
|
+
**Cross-platform join** (`cross-platform-join`), moderate: strong on which bytes landed where and who controls both ends, silent on how they were made
|
|
61
|
+
|
|
62
|
+
Proves: The exact bytes named by a manifest digest were present in the named Hugging Face repository, at the named commit, immediately after the named GitHub Actions run, confirmed by REWORK's own independent read of the Hub; and one REWORK account holds both the App installation on the GitHub repository's owner and a verified write-control claim on the Hugging Face repository.
|
|
63
|
+
|
|
64
|
+
Does not prove: It does not prove that the workflow produced, trained, or evaluated the content. A run that downloads someone else's files and uploads them also carries bytes. Read the workflow reference to judge what the run actually did.
|
|
65
|
+
<!-- rework-assurance:end -->
|
|
66
|
+
|
|
67
|
+
`explain_rework_assurance` also returns `ai_declaration`: which commit-message
|
|
68
|
+
trailers count as declared AI assistance (read from
|
|
69
|
+
[`src/ai-trailers.json`](src/ai-trailers.json), the same list the Action and
|
|
70
|
+
the App check use). A declared count of zero means no message declared a
|
|
71
|
+
tool; it never means no tool was used.
|
|
72
|
+
|
|
44
73
|
## Zero dependencies, on purpose
|
|
45
74
|
|
|
46
75
|
The whole server is one file: [`src/index.js`](src/index.js). MCP's stdio
|
|
@@ -67,7 +96,7 @@ is a convenience, not an authority.
|
|
|
67
96
|
|
|
68
97
|
## Related
|
|
69
98
|
|
|
70
|
-
- [REWORK Proof Check](https://github.com/
|
|
99
|
+
- [REWORK Proof Check](https://github.com/reworkio/REWORK-Proof) — the
|
|
71
100
|
GitHub Action that produces these attestations from a CI run.
|
|
72
101
|
- [REWORK Proof App](https://github.com/apps/rework-proof) — the same
|
|
73
102
|
verification posted automatically as a check run on every pull request.
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reworkdigital.io/rework-proof-mcp",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"mcpName": "io.github.reworkio/rework-proof",
|
|
4
5
|
"description": "MCP server for verifying REWORK credentials — check whether delivered work is genuinely the author's.",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"type": "commonjs",
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
},
|
|
19
20
|
"repository": {
|
|
20
21
|
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/
|
|
22
|
+
"url": "git+https://github.com/reworkio/REWORK-Proof.git",
|
|
22
23
|
"directory": "mcp"
|
|
23
24
|
},
|
|
24
25
|
"homepage": "https://reworkdigital.io/proofs",
|
|
@@ -0,0 +1,120 @@
|
|
|
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": 1,
|
|
4
|
+
"tools": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Claude",
|
|
7
|
+
"pattern": "\\bClaude\\b|noreply@anthropic\\.com",
|
|
8
|
+
"example": "Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>",
|
|
9
|
+
"evidence": "observed"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "GitHub Copilot",
|
|
13
|
+
"pattern": "\\bCopilot\\b|copilot@github\\.com",
|
|
14
|
+
"example": "Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>",
|
|
15
|
+
"evidence": "observed"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "OpenAI Codex / ChatGPT / GPT",
|
|
19
|
+
"pattern": "\\bCodex\\b|\\b(?:Chat)?GPT\\b|\\bGPT-[0-9]|@openai\\.com",
|
|
20
|
+
"example": "Co-authored-by: Codex <codex@openai.com>",
|
|
21
|
+
"evidence": "observed"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "Gemini",
|
|
25
|
+
"pattern": "\\bGemini\\b|gemini-cli",
|
|
26
|
+
"example": "Co-Authored-By: Gemini <noreply@google.com>",
|
|
27
|
+
"evidence": "observed"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "Cursor",
|
|
31
|
+
"pattern": "\\bCursor\\b|@cursor\\.com",
|
|
32
|
+
"example": "Co-authored-by: Cursor Agent <cursoragent@cursor.com>",
|
|
33
|
+
"evidence": "observed"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "Devin",
|
|
37
|
+
"pattern": "devin-ai-integration|devin@cognition|\\bDevin AI\\b",
|
|
38
|
+
"example": "Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>",
|
|
39
|
+
"evidence": "observed",
|
|
40
|
+
"note": "Devin is also a common first name, so a bare `Devin` is not enough: the vendor login or address has to be there."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "Aider",
|
|
44
|
+
"pattern": "\\baider\\b|@aider\\.chat",
|
|
45
|
+
"example": "Co-authored-by: aider (gpt-5.4) <aider@aider.chat>",
|
|
46
|
+
"evidence": "observed"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Windsurf",
|
|
50
|
+
"pattern": "\\bWindsurf\\b|windsurf-bot|@codeium\\.com",
|
|
51
|
+
"example": "Co-authored-by: windsurf-bot[bot] <189301087+windsurf-bot[bot]@users.noreply.github.com>",
|
|
52
|
+
"evidence": "observed"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "Cline",
|
|
56
|
+
"pattern": "cline-cloud|@cline\\.bot|\\bCline\\s+(?:Bot|AI)\\b",
|
|
57
|
+
"example": "Co-authored-by: Cline <noreply@cline.bot>",
|
|
58
|
+
"evidence": "observed",
|
|
59
|
+
"note": "Cline is also a surname (a `Patsy Cline <patsy@example.com>` co-author is a person), so the word alone never counts: only the vendor address or login does."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "Jules",
|
|
63
|
+
"pattern": "google-labs-jules|jules@google",
|
|
64
|
+
"example": "Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>",
|
|
65
|
+
"evidence": "observed",
|
|
66
|
+
"note": "Jules is also a first name; only the vendor login or address counts."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "Amp",
|
|
70
|
+
"pattern": "\\bAmp\\b(?=\\s*(?:<|\\())|@ampcode\\.com",
|
|
71
|
+
"example": "Co-authored-by: Amp <amp@ampcode.com>",
|
|
72
|
+
"evidence": "observed"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "Augment",
|
|
76
|
+
"pattern": "\\bAugment(?:\\s*Code|\\s*Agent)?\\b|@augmentcode\\.com",
|
|
77
|
+
"example": "Co-authored-by: Augment <noreply@augmentcode.com>",
|
|
78
|
+
"evidence": "observed"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "Kiro",
|
|
82
|
+
"pattern": "\\bKiro\\b(?=\\s*(?:<|\\())|@kiro\\.dev",
|
|
83
|
+
"example": "Co-Authored-By: Kiro <noreply@kiro.dev>",
|
|
84
|
+
"evidence": "observed"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "SWE-agent",
|
|
88
|
+
"pattern": "\\bSWE-agent\\b",
|
|
89
|
+
"example": "Co-authored-by: SWE-agent <swe-agent@example.invalid>",
|
|
90
|
+
"evidence": "assumed"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"patterns": [
|
|
94
|
+
{
|
|
95
|
+
"id": "co-authored-by",
|
|
96
|
+
"what": "A Co-authored-by trailer naming one of the tools above, in any casing (`Co-Authored-By`, `Co-authored-by`, `co-authored-by`).",
|
|
97
|
+
"regex": "Co-?authored-?by:[^\\n]*?(?:{{tools}})"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "claude-session",
|
|
101
|
+
"what": "The `Claude-Session:` trailer Claude Code writes beside its co-author line.",
|
|
102
|
+
"regex": "(?:^|\\n)[ \\t]*Claude-Session:[ \\t]*\\S+"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "amp-thread-id",
|
|
106
|
+
"what": "The `Amp-Thread-ID:` trailer Amp writes beside its co-author line.",
|
|
107
|
+
"regex": "(?:^|\\n)[ \\t]*Amp-Thread-ID:[ \\t]*\\S+"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "generated-with",
|
|
111
|
+
"what": "A `Generated with <tool>` or `Generated by <tool>` line, with or without a markdown link around the tool name. `Regenerated with build.js` is a human sentence about a script and does not count.",
|
|
112
|
+
"regex": "\\bGenerated\\s+(?:with|by)\\s+\\[?(?:{{tools}})"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "robot-generated",
|
|
116
|
+
"what": "The robot-emoji form, `🤖 Generated ...`, which some tools write without naming themselves on the same line.",
|
|
117
|
+
"regex": "🤖\\s*Generated"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "The one statement of what a REWORK assurance level proves and what it does not. The MCP server reads this file at runtime for explain_rework_assurance and for the assurance_note on every verified credential; the Action README and the reworkdigital.io/github page render the same text, and a published check fails the build when any rendered copy drifts from this file. Edit here, nowhere else.",
|
|
3
|
+
"levels": {
|
|
4
|
+
"workflow-identity": {
|
|
5
|
+
"title": "Workflow identity",
|
|
6
|
+
"means": "GitHub cryptographically vouched that a specific workflow run belongs to a specific repository and commit, and REWORK recorded the authorship signals that run observed: commit signature state, whether each commit resolves to the pull request author, and how many commit messages declared AI assistance.",
|
|
7
|
+
"does_not_mean": "Nobody reviewed the code, ran it, or judged its quality. It does not say the work is good, only who the git history says wrote it. The AI count is what authors declared in commit messages: a zero means nothing was declared, not that no tool was used.",
|
|
8
|
+
"strength": "moderate: strong on identity, silent on quality"
|
|
9
|
+
},
|
|
10
|
+
"reviewed-reference": {
|
|
11
|
+
"title": "Reviewed reference",
|
|
12
|
+
"means": "A REWORK reviewer watched a demonstration video and confirmed it corresponds to the claimed work, and the video is fingerprinted so reuse is detectable.",
|
|
13
|
+
"does_not_mean": "The reviewer did not audit the source, reproduce the result, or verify claims made verbally in the video.",
|
|
14
|
+
"strength": "moderate: human-checked, but of a demonstration rather than the artefact"
|
|
15
|
+
},
|
|
16
|
+
"cross-platform-join": {
|
|
17
|
+
"title": "Cross-platform join",
|
|
18
|
+
"means": "The exact bytes named by a manifest digest were present in the named Hugging Face repository, at the named commit, immediately after the named GitHub Actions run, confirmed by REWORK's own independent read of the Hub; and one REWORK account holds both the App installation on the GitHub repository's owner and a verified write-control claim on the Hugging Face repository.",
|
|
19
|
+
"does_not_mean": "It does not prove that the workflow produced, trained, or evaluated the content. A run that downloads someone else's files and uploads them also carries bytes. Read the workflow reference to judge what the run actually did.",
|
|
20
|
+
"strength": "moderate: strong on which bytes landed where and who controls both ends, silent on how they were made"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"reads": [
|
|
24
|
+
{
|
|
25
|
+
"title": "Signatures, from GitHub rather than from the commit.",
|
|
26
|
+
"body": "A commit's author line is free text that anyone can set. The check reads GitHub's own verification result and the account-resolved author login instead, which is what closes the gap between \"it says your name\" and \"it is yours\"."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Declared AI assistance, counted and not penalised.",
|
|
30
|
+
"body": "A commit message that names a coding assistant (a Co-authored-by trailer, a Generated-with line) is recorded as something the author chose to declare. That is a good sign, not a flag, and it never lowers the result. The check reads messages, not keystrokes: \"none declared\" means none was declared, not that none was used."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "It re-checks after the day it passed.",
|
|
34
|
+
"body": "A repository can be renamed, made private, or deleted long after a proof was verified. A nightly sweep re-reads what each GitHub proof points at and marks the ones whose evidence moved, so a proof ages into \"stale\" rather than into a quiet lie."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "It never fails an honest repository.",
|
|
38
|
+
"body": "There is no red state. The check reports what it saw; it does not grade a pull request, and nothing here can leave a mark on someone else's work."
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
package/src/index.js
CHANGED
|
@@ -20,12 +20,22 @@
|
|
|
20
20
|
'use strict';
|
|
21
21
|
|
|
22
22
|
const crypto = require('node:crypto');
|
|
23
|
+
const fs = require('node:fs');
|
|
24
|
+
const path = require('node:path');
|
|
23
25
|
|
|
24
26
|
const API = (process.env.REWORK_API_URL || 'https://api.reworkdigital.io/api/v1').replace(/\/$/, '');
|
|
25
|
-
const SERVER_VERSION = '1.0.0';
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
const readJson = (name) => JSON.parse(fs.readFileSync(path.join(__dirname, name), 'utf8'));
|
|
29
|
+
|
|
30
|
+
// The version a client sees in serverInfo is package.json's, read at start,
|
|
31
|
+
// so it cannot drift from what npm published. It was a typed '1.0.0' while
|
|
32
|
+
// the package was 1.1.0 (found 2026-10-18); check_rework_proof_mcp.py pins
|
|
33
|
+
// this now. package.json sits one level up from src/, inside the tarball.
|
|
34
|
+
const SERVER_VERSION = readJson('../package.json').version;
|
|
35
|
+
|
|
36
|
+
// Protocol revisions this server understands. The client's own revision is
|
|
37
|
+
// echoed back when it appears here; otherwise the newest is offered and the
|
|
38
|
+
// client decides whether it can proceed.
|
|
29
39
|
const SUPPORTED_PROTOCOLS = ['2025-06-18', '2025-03-26', '2024-11-05'];
|
|
30
40
|
const HTTP_TIMEOUT_MS = 15000;
|
|
31
41
|
|
|
@@ -33,35 +43,36 @@ const log = (...a) => process.stderr.write(a.join(' ') + '\n');
|
|
|
33
43
|
|
|
34
44
|
/**
|
|
35
45
|
* What REWORK's assurance levels mean, and — more importantly — what they do
|
|
36
|
-
* not.
|
|
37
|
-
* prove?" should get the same answer when
|
|
38
|
-
* honest ceiling on a claim is not something
|
|
46
|
+
* not. Read from `assurance.json` beside this file rather than fetched: an
|
|
47
|
+
* agent asking "how much does this prove?" should get the same answer when
|
|
48
|
+
* the API is unreachable, and the honest ceiling on a claim is not something
|
|
49
|
+
* to look up over the network. The same file is what the Action README and
|
|
50
|
+
* the reworkdigital.io/github page render, so every surface states one
|
|
51
|
+
* ceiling.
|
|
39
52
|
*/
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
'
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
+ 'made verbally in the video.',
|
|
59
|
-
strength: 'moderate — human-checked, but of a demonstration rather than the artefact',
|
|
60
|
-
},
|
|
53
|
+
const ASSURANCE_SPEC = readJson('assurance.json');
|
|
54
|
+
const ASSURANCE = ASSURANCE_SPEC.levels;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Which commit-message declarations the checks count as AI assistance, from
|
|
58
|
+
* `ai-trailers.json`: the same definition the Action and the App check read.
|
|
59
|
+
* Listed in the explanation so an agent knows what "declared" means here. A
|
|
60
|
+
* declaration is something the author wrote; a count of zero means nothing
|
|
61
|
+
* was declared, never that no tool was used.
|
|
62
|
+
*/
|
|
63
|
+
const AI_TRAILERS = readJson('ai-trailers.json');
|
|
64
|
+
const AI_DECLARATION = {
|
|
65
|
+
reads: 'Commit messages only: a Co-authored-by trailer naming one of the tools below, a '
|
|
66
|
+
+ 'Claude-Session or Amp-Thread-ID trailer, or a "Generated with" line.',
|
|
67
|
+
tools: AI_TRAILERS.tools.map((t) => t.name),
|
|
68
|
+
zero_means: 'No commit message declared a tool. It does not mean no tool was used; a '
|
|
69
|
+
+ 'message with no trailer looks the same either way.',
|
|
70
|
+
declared_means: 'The author chose to say so. It is reported as a fact and never lowers a result.',
|
|
61
71
|
};
|
|
62
72
|
|
|
63
73
|
const CREDENTIAL_TYPES = {
|
|
64
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.',
|
|
65
76
|
REWORKProofOfWorkCredential: 'A submitted piece of work that passed REWORK verification.',
|
|
66
77
|
REWORKVideoProvenanceReceipt: 'A reviewed demonstration video, fingerprinted against reuse.',
|
|
67
78
|
REWORKReputationPassport: "A holder's full verified history in one signed credential.",
|
|
@@ -194,9 +205,14 @@ async function callTool(name, args) {
|
|
|
194
205
|
if (!entry) {
|
|
195
206
|
return { error: `unknown assurance level: ${level}`, known: Object.keys(ASSURANCE) };
|
|
196
207
|
}
|
|
197
|
-
return { assurance: level, ...entry };
|
|
208
|
+
return { assurance: level, ...entry, ai_declaration: AI_DECLARATION };
|
|
198
209
|
}
|
|
199
|
-
return {
|
|
210
|
+
return {
|
|
211
|
+
assurance_levels: ASSURANCE,
|
|
212
|
+
what_the_check_reads: ASSURANCE_SPEC.reads,
|
|
213
|
+
ai_declaration: AI_DECLARATION,
|
|
214
|
+
credential_types: CREDENTIAL_TYPES,
|
|
215
|
+
};
|
|
200
216
|
}
|
|
201
217
|
|
|
202
218
|
if (name === 'lookup_rework_attestation') {
|