privacy-gate 0.3.1 (siml1169, #838): guide mode names a fixed coarse media class (image, pdf, office, audio, video, unknown) instead of copying the part's media_type into the prompt, so no clipped or fake MIME prefix can reach the vendor. Parameters are stripped first, a candidate over 256 characters is ignored before it is normalised, and the part's kind is the fallback. Bytes are still withheld. Fixes #795. Reviewed at 2b74b6e69ecaf0d20bd9f5fd4580f673da266736 (base = main b8100001; mote, Bun 1.4.2, temp HOME): - packages/privacy-gate `bun test`: 67 pass, 0 fail - `bun scripts/check.mjs privacy-gate` and `bun scripts/check.mjs`: ok - repo root `bun test`: 6822 pass, 20 skip, 0 fail - broken by hand: main's middleware 10 red; no 256 guard, no parameter strip, no office mapping, no kind fallback each 1 red (its own case); echoing the raw candidate 9 red - CI run 42377224277 green Not tried: a real guide-mode request through magpie.
49 lines
1.3 KiB
JSON
49 lines
1.3 KiB
JSON
{
|
|
"name": "@magpie-community/middleware-privacy-gate",
|
|
"version": "0.3.1",
|
|
"description": "Structural egress gate for Magpie: withholds or rejects image/file/audio parts, encoded blobs and disallowed models, and guides agents toward local extraction when Magpie cannot mask text. Companion to ShyPie for DeepSeek Harness.",
|
|
"type": "module",
|
|
"files": [
|
|
"privacy-gate.middleware.js",
|
|
"README.md",
|
|
"BRAND.md",
|
|
"assets",
|
|
"docs"
|
|
],
|
|
"keywords": [
|
|
"magpie",
|
|
"magpie-middleware",
|
|
"gateway-middleware",
|
|
"privacy",
|
|
"pii",
|
|
"dlp",
|
|
"security",
|
|
"shypie"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/privacy-gate"
|
|
},
|
|
"magpie": {
|
|
"middleware": "./privacy-gate.middleware.js",
|
|
"icon": "https://raw.githubusercontent.com/magpie-community/plugins/main/packages/privacy-gate/assets/shypie-icon.svg",
|
|
"options": {
|
|
"allowModels": [],
|
|
"localModels": [],
|
|
"localProviders": [],
|
|
"binaryPolicy": "fail",
|
|
"guideTools": [],
|
|
"allowUnknownProtocol": false,
|
|
"blobBase64Chars": 400,
|
|
"blobHexChars": 400,
|
|
"scanChars": 200000,
|
|
"maxNodes": 40000,
|
|
"maxDepth": 40,
|
|
"logMaxLines": 40,
|
|
"logEveryRows": 50
|
|
}
|
|
}
|
|
}
|