Add invinoveritas_review tool: independent review before irreversible actions#2086
Open
babyblueviper1 wants to merge 1 commit into
Open
Add invinoveritas_review tool: independent review before irreversible actions#2086babyblueviper1 wants to merge 1 commit into
babyblueviper1 wants to merge 1 commit into
Conversation
… actions
New tool (metagpt/tools/libs/invinoveritas_review.py) + registration in
tools/libs/__init__.py -- no other files changed.
Terminal's forbidden_commands is a 2-entry hardcoded denylist ("run dev",
"serve "). This tool is the general-purpose check for everything that
list doesn't cover: sends the exact artifact (a shell command, a git
diff, a config change) to invinoveritas (https://api.babyblueviper.com),
an independent, model-agnostic reviewer, and returns a structured verdict
(approve / approve_with_concerns / reject) + ranked issues before the
agent proceeds. Free registration returns an api_key with trial calls;
no crypto/payment setup needed to try it.
Verified before submitting (real calls against the live API, not mocks):
- A genuine risky command (`rm -rf /var/log/*.log && systemctl restart
nginx`) -> verdict=approve_with_concerns, confidence=0.85, correctly
flagging the log-data-loss risk.
- Missing INVINOVERITAS_API_KEY -> the documented
{"verdict": "unavailable", ...} fallback, not an exception.
- Ran the actual submitted function (stubbed only
metagpt.tools.tool_registry.register_tool so it imports without the
full framework install; the httpx call + response-shaping logic is the
real, unmodified code).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New tool,
invinoveritas_review(metagpt/tools/libs/invinoveritas_review.py), registered intools/libs/__init__.pyalongsideterminal/editor/browser/deployer/git— no other files changed.Why
Terminal.forbidden_commandsis a small, hardcoded denylist ("run dev","serve "today). It's a good first line of defense, but it can only catch the exact patterns someone thought to list — anything else (a broadrm -rf, a destructive SQL migration, an unboundedchmod, a risky deploy config) passes through unchecked.This tool is the general-purpose complement: sends the exact artifact (a shell command, a git diff, a config change) to invinoveritas — an independent, model-agnostic reviewer — and returns a structured verdict (
approve/approve_with_concerns/reject) + ranked issues, so an agent can check something novel beforeTerminal.run_commandorDeployer.deploy_to_public, not just the two hardcoded strings.Free registration (
/register) returns anapi_keywith trial calls per tool; no crypto/payment setup needed to try it.Verified before submitting
Real calls against the live API, not mocks:
Ran the actual submitted function end-to-end (stubbed only
metagpt.tools.tool_registry.register_toolso it imports without the full framework install — thehttpxcall and response-shaping logic is the real, unmodified code).Happy to adjust naming/placement/style to match project conventions more closely.