Repository navigation
feat: declare tool effects, argument sensitivity and egress hosts on every plugin tool - #78
Merged
Merged
Conversation
Every AI_TOOLS entry now declares what it does (plugin-sdk#50): - every tool except network_reconcile is a pure read: effect "read", idempotent, and `hosts` set to the hosts fixed in code; - network_reconcile is "destructive" and not idempotent. It rewrites and reloads the telegraf managed region, upserts the inventory and graph, publishes change events, and deletes stale inventory rows and graph nodes; - news get_news and network_scan leave out `hosts`, because they reach operator-configured hosts. portfolio's read-back declares `hosts: []` because it only reads the platform store; - model-written search text (arxiv/openlibrary query, wikipedia topic, weather location) is marked free_text, and frankfurter's amount is marked amount. Bump the dev SDK pin to the plugin-sdk#50 merge commit so CI validates the new fields. Add tests/test_tool_effects.py, which fails on a missing or contradicted effect (validate only warns about these) and pins the non-read tools. Closes #77 Agent-Session: zuhal-dev1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Driven by session Recorded by |
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
Every
AI_TOOLSentry in the catalog now declares the tool effect fields from minderhq/plugin-sdk#50:effect,idempotent,hostsand argumentsensitivity. A host can then run reads straight away and ask the user before running anything that changes data. I chose each declaration by reading the action that backs the tool, not its name.[](platform store only)telegrafandwebcrawlhave noAI_TOOLS.Why network_reconcile is destructive
It runs a full cycle:
The deletions put it in the most consequential class. It isn't idempotent, because change events and pruning depend on the previous cycle and on the clock.
Read tools that also write in the background
The crypto, frankfurter, github, news, tefas_funds and weather plugins write time series, but only from
collect_data/refresh, which are not AI tools. Their tools only fetch.network_scanprobes the configured targets (nmap, SNMP gets) and keeps the result in memory. It writes to no store, so it's declaredread.Tools without
hostsI didn't guess hosts for tools that connect to operator-configured hosts. In none of these cases is the URL a tool argument, so there is no
urlargument to mark:NEWS_FEEDSURLs from the plugin config. The plugin-levelEGRESS = "public"covers them.NETWORK_SCAN_TARGETS) and the backend URLs passed in the plugin config. The plugin-levelEGRESS = "lan"covers them.WEATHER_API_BASE/WEATHER_GEOCODE_BASEenvironment variables. A comment next to the declaration says so.Sensitivity
Arguments that carry model-written natural-language text to a third party are marked
free_text: search queries, the topic, the location. These are the arguments a model could use to leak context. Constrained identifiers are left unmarked: theowner/repo(matched against a regex), coin symbol, fund code and currency codes. frankfurter'samountis markedamount. No tool has a recipient or URL argument.Other changes
pyproject.toml: the dev SDK pin moves from0861d974to the plugin-sdk#50 merge commitf44873fcada50f17cc38d26089837d4d1a6227ec. The new commit descends from the old one. No release tag includes ci: run push CI on GitHub-hosted, not self-hosted #50 yet.tests/test_tool_effects.py:minder-plugin validateonly warns about a missing or contradicted effect. This test makes both a CI failure, checks that every read is idempotent, and pins the one non-read tool.CONTRIBUTING.md: one sentence telling contributors to declare the fields.catalog.jsondoesn't change, because its tool definitions don't include the effect fields and the SDK stripssensitivity.gen_catalog.py --checkpasses.Validation
Run locally on the new SDK pin:
minder-plugin validate <plugin>/__init__.pyfor all 14 plugins: all OK, with no warnings. Before this change, 13 tools had missing-effect warnings.pytest -q: 628 passed. That includes 28 new tests.black --check .: clean.flake8 --max-line-length=100 --extend-ignore=E203,W503 .: clean.mypy .: no issues in 18 source files.python scripts/gen_catalog.py --check: up to date.python scripts/check_plugin_policy.py: OK.Closes #77
Agent-Session: zuhal-dev1
🤖 Generated with Claude Code