@primitivehub/mcp-server 0.1.2 → 0.1.3
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/CHANGELOG.md
CHANGED
|
@@ -6,19 +6,18 @@ Version tracks Trust Contract spec version (for `verify_bundle`) and
|
|
|
6
6
|
Context CI Top 10 version (for `scan_text` / `audit_workspace`);
|
|
7
7
|
`0.1.x` of this package is conformant to both v0.1.
|
|
8
8
|
|
|
9
|
-
## [0.1.
|
|
10
|
-
|
|
11
|
-
**Security (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- `
|
|
20
|
-
|
|
21
|
-
- Supersedes `@primitivehub/mcp-server@0.1.0`, **deprecated**.
|
|
9
|
+
## [0.1.3] — 2026-10-16
|
|
10
|
+
|
|
11
|
+
**Security hardening (external assessment PH-SEC-003).** Requires
|
|
12
|
+
`@primitivehub/phub@^0.1.3` + `@primitivehub/verify@^0.1.2`.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- **Honest scope for `verify_before_load` (PH-SEC-003):** documented as an
|
|
16
|
+
**opt-in verification API** — registering the MCP server does NOT
|
|
17
|
+
interpose on agent file reads; real enforcement needs the host to mediate
|
|
18
|
+
reads. Removed the "every agent MUST consult before reading" over-claim.
|
|
19
|
+
- Inherits verify's fail-closed `valid` + the `inspected` field; the
|
|
20
|
+
`scan_text` doc now states all ten detectors (CCI-001…010) run.
|
|
22
21
|
|
|
23
22
|
## [0.1.1] — 2026-10-04
|
|
24
23
|
|
package/README.md
CHANGED
|
@@ -110,8 +110,8 @@ stubbed in v0.1 (see verify README).
|
|
|
110
110
|
|
|
111
111
|
### `scan_text`
|
|
112
112
|
|
|
113
|
-
Run the
|
|
114
|
-
`runScan`.
|
|
113
|
+
Run the full Context CI Top 10 detector roster (CCI-001…010) against
|
|
114
|
+
text. Wraps phub's `runScan`.
|
|
115
115
|
|
|
116
116
|
**Arguments:**
|
|
117
117
|
|
|
@@ -171,6 +171,14 @@ the low-FP signal, not just the boolean. Same engine as the `phub
|
|
|
171
171
|
verify-before-load` CLI command and the `phub-scan` action's `mode:
|
|
172
172
|
gate`.
|
|
173
173
|
|
|
174
|
+
> **Scope — opt-in, not enforced (PH-SEC-003).** Registering this MCP
|
|
175
|
+
> server exposes `verify_before_load` as a tool an agent *can* call; it
|
|
176
|
+
> does **not** interpose on the agent's file reads. A host or loader can
|
|
177
|
+
> still read content without invoking the gate. Treat this as an **opt-in
|
|
178
|
+
> verification API**: real "no untrusted bytes reach the model"
|
|
179
|
+
> enforcement requires the host to route reads through the gate. Our docs
|
|
180
|
+
> describe the *capability*, not a guarantee the host enforces it.
|
|
181
|
+
|
|
174
182
|
**Arguments:**
|
|
175
183
|
|
|
176
184
|
| Field | Type | Required | Default |
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP tool: `verify_before_load`
|
|
3
3
|
*
|
|
4
|
-
* The composite runtime gate
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The composite runtime gate — an OPT-IN verification API. An agent (or a
|
|
5
|
+
* host integration) SHOULD call this BEFORE loading any agent-context
|
|
6
|
+
* primitive.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT (PH-SEC-003 — honest scope): calling this is ADVISORY, not
|
|
9
|
+
* enforced. Registering the MCP server does NOT interpose on the agent's
|
|
10
|
+
* file reads — nothing prevents a loader from reading content without
|
|
11
|
+
* calling the gate. Real enforcement requires the HOST to mediate reads
|
|
12
|
+
* through this check; until then this is an opt-in check, not a
|
|
13
|
+
* compulsory read-interceptor.
|
|
14
|
+
*
|
|
15
|
+
* Refuses-by-default for:
|
|
7
16
|
* - missing lock (operator hasn't sealed anything)
|
|
8
17
|
* - lock spec-version mismatch (Top 10 ratcheted; re-seal required)
|
|
9
18
|
* - drift (working tree differs from lock)
|
|
10
19
|
* - unattested artifacts (with requireAttestation set)
|
|
11
|
-
* - scanner findings (
|
|
12
|
-
* - invalid Trust Bundle (when one is provided)
|
|
20
|
+
* - scanner findings (all ten Context CI Top 10 detectors, CCI-001…010)
|
|
21
|
+
* - an unauthenticated or invalid Trust Bundle (when one is provided)
|
|
13
22
|
*
|
|
14
23
|
* Pure transport per ADR-0031 § 2 rule #1. Combines two existing
|
|
15
24
|
* primitives:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-before-load.d.ts","sourceRoot":"","sources":["../../src/tools/verify-before-load.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"verify-before-load.d.ts","sourceRoot":"","sources":["../../src/tools/verify-before-load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAWH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C1B,CAAA;AAYV,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAsGtE"}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP tool: `verify_before_load`
|
|
3
3
|
*
|
|
4
|
-
* The composite runtime gate
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The composite runtime gate — an OPT-IN verification API. An agent (or a
|
|
5
|
+
* host integration) SHOULD call this BEFORE loading any agent-context
|
|
6
|
+
* primitive.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT (PH-SEC-003 — honest scope): calling this is ADVISORY, not
|
|
9
|
+
* enforced. Registering the MCP server does NOT interpose on the agent's
|
|
10
|
+
* file reads — nothing prevents a loader from reading content without
|
|
11
|
+
* calling the gate. Real enforcement requires the HOST to mediate reads
|
|
12
|
+
* through this check; until then this is an opt-in check, not a
|
|
13
|
+
* compulsory read-interceptor.
|
|
14
|
+
*
|
|
15
|
+
* Refuses-by-default for:
|
|
7
16
|
* - missing lock (operator hasn't sealed anything)
|
|
8
17
|
* - lock spec-version mismatch (Top 10 ratcheted; re-seal required)
|
|
9
18
|
* - drift (working tree differs from lock)
|
|
10
19
|
* - unattested artifacts (with requireAttestation set)
|
|
11
|
-
* - scanner findings (
|
|
12
|
-
* - invalid Trust Bundle (when one is provided)
|
|
20
|
+
* - scanner findings (all ten Context CI Top 10 detectors, CCI-001…010)
|
|
21
|
+
* - an unauthenticated or invalid Trust Bundle (when one is provided)
|
|
13
22
|
*
|
|
14
23
|
* Pure transport per ADR-0031 § 2 rule #1. Combines two existing
|
|
15
24
|
* primitives:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-before-load.js","sourceRoot":"","sources":["../../src/tools/verify-before-load.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"verify-before-load.js","sourceRoot":"","sources":["../../src/tools/verify-before-load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,YAAY,EAA0B,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,GAE5B,MAAM,oBAAoB,CAAA;AAE3B,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,uRAAuR;IACzR,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;QAClB,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,wHAAwH;aAC3H;YACD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
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "MCP server exposing PrimitiveHub verification + scanning to AI agents (Claude, Cursor, Aider, …). Pure transport over @primitivehub/verify + @primitivehub/phub — zero custom trust logic.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "PrimitiveHub AI / CyberOrca Labs",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
52
|
-
"@primitivehub/verify": "^0.1.
|
|
53
|
-
"@primitivehub/phub": "^0.1.
|
|
52
|
+
"@primitivehub/verify": "^0.1.2",
|
|
53
|
+
"@primitivehub/phub": "^0.1.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "^22",
|