@miraigent/free-ai-ops-mcp 0.1.31 → 0.1.33
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 +16 -0
- package/README.md +20 -0
- package/package.json +1 -1
- package/scripts/smoke-test.mjs +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.33] - 2026-07-08
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Added a minimal README parsing example that shows MCP users how to read the
|
|
8
|
+
JSON tool result from `content[0].text` before wiring the package into a
|
|
9
|
+
desktop client or private workflow.
|
|
10
|
+
|
|
11
|
+
## [0.1.32] - 2026-07-07
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added smoke-test assertions that parse MCP tool results from
|
|
16
|
+
`content[0].text` as JSON and verify exact public fields for the human review
|
|
17
|
+
and prompt risk JSON-RPC sessions.
|
|
18
|
+
|
|
3
19
|
## [0.1.31] - 2026-07-06
|
|
4
20
|
|
|
5
21
|
### Changed
|
package/README.md
CHANGED
|
@@ -136,6 +136,26 @@ files.
|
|
|
136
136
|
After the smoke test runs, look for the status field from the tool you called
|
|
137
137
|
before changing client configuration or private workflows.
|
|
138
138
|
|
|
139
|
+
In raw JSON-RPC output, MCP wraps each tool result inside `content[0].text`.
|
|
140
|
+
Parse that text value as JSON before you check the returned decision:
|
|
141
|
+
|
|
142
|
+
const response = JSON.parse(lineFromStdout);
|
|
143
|
+
const toolResult = JSON.parse(response.result.content[0].text);
|
|
144
|
+
console.log(toolResult.gateStatus);
|
|
145
|
+
|
|
146
|
+
For the bundled smoke-test session, that prints `stop`. Use the parsed
|
|
147
|
+
`gateStatus`, `recommendation`, or `recommendedStatus` field from the relevant
|
|
148
|
+
tool before changing a desktop MCP client config or connecting private data.
|
|
149
|
+
|
|
150
|
+
If you only need a terminal check, you can copy the final JSON-RPC line from the
|
|
151
|
+
smoke-test output and inspect the wrapped text field with Node:
|
|
152
|
+
|
|
153
|
+
node -e 'const r=JSON.parse(process.argv[1]); console.log(JSON.parse(r.result.content[0].text));' '<paste one response line here>'
|
|
154
|
+
|
|
155
|
+
Paste only the synthetic response from the public example. Do not paste private
|
|
156
|
+
customer records or desktop client logs into shell history, screenshots, or
|
|
157
|
+
GitHub issues.
|
|
158
|
+
|
|
139
159
|
For `human_review_gate`:
|
|
140
160
|
|
|
141
161
|
- `auto_ok`: the synthetic draft looks low risk, but the tool still does not
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miraigent/free-ai-ops-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "Free MCP server for developers adding human review gates, prompt risk checks, FAQ review, and CRM note safety to AI tools.",
|
|
5
5
|
"homepage": "https://github.com/Miraigent/miraigent-free-ai-ops-mcp",
|
|
6
6
|
"type": "module",
|
package/scripts/smoke-test.mjs
CHANGED
|
@@ -174,6 +174,11 @@ assert.deepEqual(
|
|
|
174
174
|
assert.match(sampleResponses[2].result.content[0].text, /gateStatus/);
|
|
175
175
|
assert.match(sampleResponses[2].result.content[0].text, /reviewOwner/);
|
|
176
176
|
assert.match(sampleResponses[2].result.content[0].text, /boundary/);
|
|
177
|
+
const sampleToolResult = JSON.parse(sampleResponses[2].result.content[0].text);
|
|
178
|
+
assert.equal(sampleToolResult.tool, 'human_review_gate');
|
|
179
|
+
assert.equal(sampleToolResult.gateStatus, 'stop');
|
|
180
|
+
assert.equal(sampleToolResult.nextLogRow.gate_status, 'stop');
|
|
181
|
+
assert.equal(sampleToolResult.boundary, 'This tool is a review helper. It does not send messages.');
|
|
177
182
|
|
|
178
183
|
const promptRiskSession = await readFile(
|
|
179
184
|
new URL('../examples/prompt-risk-json-rpc-session/sample-session.jsonl', import.meta.url),
|
|
@@ -192,3 +197,11 @@ assert.match(promptRiskResponses[2].result.content[0].text, /prompt_risk_review/
|
|
|
192
197
|
assert.match(promptRiskResponses[2].result.content[0].text, /stop_before_ai_use/);
|
|
193
198
|
assert.match(promptRiskResponses[2].result.content[0].text, /customer_facing/);
|
|
194
199
|
assert.match(promptRiskResponses[2].result.content[0].text, /sensitive_data_possible/);
|
|
200
|
+
const promptRiskToolResult = JSON.parse(promptRiskResponses[2].result.content[0].text);
|
|
201
|
+
assert.equal(promptRiskToolResult.tool, 'prompt_risk_review');
|
|
202
|
+
assert.equal(promptRiskToolResult.recommendation, 'stop_before_ai_use');
|
|
203
|
+
assert.deepEqual(promptRiskToolResult.riskFlags, ['customer_facing', 'sensitive_data_possible']);
|
|
204
|
+
assert.equal(
|
|
205
|
+
promptRiskToolResult.boundary,
|
|
206
|
+
'This tool is a prompt risk helper. It is not legal advice and does not call an AI API.'
|
|
207
|
+
);
|