@primitivehub/mcp-server 0.1.0
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 +90 -0
- package/LICENSE +21 -0
- package/README.md +210 -0
- package/bin/primitivehub-mcp.js +7 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +214 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +71 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/audit-workspace.d.ts +64 -0
- package/dist/tools/audit-workspace.d.ts.map +1 -0
- package/dist/tools/audit-workspace.js +113 -0
- package/dist/tools/audit-workspace.js.map +1 -0
- package/dist/tools/check-lock.d.ts +51 -0
- package/dist/tools/check-lock.d.ts.map +1 -0
- package/dist/tools/check-lock.js +82 -0
- package/dist/tools/check-lock.js.map +1 -0
- package/dist/tools/scan-text.d.ts +61 -0
- package/dist/tools/scan-text.d.ts.map +1 -0
- package/dist/tools/scan-text.js +94 -0
- package/dist/tools/scan-text.js.map +1 -0
- package/dist/tools/verify-before-load.d.ts +74 -0
- package/dist/tools/verify-before-load.d.ts.map +1 -0
- package/dist/tools/verify-before-load.js +167 -0
- package/dist/tools/verify-before-load.js.map +1 -0
- package/dist/tools/verify-bundle.d.ts +56 -0
- package/dist/tools/verify-bundle.d.ts.map +1 -0
- package/dist/tools/verify-bundle.js +84 -0
- package/dist/tools/verify-bundle.js.map +1 -0
- package/package.json +71 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@primitivehub/mcp-server` are documented here.
|
|
4
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
|
+
Version tracks Trust Contract spec version (for `verify_bundle`) and
|
|
6
|
+
Context CI Top 10 version (for `scan_text` / `audit_workspace`);
|
|
7
|
+
`0.1.x` of this package is conformant to both v0.1.
|
|
8
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
### Added (PR 5.7.5 — MCP runtime gate, ADR-0029)
|
|
12
|
+
- **`verify_before_load`** tool — the composite runtime gate. Combines
|
|
13
|
+
`check_lock` + scanner verdict + optional `verify_bundle` into one
|
|
14
|
+
call. Returns `{safe, reasons[], checks}`. Refuses-by-default for
|
|
15
|
+
drift, unattested artifacts (`requireAttestation: true`), scanner
|
|
16
|
+
findings, missing locks, and invalid bundles. Eight stable refusal
|
|
17
|
+
codes (`LOCK_MISSING`, `PATH_NOT_IN_LOCK`, `PATH_DIGEST_MISMATCH`,
|
|
18
|
+
`PATH_FLAGGED_BY_SCANNER`, `PATH_UNATTESTED`, …) plus
|
|
19
|
+
`BUNDLE_<code>` for every `VerificationErrorCode` from the verify
|
|
20
|
+
library.
|
|
21
|
+
- Tool count is now **5** (was 4). Per ADR-0031 § 2 rule #2 the
|
|
22
|
+
surface is additive — no breaking changes to existing tools.
|
|
23
|
+
- Trust-decision logic lives in `@primitivehub/phub` (exported as
|
|
24
|
+
`verifyBeforeLoad`) per ADR-0031 § 2 rule #1. The MCP wrapper is
|
|
25
|
+
pure transport.
|
|
26
|
+
|
|
27
|
+
## [0.1.0] — 2026-06-02
|
|
28
|
+
|
|
29
|
+
**Not yet published to npm.** Per
|
|
30
|
+
[ADR-0022](../../docs/decisions/0022-publishing-deferred-to-launch.md)
|
|
31
|
+
publishing is gated to the project launch event. The server is fully
|
|
32
|
+
functional inside the monorepo today; `npx @primitivehub/mcp-server`
|
|
33
|
+
is a launch-day capability.
|
|
34
|
+
|
|
35
|
+
### Added — initial Gate G-D release
|
|
36
|
+
|
|
37
|
+
Per [ADR-0031](../../docs/decisions/0031-mcp-server-as-transport.md)
|
|
38
|
+
the v0.1 server is a pure transport layer over existing primitives.
|
|
39
|
+
Zero custom trust logic; every tool delegates.
|
|
40
|
+
|
|
41
|
+
- **`verify_bundle`** — wraps `@primitivehub/verify`'s `verifyBundle`.
|
|
42
|
+
Accepts a Trust Bundle as a JSON string OR a pre-parsed object.
|
|
43
|
+
Levels: `structural` / `policy` / `full` (steps 3-6 stubbed per
|
|
44
|
+
verify v0.1).
|
|
45
|
+
- **`scan_text`** — runs the v0.1 detector roster (T1/T2/T5) over
|
|
46
|
+
arbitrary text. Wraps phub's `runScan`. Honors `--policy` /
|
|
47
|
+
`--strict` / `--allow-fail` / `--detector`.
|
|
48
|
+
- **`audit_workspace`** — active-surface tool. Walks + classifies +
|
|
49
|
+
scans every agent-context artifact under a root path. Wraps phub's
|
|
50
|
+
`runAudit`. Output includes per-artifact verdicts + project
|
|
51
|
+
summary.
|
|
52
|
+
- **`check_lock`** — compares the workspace against
|
|
53
|
+
`.primitivehub/phub.lock` and reports drift. Wraps phub's
|
|
54
|
+
`runAudit` with `lockMode: "check"`.
|
|
55
|
+
- **stdio transport** (default) — `primitivehub-mcp` binary speaks
|
|
56
|
+
MCP over stdin/stdout. Standard pattern; works with every MCP host
|
|
57
|
+
(Claude Code, Cursor, Aider, …).
|
|
58
|
+
- **Programmatic API** — `buildServer()`, `runStdio()`, individual
|
|
59
|
+
tool callables for in-process / SSE / HTTP transports.
|
|
60
|
+
- **Worked examples** (`examples/`) — Claude Code, Cursor, Aider
|
|
61
|
+
config snippets verified to register the server with four
|
|
62
|
+
visible tools.
|
|
63
|
+
|
|
64
|
+
### Runtime deps
|
|
65
|
+
|
|
66
|
+
- `@modelcontextprotocol/sdk` `^1.0.0` — the official MCP SDK; not
|
|
67
|
+
hand-rolled (justified in ADR-0031 § "Alternatives").
|
|
68
|
+
- `@primitivehub/verify` `^0.1.0` (via `file:` pre-launch).
|
|
69
|
+
- `@primitivehub/phub` `^0.1.0` (via `file:` pre-launch).
|
|
70
|
+
|
|
71
|
+
### Tests
|
|
72
|
+
- `test/tools.test.ts` — 16 cases, in-process tool wrappers.
|
|
73
|
+
- `test/server.test.ts` — 6 cases, JSON-RPC via `InMemoryTransport`.
|
|
74
|
+
- 22/22 passing.
|
|
75
|
+
|
|
76
|
+
### Forward-looking (next PRs, not in this release)
|
|
77
|
+
|
|
78
|
+
- **MCP runtime gate** (planned [ADR-0029](../../docs/decisions/0026-phub-lock-format-and-drift-detection.md))
|
|
79
|
+
— `verify_before_load` composite tool that combines `check_lock`
|
|
80
|
+
+ `verify_bundle` and is consulted by agents at primitive-read
|
|
81
|
+
time. Refuses-by-default for unattested content.
|
|
82
|
+
- **SSE / HTTP transports** — for browser-based agents that can't
|
|
83
|
+
spawn stdio child processes.
|
|
84
|
+
- **Tool surface additions as detectors land** — `verify_bundle`
|
|
85
|
+
inherits verify v0.2 (signature/cert/Rekor); `scan_text` and
|
|
86
|
+
`audit_workspace` inherit new detector classes via phub's
|
|
87
|
+
detector registry.
|
|
88
|
+
|
|
89
|
+
[Unreleased]: https://github.com/PrimitiveHub-AI/context-ci/compare/mcp-server-v0.1.0...HEAD
|
|
90
|
+
[0.1.0]: https://github.com/PrimitiveHub-AI/context-ci/releases/tag/mcp-server-v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PrimitiveHub AI / CyberOrca Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# @primitivehub/mcp-server
|
|
2
|
+
|
|
3
|
+
[](./LICENSE)
|
|
4
|
+
|
|
5
|
+
**Model Context Protocol server exposing PrimitiveHub verification +
|
|
6
|
+
scanning to AI agents** (Claude Code, Cursor, Aider, etc.). Pure
|
|
7
|
+
transport over [`@primitivehub/verify`](../verify/) and
|
|
8
|
+
[`@primitivehub/phub`](../phub/) — **zero custom trust logic** per
|
|
9
|
+
Gate G-D acceptance + [ADR-0031](../../docs/decisions/0031-mcp-server-as-transport.md).
|
|
10
|
+
|
|
11
|
+
## What it does
|
|
12
|
+
|
|
13
|
+
Lets an AI agent ask, mid-task:
|
|
14
|
+
|
|
15
|
+
- "Is this Trust Bundle valid?" → `verify_bundle`
|
|
16
|
+
- "Does this text trip Context CI Top 10?" → `scan_text`
|
|
17
|
+
- "What context primitives are in this workspace, and which are
|
|
18
|
+
flagged?" → `audit_workspace`
|
|
19
|
+
- "Has any context primitive in this workspace changed since the
|
|
20
|
+
operator last sealed it?" → `check_lock`
|
|
21
|
+
|
|
22
|
+
Every tool is a pure wrapper. If the verify library changes its
|
|
23
|
+
behavior, this server inherits it. If the scanner roster expands
|
|
24
|
+
(T3/T4/T6..T10), this server surfaces it. There is one authoritative
|
|
25
|
+
trust implementation; this package is the wire format.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
Per [ADR-0022](../../docs/decisions/0022-publishing-deferred-to-launch.md)
|
|
30
|
+
publishing is gated to the project launch event. Post-launch:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Add to Claude Code (one line):
|
|
34
|
+
claude mcp add primitivehub --command "npx @primitivehub/mcp-server"
|
|
35
|
+
|
|
36
|
+
# Or globally:
|
|
37
|
+
pnpm add -g @primitivehub/mcp-server
|
|
38
|
+
primitivehub-mcp # speaks MCP over stdio
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Requires Node ≥ 20.
|
|
42
|
+
|
|
43
|
+
## Quick-start configurations
|
|
44
|
+
|
|
45
|
+
### Claude Code
|
|
46
|
+
|
|
47
|
+
`~/.claude.json` (or `.claude.json` in the project):
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"primitivehub": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["@primitivehub/mcp-server"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then `claude mcp list` shows `primitivehub` with four tools.
|
|
61
|
+
|
|
62
|
+
### Cursor
|
|
63
|
+
|
|
64
|
+
`.cursor/mcp.json`:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"primitivehub": {
|
|
70
|
+
"command": "npx",
|
|
71
|
+
"args": ["-y", "@primitivehub/mcp-server"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Aider
|
|
78
|
+
|
|
79
|
+
`~/.aider.conf.yml`:
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
# MCP support landed in Aider 0.85+
|
|
83
|
+
mcp-servers:
|
|
84
|
+
primitivehub:
|
|
85
|
+
command: npx
|
|
86
|
+
args: ["@primitivehub/mcp-server"]
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
See [`examples/`](./examples/) for full end-to-end configurations.
|
|
90
|
+
|
|
91
|
+
## Tools
|
|
92
|
+
|
|
93
|
+
### `verify_bundle`
|
|
94
|
+
|
|
95
|
+
Verify a [Trust Contract v0.1](../../docs/trust-contract-v0.1.md)
|
|
96
|
+
bundle. Wraps `@primitivehub/verify`'s `verifyBundle`. Steps 3-6
|
|
97
|
+
stubbed in v0.1 (see verify README).
|
|
98
|
+
|
|
99
|
+
**Arguments:**
|
|
100
|
+
|
|
101
|
+
| Field | Type | Required | Default |
|
|
102
|
+
|---|---|---|---|
|
|
103
|
+
| `bundle` | string \| object | yes | — |
|
|
104
|
+
| `level` | `"structural"` \| `"policy"` \| `"full"` | no | `"policy"` |
|
|
105
|
+
| `strict` | boolean | no | `false` |
|
|
106
|
+
| `allow_fail_for` | string[] | no | `[]` |
|
|
107
|
+
|
|
108
|
+
### `scan_text`
|
|
109
|
+
|
|
110
|
+
Run the v0.1 detector roster (T1/T2/T5) against text. Wraps phub's
|
|
111
|
+
`runScan`.
|
|
112
|
+
|
|
113
|
+
**Arguments:**
|
|
114
|
+
|
|
115
|
+
| Field | Type | Required | Default |
|
|
116
|
+
|---|---|---|---|
|
|
117
|
+
| `content` | string | yes | — |
|
|
118
|
+
| `filename` | string | no | `"<inline>"` |
|
|
119
|
+
| `detectors` | string[] | no | all |
|
|
120
|
+
| `strict` | boolean | no | `false` |
|
|
121
|
+
| `policy_path` | string | no | auto-discover |
|
|
122
|
+
| `allow_fail` | string[] | no | `[]` |
|
|
123
|
+
|
|
124
|
+
### `audit_workspace`
|
|
125
|
+
|
|
126
|
+
Active surface — discovers + classifies + scans every agent-context
|
|
127
|
+
artifact under a root. Wraps phub's `runAudit` per [ADR-0025](../../docs/decisions/0025-active-posture-and-phub-audit.md).
|
|
128
|
+
|
|
129
|
+
**Arguments:**
|
|
130
|
+
|
|
131
|
+
| Field | Type | Required | Default |
|
|
132
|
+
|---|---|---|---|
|
|
133
|
+
| `root` | string | no | `process.cwd()` |
|
|
134
|
+
| `max_files` | number | no | `10000` |
|
|
135
|
+
| `max_depth` | number | no | `16` |
|
|
136
|
+
| `strict` | boolean | no | `false` |
|
|
137
|
+
| `detectors` | string[] | no | all |
|
|
138
|
+
| `policy_path` | string | no | auto-discover |
|
|
139
|
+
| `allow_fail` | string[] | no | `[]` |
|
|
140
|
+
|
|
141
|
+
### `check_lock`
|
|
142
|
+
|
|
143
|
+
Compares the workspace against `.primitivehub/phub.lock` per
|
|
144
|
+
[ADR-0026](../../docs/decisions/0026-phub-lock-format-and-drift-detection.md)
|
|
145
|
+
and reports drift (added / modified / removed / reclassified).
|
|
146
|
+
|
|
147
|
+
**Arguments:**
|
|
148
|
+
|
|
149
|
+
| Field | Type | Required | Default |
|
|
150
|
+
|---|---|---|---|
|
|
151
|
+
| `root` | string | no | `process.cwd()` |
|
|
152
|
+
| `lock_path` | string | no | `./.primitivehub/phub.lock` |
|
|
153
|
+
| `policy_path` | string | no | auto-discover |
|
|
154
|
+
| `max_files` | number | no | `10000` |
|
|
155
|
+
| `max_depth` | number | no | `16` |
|
|
156
|
+
|
|
157
|
+
## Design discipline
|
|
158
|
+
|
|
159
|
+
Per [ADR-0031](../../docs/decisions/0031-mcp-server-as-transport.md)
|
|
160
|
+
this package is a transport layer with three load-bearing rules:
|
|
161
|
+
|
|
162
|
+
1. **Zero custom trust logic.** Every tool delegates to a primitive
|
|
163
|
+
that already exists (verify / phub). If a behavioral question
|
|
164
|
+
doesn't have an answer in the delegated primitive, the answer is
|
|
165
|
+
"we don't ship that tool yet" — not "we'll re-implement it here."
|
|
166
|
+
2. **Schema-stable tool surface.** Adding a tool is additive (no
|
|
167
|
+
breaking change). Renaming or removing a tool requires a SemVer
|
|
168
|
+
major bump on this package.
|
|
169
|
+
3. **No state retention.** Every tool call is stateless. The server
|
|
170
|
+
does not cache, queue, or remember invocations. The agent's
|
|
171
|
+
conversation is the only state that matters.
|
|
172
|
+
|
|
173
|
+
The MCP runtime gate `verify_before_load` (planned [ADR-0029](../../docs/decisions/0026-phub-lock-format-and-drift-detection.md))
|
|
174
|
+
is a composite of `check_lock` + `verify_bundle` applied at the
|
|
175
|
+
agent's read time. v0.1 of this package exposes the primitives; the
|
|
176
|
+
composite gate ships when ADR-0029 lands.
|
|
177
|
+
|
|
178
|
+
## Programmatic embedding
|
|
179
|
+
|
|
180
|
+
For tests / alternative transports (SSE, HTTP in v0.2+):
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
import { buildServer } from "@primitivehub/mcp-server"
|
|
184
|
+
|
|
185
|
+
const server = buildServer()
|
|
186
|
+
// Connect over an SDK transport of your choice:
|
|
187
|
+
// StdioServerTransport, InMemoryTransport, etc.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Versioning + publishing
|
|
191
|
+
|
|
192
|
+
Tracks Trust Contract spec version + Context CI Top 10 version
|
|
193
|
+
(both v0.1 in this release).
|
|
194
|
+
|
|
195
|
+
Per [ADR-0022](../../docs/decisions/0022-publishing-deferred-to-launch.md)
|
|
196
|
+
publishing is gated to launch via the same three-lock model as
|
|
197
|
+
`@primitivehub/verify` and `@primitivehub/phub`.
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
MIT. See [LICENSE](./LICENSE).
|
|
202
|
+
|
|
203
|
+
## References
|
|
204
|
+
|
|
205
|
+
- [ADR-0031 — `@primitivehub/mcp-server` as the MCP transport layer](../../docs/decisions/0031-mcp-server-as-transport.md)
|
|
206
|
+
- [ADR-0023 — `phub` CLI + detector parity](../../docs/decisions/0023-phub-cli-and-detector-parity.md)
|
|
207
|
+
- [ADR-0025 — Active posture + `phub audit`](../../docs/decisions/0025-active-posture-and-phub-audit.md)
|
|
208
|
+
- [ADR-0026 — `phub.lock` format + drift detection](../../docs/decisions/0026-phub-lock-format-and-drift-detection.md)
|
|
209
|
+
- [ADR-0018 — Context Policy Language v0.1](../../docs/decisions/0018-context-policy-language.md)
|
|
210
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/) — the protocol spec
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic API surface.
|
|
3
|
+
*
|
|
4
|
+
* The primary distribution is the `primitivehub-mcp` binary
|
|
5
|
+
* (`bin/primitivehub-mcp.js`) which connects over stdio. The exports
|
|
6
|
+
* below let the server be embedded inline (e.g. for in-process tests
|
|
7
|
+
* or alternative transports like SSE / HTTP that ship in v0.2+).
|
|
8
|
+
*/
|
|
9
|
+
export { buildServer, runStdio, SERVER_NAME, SERVER_VERSION, TOOLS } from "./server.js";
|
|
10
|
+
export { VERIFY_BUNDLE_TOOL, callVerifyBundle } from "./tools/verify-bundle.js";
|
|
11
|
+
export { SCAN_TEXT_TOOL, callScanText } from "./tools/scan-text.js";
|
|
12
|
+
export { AUDIT_WORKSPACE_TOOL, callAuditWorkspace } from "./tools/audit-workspace.js";
|
|
13
|
+
export { CHECK_LOCK_TOOL, callCheckLock } from "./tools/check-lock.js";
|
|
14
|
+
export { VERIFY_BEFORE_LOAD_TOOL, callVerifyBeforeLoad } from "./tools/verify-before-load.js";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC/E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACrF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic API surface.
|
|
3
|
+
*
|
|
4
|
+
* The primary distribution is the `primitivehub-mcp` binary
|
|
5
|
+
* (`bin/primitivehub-mcp.js`) which connects over stdio. The exports
|
|
6
|
+
* below let the server be embedded inline (e.g. for in-process tests
|
|
7
|
+
* or alternative transports like SSE / HTTP that ship in v0.2+).
|
|
8
|
+
*/
|
|
9
|
+
export { buildServer, runStdio, SERVER_NAME, SERVER_VERSION, TOOLS } from "./server.js";
|
|
10
|
+
export { VERIFY_BUNDLE_TOOL, callVerifyBundle } from "./tools/verify-bundle.js";
|
|
11
|
+
export { SCAN_TEXT_TOOL, callScanText } from "./tools/scan-text.js";
|
|
12
|
+
export { AUDIT_WORKSPACE_TOOL, callAuditWorkspace } from "./tools/audit-workspace.js";
|
|
13
|
+
export { CHECK_LOCK_TOOL, callCheckLock } from "./tools/check-lock.js";
|
|
14
|
+
export { VERIFY_BEFORE_LOAD_TOOL, callVerifyBeforeLoad } from "./tools/verify-before-load.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC/E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACrF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @primitivehub/mcp-server — Model Context Protocol server exposing
|
|
3
|
+
* PrimitiveHub verification + scanning to AI agents.
|
|
4
|
+
*
|
|
5
|
+
* Zero custom trust logic (Gate G-D acceptance criterion). Every
|
|
6
|
+
* tool is a pure transport over an existing primitive:
|
|
7
|
+
*
|
|
8
|
+
* verify_bundle → @primitivehub/verify (ADR-0020)
|
|
9
|
+
* scan_text → @primitivehub/phub runScan (ADR-0023)
|
|
10
|
+
* audit_workspace → @primitivehub/phub runAudit (ADR-0025)
|
|
11
|
+
* check_lock → @primitivehub/phub runAudit + lockMode:check (ADR-0026)
|
|
12
|
+
*
|
|
13
|
+
* If the verifier changes its behavior, the MCP server inherits it.
|
|
14
|
+
* If the scanner roster expands (T3/T4/T6..T10), the MCP server
|
|
15
|
+
* surfaces it automatically. The trust chain has one authoritative
|
|
16
|
+
* implementation; this package is just a wire format.
|
|
17
|
+
*/
|
|
18
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
19
|
+
export declare const SERVER_NAME = "primitivehub";
|
|
20
|
+
export declare const SERVER_VERSION = "0.1.0";
|
|
21
|
+
export declare const TOOLS: readonly [{
|
|
22
|
+
readonly name: "verify_bundle";
|
|
23
|
+
readonly description: "Verify a PrimitiveHub Trust Bundle against the v0.1 wire format. Runs schema validation, content-digest verification, and Context CI policy evaluation. Steps 3-6 (signature/cert/Rekor) are stubbed in v0.1 — pass level: 'full' to see DEFERRED failures. All verification runs locally; no network calls.";
|
|
24
|
+
readonly inputSchema: {
|
|
25
|
+
readonly type: "object";
|
|
26
|
+
readonly additionalProperties: false;
|
|
27
|
+
readonly required: readonly ["bundle"];
|
|
28
|
+
readonly properties: {
|
|
29
|
+
readonly bundle: {
|
|
30
|
+
readonly description: "The Trust Bundle as a JSON string OR a pre-parsed JSON object. Strings are JSON.parse'd before verification.";
|
|
31
|
+
readonly oneOf: readonly [{
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
}, {
|
|
34
|
+
readonly type: "object";
|
|
35
|
+
}];
|
|
36
|
+
};
|
|
37
|
+
readonly level: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
readonly enum: readonly ["structural", "policy", "full"];
|
|
40
|
+
readonly description: "Verification depth. 'structural' = schema + digest (steps 1+2). 'policy' (default) = + Context CI policy (steps 1+2+7). 'full' = + signature/cert/Rekor (steps 1-7; steps 3-6 stubbed in v0.1).";
|
|
41
|
+
};
|
|
42
|
+
readonly strict: {
|
|
43
|
+
readonly type: "boolean";
|
|
44
|
+
readonly description: "Treat predicate WARN verdicts as FAIL during policy evaluation.";
|
|
45
|
+
};
|
|
46
|
+
readonly allow_fail_for: {
|
|
47
|
+
readonly type: "array";
|
|
48
|
+
readonly items: {
|
|
49
|
+
readonly type: "string";
|
|
50
|
+
};
|
|
51
|
+
readonly description: "Detector names, CCI IDs, or threat categories that are permitted to FAIL without rejecting the bundle.";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "scan_text";
|
|
57
|
+
readonly description: "Run the PrimitiveHub Context CI Top 10 v0.1 detectors (T1 prompt-injection, T2 Unicode-steganography, T5 unsafe-shell-install) against a string. Pure-local scan; no network. Returns per-detector verdicts, post-policy. Use this BEFORE loading any agent-context content from an untrusted source.";
|
|
58
|
+
readonly inputSchema: {
|
|
59
|
+
readonly type: "object";
|
|
60
|
+
readonly additionalProperties: false;
|
|
61
|
+
readonly required: readonly ["content"];
|
|
62
|
+
readonly properties: {
|
|
63
|
+
readonly content: {
|
|
64
|
+
readonly type: "string";
|
|
65
|
+
readonly description: "The text to scan (typically markdown — AGENTS.md, CLAUDE.md, .cursorrules, a skill body, etc.).";
|
|
66
|
+
};
|
|
67
|
+
readonly filename: {
|
|
68
|
+
readonly type: "string";
|
|
69
|
+
readonly description: "Optional filename for the content (used for policy matching against per-file allow rules). Defaults to '<inline>'.";
|
|
70
|
+
};
|
|
71
|
+
readonly detectors: {
|
|
72
|
+
readonly type: "array";
|
|
73
|
+
readonly items: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
};
|
|
76
|
+
readonly description: "Restrict to specific detectors. Accepts detector names (t1.prompt_injection), CCI IDs (CCI-001), or threat categories (T1). Empty/omitted = all.";
|
|
77
|
+
};
|
|
78
|
+
readonly strict: {
|
|
79
|
+
readonly type: "boolean";
|
|
80
|
+
readonly description: "Treat WARN verdicts as FAIL for the policy exit code.";
|
|
81
|
+
};
|
|
82
|
+
readonly policy_path: {
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly description: "Path to a .primitivehub/policy.yaml file (ADR-0018). Without this: auto-discover from cwd → git root, fall back to implicit default.";
|
|
85
|
+
};
|
|
86
|
+
readonly allow_fail: {
|
|
87
|
+
readonly type: "array";
|
|
88
|
+
readonly items: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
};
|
|
91
|
+
readonly description: "Detector/CCI/threat IDs permitted to FAIL without rejecting the scan. Appended to policy.allow as synthetic entries.";
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
}, {
|
|
96
|
+
readonly name: "audit_workspace";
|
|
97
|
+
readonly description: "Recursively discover, classify, and scan every agent-context artifact (AGENTS.md, CLAUDE.md, .cursorrules, .claude/skills/**, mcp.json, …) under a root path. Reuses the same T1/T2/T5 detector roster as scan_text. Returns inventory + per-artifact verdicts + project-level summary. Use this as the active default — file-at-a-time scanning can't defend against files the agent didn't know about.";
|
|
98
|
+
readonly inputSchema: {
|
|
99
|
+
readonly type: "object";
|
|
100
|
+
readonly additionalProperties: false;
|
|
101
|
+
readonly properties: {
|
|
102
|
+
readonly root: {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
readonly description: "Directory to audit. Defaults to the server's cwd.";
|
|
105
|
+
};
|
|
106
|
+
readonly max_files: {
|
|
107
|
+
readonly type: "number";
|
|
108
|
+
readonly description: "Hard cap on artifacts traversed. Default 10000.";
|
|
109
|
+
};
|
|
110
|
+
readonly max_depth: {
|
|
111
|
+
readonly type: "number";
|
|
112
|
+
readonly description: "Maximum directory depth from root. Default 16.";
|
|
113
|
+
};
|
|
114
|
+
readonly strict: {
|
|
115
|
+
readonly type: "boolean";
|
|
116
|
+
readonly description: "Treat WARN verdicts as FAIL.";
|
|
117
|
+
};
|
|
118
|
+
readonly detectors: {
|
|
119
|
+
readonly type: "array";
|
|
120
|
+
readonly items: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
};
|
|
123
|
+
readonly description: "Restrict to specific detectors. Accepts names / CCI IDs / threat categories.";
|
|
124
|
+
};
|
|
125
|
+
readonly policy_path: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly description: "Path to a .primitivehub/policy.yaml. Without this: auto-discover from cwd → git root.";
|
|
128
|
+
};
|
|
129
|
+
readonly allow_fail: {
|
|
130
|
+
readonly type: "array";
|
|
131
|
+
readonly items: {
|
|
132
|
+
readonly type: "string";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "check_lock";
|
|
139
|
+
readonly description: "Compare the workspace against .primitivehub/phub.lock and report drift (added / modified / removed / reclassified artifacts). Use this BEFORE consuming any agent-context primitive — drift means an artifact changed since the operator last sealed it. Returns drift summary; the agent decides whether to proceed.";
|
|
140
|
+
readonly inputSchema: {
|
|
141
|
+
readonly type: "object";
|
|
142
|
+
readonly additionalProperties: false;
|
|
143
|
+
readonly properties: {
|
|
144
|
+
readonly root: {
|
|
145
|
+
readonly type: "string";
|
|
146
|
+
readonly description: "Workspace root to check. Defaults to server cwd.";
|
|
147
|
+
};
|
|
148
|
+
readonly lock_path: {
|
|
149
|
+
readonly type: "string";
|
|
150
|
+
readonly description: "Override the auto-discovered lock path. Without this: ./.primitivehub/phub.lock.";
|
|
151
|
+
};
|
|
152
|
+
readonly policy_path: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly description: "Policy file path (same semantics as scan_text/audit_workspace).";
|
|
155
|
+
};
|
|
156
|
+
readonly max_files: {
|
|
157
|
+
readonly type: "number";
|
|
158
|
+
readonly description: "Hard cap on artifacts walked. Default 10000.";
|
|
159
|
+
};
|
|
160
|
+
readonly max_depth: {
|
|
161
|
+
readonly type: "number";
|
|
162
|
+
readonly description: "Max directory depth. Default 16.";
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
}, {
|
|
167
|
+
readonly name: "verify_before_load";
|
|
168
|
+
readonly description: "Composite runtime gate. Call this BEFORE loading any agent-context primitive — refuses-by-default for drift, unattested artifacts, scanner findings, or invalid Trust Bundles. Returns {safe, reasons[], checks}. The composite of check_lock + scan_text + (optional) verify_bundle.";
|
|
169
|
+
readonly inputSchema: {
|
|
170
|
+
readonly type: "object";
|
|
171
|
+
readonly additionalProperties: false;
|
|
172
|
+
readonly required: readonly ["path"];
|
|
173
|
+
readonly properties: {
|
|
174
|
+
readonly path: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
readonly description: "The artifact path to gate (relative to workspace_root, or absolute). The agent's 'I'm about to read this file' anchor.";
|
|
177
|
+
};
|
|
178
|
+
readonly workspace_root: {
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
readonly description: "Workspace root. Defaults to the server's cwd.";
|
|
181
|
+
};
|
|
182
|
+
readonly policy_path: {
|
|
183
|
+
readonly type: "string";
|
|
184
|
+
readonly description: "Path to .primitivehub/policy.yaml. Auto-discover if absent.";
|
|
185
|
+
};
|
|
186
|
+
readonly lock_path: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly description: "Explicit lock path. Auto-discover if absent.";
|
|
189
|
+
};
|
|
190
|
+
readonly require_attestation: {
|
|
191
|
+
readonly type: "boolean";
|
|
192
|
+
readonly description: "If true, an 'unattested' lock entry counts as unsafe. Use when consuming registry primitives that should carry rekor:* or registry:* attestations. Default false (matches v0.1 lock semantics).";
|
|
193
|
+
};
|
|
194
|
+
readonly bundle: {
|
|
195
|
+
readonly description: "Optional Trust Bundle (JSON string OR parsed object). When provided, verify_bundle runs at the requested level and contributes its failures to the unsafe reasons.";
|
|
196
|
+
readonly oneOf: readonly [{
|
|
197
|
+
readonly type: "string";
|
|
198
|
+
}, {
|
|
199
|
+
readonly type: "object";
|
|
200
|
+
}];
|
|
201
|
+
};
|
|
202
|
+
readonly level: {
|
|
203
|
+
readonly type: "string";
|
|
204
|
+
readonly enum: readonly ["structural", "policy", "full"];
|
|
205
|
+
readonly description: "Bundle verification depth. Only meaningful when 'bundle' is provided. Default 'policy'.";
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
}];
|
|
210
|
+
/** Build a configured but not-yet-connected MCP server. */
|
|
211
|
+
export declare function buildServer(): Server;
|
|
212
|
+
/** Connect over stdio. Used by `bin/primitivehub-mcp.js`. */
|
|
213
|
+
export declare function runStdio(): Promise<void>;
|
|
214
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAalE,eAAO,MAAM,WAAW,iBAAiB,CAAA;AACzC,eAAO,MAAM,cAAc,UAAU,CAAA;AAErC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMR,CAAA;AAEV,2DAA2D;AAC3D,wBAAgB,WAAW,IAAI,MAAM,CAsCpC;AAED,6DAA6D;AAC7D,wBAAsB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAI9C"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @primitivehub/mcp-server — Model Context Protocol server exposing
|
|
3
|
+
* PrimitiveHub verification + scanning to AI agents.
|
|
4
|
+
*
|
|
5
|
+
* Zero custom trust logic (Gate G-D acceptance criterion). Every
|
|
6
|
+
* tool is a pure transport over an existing primitive:
|
|
7
|
+
*
|
|
8
|
+
* verify_bundle → @primitivehub/verify (ADR-0020)
|
|
9
|
+
* scan_text → @primitivehub/phub runScan (ADR-0023)
|
|
10
|
+
* audit_workspace → @primitivehub/phub runAudit (ADR-0025)
|
|
11
|
+
* check_lock → @primitivehub/phub runAudit + lockMode:check (ADR-0026)
|
|
12
|
+
*
|
|
13
|
+
* If the verifier changes its behavior, the MCP server inherits it.
|
|
14
|
+
* If the scanner roster expands (T3/T4/T6..T10), the MCP server
|
|
15
|
+
* surfaces it automatically. The trust chain has one authoritative
|
|
16
|
+
* implementation; this package is just a wire format.
|
|
17
|
+
*/
|
|
18
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
19
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
20
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
21
|
+
import { AUDIT_WORKSPACE_TOOL, callAuditWorkspace } from "./tools/audit-workspace.js";
|
|
22
|
+
import { CHECK_LOCK_TOOL, callCheckLock } from "./tools/check-lock.js";
|
|
23
|
+
import { SCAN_TEXT_TOOL, callScanText } from "./tools/scan-text.js";
|
|
24
|
+
import { VERIFY_BEFORE_LOAD_TOOL, callVerifyBeforeLoad } from "./tools/verify-before-load.js";
|
|
25
|
+
import { VERIFY_BUNDLE_TOOL, callVerifyBundle } from "./tools/verify-bundle.js";
|
|
26
|
+
export const SERVER_NAME = "primitivehub";
|
|
27
|
+
export const SERVER_VERSION = "0.1.0";
|
|
28
|
+
export const TOOLS = [
|
|
29
|
+
VERIFY_BUNDLE_TOOL,
|
|
30
|
+
SCAN_TEXT_TOOL,
|
|
31
|
+
AUDIT_WORKSPACE_TOOL,
|
|
32
|
+
CHECK_LOCK_TOOL,
|
|
33
|
+
VERIFY_BEFORE_LOAD_TOOL,
|
|
34
|
+
];
|
|
35
|
+
/** Build a configured but not-yet-connected MCP server. */
|
|
36
|
+
export function buildServer() {
|
|
37
|
+
const server = new Server({ name: SERVER_NAME, version: SERVER_VERSION }, { capabilities: { tools: {} } });
|
|
38
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
39
|
+
tools: TOOLS,
|
|
40
|
+
}));
|
|
41
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
42
|
+
const { name, arguments: rawArgs } = request.params;
|
|
43
|
+
switch (name) {
|
|
44
|
+
case "verify_bundle":
|
|
45
|
+
return await callVerifyBundle(rawArgs);
|
|
46
|
+
case "scan_text":
|
|
47
|
+
return callScanText(rawArgs);
|
|
48
|
+
case "audit_workspace":
|
|
49
|
+
return callAuditWorkspace(rawArgs);
|
|
50
|
+
case "check_lock":
|
|
51
|
+
return callCheckLock(rawArgs);
|
|
52
|
+
case "verify_before_load":
|
|
53
|
+
return await callVerifyBeforeLoad(rawArgs);
|
|
54
|
+
default:
|
|
55
|
+
return {
|
|
56
|
+
content: [
|
|
57
|
+
{ type: "text", text: JSON.stringify({ error: `unknown tool: ${name}` }, null, 2) },
|
|
58
|
+
],
|
|
59
|
+
isError: true,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return server;
|
|
64
|
+
}
|
|
65
|
+
/** Connect over stdio. Used by `bin/primitivehub-mcp.js`. */
|
|
66
|
+
export async function runStdio() {
|
|
67
|
+
const server = buildServer();
|
|
68
|
+
const transport = new StdioServerTransport();
|
|
69
|
+
await server.connect(transport);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACrF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAC7F,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE/E,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAA;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAA;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,kBAAkB;IAClB,cAAc;IACd,oBAAoB;IACpB,eAAe;IACf,uBAAuB;CACf,CAAA;AAEV,2DAA2D;AAC3D,MAAM,UAAU,WAAW;IACzB,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,EAC9C,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAChC,CAAA;IAED,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QAC5D,KAAK,EAAE,KAIL;KACH,CAAC,CAAC,CAAA;IAEH,MAAM,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAChE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAA;QACnD,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,eAAe;gBAClB,OAAO,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAA;YACxC,KAAK,WAAW;gBACd,OAAO,YAAY,CAAC,OAAO,CAAC,CAAA;YAC9B,KAAK,iBAAiB;gBACpB,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAA;YACpC,KAAK,YAAY;gBACf,OAAO,aAAa,CAAC,OAAO,CAAC,CAAA;YAC/B,KAAK,oBAAoB;gBACvB,OAAO,MAAM,oBAAoB,CAAC,OAAO,CAAC,CAAA;YAC5C;gBACE,OAAO;oBACL,OAAO,EAAE;wBACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,iBAAiB,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;qBACpF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAA;QACL,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC;AAED,6DAA6D;AAC7D,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,MAAM,MAAM,GAAG,WAAW,EAAE,CAAA;IAC5B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAA;IAC5C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;AACjC,CAAC"}
|