Repository navigation
feat(t0): minder_api step for tools that declare minder_scopes - #59
Merged
Merged
Conversation
A declarative step may now be `minder_api: {route, method, query, body}`
instead of `request`. The engine runs it through the invocation's
`ctx.minder` handle (capability `minder.api`), not the plugin's egress. Its
parsed answer is the step's result, as with an HTTP step, so select, when,
foreach, steps.<name> and the output mapping work the same way. It counts
toward the per-invocation request cap.
The engine refuses these at load:
- a minder_api step in an action, in the schedule, or in a tool without
minder_scopes (minder_scopes is new on a declarative tool);
- an unknown or repeated scope;
- a route that does not start with /v1/, or that has a query, a fragment or
an empty, '.' or '..' segment;
- a method other than GET/POST, or a body on GET;
- a step with both or neither of request and minder_api.
Invocation gains `minder`; without it the step raises CapabilityDenied.
The declarative schema gains `minderApi`, `step.minder_api` (oneOf with
`request`) and `operation.minder_scopes`, and it refuses minder_api in
actions and the schedule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Driven by session |
…in the schema - The engine now runs the load-time segment check again on the rendered route. An empty placeholder value would otherwise leave an empty segment. It raises MappingError before any call is made. This replaces a check that could never fire. - In the schema, minderApi refuses a non-null body when the method is GET (including the GET default), as the engine does. - README and CHANGELOG: a minder_api result can feed a later request step, so the data can reach the plugin's egress hosts. A tool whose plugin declares egress counts as egressing for local-only content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resinder
added a commit
to minderhq/docs
that referenced
this pull request
Nov 7, 2026
Keeps the copy byte-identical with minderhq/plugin-sdk#59 at a2f87f31. Agent-Session: zeynep-portainer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
A declarative (T0) tool can now call Minder's own API with a
minder_apistep instead of an HTTPrequest.Execution: the engine calls the invocation's
ctx.minderhandle (ctx.minder.call(route, method=, query=, json=), capabilityminder.api).Invocationgainsminder. When it is unbound, for example inminder-plugin try, the step raisesCapabilityDenied.Results: the parsed answer is the step's result, as with an HTTP step.
select,when,foreach,steps.<name>placeholders and JMESPath output mappings all work the same way.Egress: this step is not external egress. It uses no egress rule, DNS lookup, rate limit or concurrency slot. It does count toward the per-invocation request cap.
Placeholders: route placeholders are path-encoded like
request.path(/,.and..are escaped). Query and body use the same templates asrequest.Refused at load (
ManifestError):minder_apistep in a tool withoutminder_scopes, in an action or in the schedule;minder_scopeson an action, an unknown scope (fromcontext.MINDER_SCOPES), or a repeated scope;/v1/, or that has?/#or an empty,.or..segment;requestandminder_api.Compiled model:
Step.requestis nowOptional, and the newStep.minderholds aMinderCall.Operation.minder_scopeslets the host serve the scopes with the AI tool, so the platform grantsminder.apifor them.Schema (
declarative-manifest.schema.json):minderApidefinition;step.minder_api(oneOfwithrequest);operation.minder_scopes(an enum of the scopes,uniqueItems);minder_api.The engine model and the schema stay field-for-field equal.
README (the T0 section), CHANGELOG "Unreleased", and the
every_field.ymlfixture (apassagestool).Compatibility
Step.requestis nowOptional[Request]. A host that readsstep.requestdirectly should checkstep.minderfirst.Validation
black --check src tests examples: clean.flake8 --max-line-length=100 --extend-ignore=E203,W503 src tests examples: clean.mypy src(strict): no issues.pytest tests: 1219 passed.New tests:
FakePlatformContext: a POST with query and body, the path-encoded route, the result chained into an HTTP step and the output mapping, and no DNS or egress for the Minder call.minder_scopes, an action, the schedule;minder_api;minder_apiin an action or the schedule,minder_scopeson an action;body: null.Review follow-up (a2f87f3)
.and..segments and raisesMappingErrorbefore any call. This replaces a check that could never fire. New test: an empty placeholder value is refused before the call.minderApirefuses a non-null body when the method is GET (including the GET default), as the engine does.minder_apiresult can feed a laterrequeststep, so the data can reach the plugin's egress hosts. A tool whose plugin declares egress counts as egressing for local-only content.Merge order
Merge this first. The host bumps its SDK pin and serves the tool's
minder_scopesafterwards. The published docs copy of the declarative schema must then be updated to stay byte-identical.🤖 Generated with Claude Code