From 437262f577f9da2117ad05e23167ecbedfd12a30 Mon Sep 17 00:00:00 2001 From: Resinder <18302831+Resinder@users.noreply.github.com> Date: Sat, 7 Nov 2026 07:56:24 +0300 Subject: [PATCH 1/2] docs(plugins): sync the declarative schema with the SDK minder_api step A declarative tool that declares minder_scopes may use a minder_api step (route, method, query, body) to call Minder's own API instead of an HTTP request. The schema gains the minderApi definition, step.minder_api and operation.minder_scopes. This keeps the copy byte-identical with minderhq/plugin-sdk#59. Agent-Session: zeynep-portainer Co-Authored-By: Claude Opus 5.5 --- .../declarative-manifest.v1alpha1.json | 132 ++++++++++++++++-- 1 file changed, 124 insertions(+), 8 deletions(-) diff --git a/docs/schemas/declarative-manifest.v1alpha1.json b/docs/schemas/declarative-manifest.v1alpha1.json index 9dcd516..0a33c9a 100644 --- a/docs/schemas/declarative-manifest.v1alpha1.json +++ b/docs/schemas/declarative-manifest.v1alpha1.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://minderhq.github.io/docs/schemas/declarative-manifest.v1alpha1.json", "title": "Minder Declarative Connector Manifest", - "description": "A declarative (T0) connector: HTTP tools, actions, a schedule and an inbound webhook expressed as data, run by Minder's connector engine with no plugin code. This schema checks the structure. At load the engine also checks what JSON Schema cannot express: every base host is in the declared egress, placeholders and JMESPath expressions compile, auth fields fit the auth type, step names are unique, measurements are declared, a webhook action exists and takes a 'body' parameter, and at most 32 tools and actions in total.", + "description": "A declarative (T0) connector: HTTP tools, actions, a schedule and an inbound webhook expressed as data, run by Minder's connector engine with no plugin code. This schema checks the structure. At load the engine also checks what JSON Schema cannot express: every base host is in the declared egress, placeholders and JMESPath expressions compile, auth fields fit the auth type, step names are unique, a minder_api step appears only in a tool that declares minder_scopes and its route has no empty, '.' or '..' segment, no minder_scopes entry is listed twice, measurements are declared, a webhook action exists and takes a 'body' parameter, and at most 32 tools and actions in total.", "type": "object", "required": [ "apiVersion", @@ -225,12 +225,25 @@ "properties": { "effect": { "type": "null" + }, + "minder_scopes": { + "maxItems": 0 + }, + "steps": { + "type": "array", + "items": { + "properties": { + "minder_api": { + "type": "null" + } + } + } } } } ] }, - "description": "Actions (not exposed as AI tools). An action declares no effect." + "description": "Actions (not exposed as AI tools). An action declares no effect, no minder_scopes and no minder_api step." }, "schedule": { "anyOf": [ @@ -632,11 +645,47 @@ }, "additionalProperties": false }, + "minderApi": { + "type": "object", + "description": "A call to Minder's own API through the platform's minder.api capability, as the invoking user and for the tool's approved minder_scopes. Not external egress.", + "required": [ + "route" + ], + "properties": { + "route": { + "type": "string", + "minLength": 4, + "maxLength": 2048, + "pattern": "^/v1/[^?#]*$", + "description": "A plugin-callable Minder route, starting with '/v1/'; placeholders are path-encoded." + }, + "method": { + "enum": [ + "GET", + "POST" + ], + "default": "GET" + }, + "query": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean" + ] + } + }, + "body": { + "description": "The JSON request body (POST only); string values are placeholders." + } + }, + "additionalProperties": false + }, "step": { "type": "object", "required": [ - "name", - "request" + "name" ], "properties": { "name": { @@ -644,7 +693,24 @@ "pattern": "^[a-z][a-z0-9_]{0,63}$" }, "request": { - "$ref": "#/definitions/request" + "anyOf": [ + { + "$ref": "#/definitions/request" + }, + { + "type": "null" + } + ] + }, + "minder_api": { + "anyOf": [ + { + "$ref": "#/definitions/minderApi" + }, + { + "type": "null" + } + ] }, "when": { "anyOf": [ @@ -686,7 +752,30 @@ ] } }, - "additionalProperties": false + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "request" + ], + "properties": { + "request": { + "type": "object" + } + } + }, + { + "required": [ + "minder_api" + ], + "properties": { + "minder_api": { + "type": "object" + } + } + } + ], + "description": "One step: an HTTP 'request' through the plugin's egress, or a 'minder_api' call to Minder's own API (not egress). Exactly one of the two." }, "timeseriesWrite": { "type": "object", @@ -831,6 +920,21 @@ "type": "null" } ] + }, + "minder_scopes": { + "type": "array", + "uniqueItems": true, + "items": { + "enum": [ + "conversation.read_current", + "kb.documents.ingest", + "kb.read_passage", + "kb.search", + "ticket.create_internal", + "user.profile.basic" + ] + }, + "description": "Tools only: the Minder API scopes its minder_api steps use." } }, "additionalProperties": false @@ -872,8 +976,20 @@ "minItems": 1, "maxItems": 3, "items": { - "$ref": "#/definitions/step" - } + "allOf": [ + { + "$ref": "#/definitions/step" + }, + { + "properties": { + "minder_api": { + "type": "null" + } + } + } + ] + }, + "description": "The schedule's steps; no minder_api step (that is for AI tools only)." }, "measurement": { "type": "string", From 6df557aaa24ec3dc0cd98e4873c271d7c81266ce Mon Sep 17 00:00:00 2001 From: Resinder <18302831+Resinder@users.noreply.github.com> Date: Sat, 7 Nov 2026 08:09:26 +0300 Subject: [PATCH 2/2] docs(plugins): re-sync the declarative schema (body refused on GET) Keeps the copy byte-identical with minderhq/plugin-sdk#59 at a2f87f31. Agent-Session: zeynep-portainer Co-Authored-By: Claude Opus 5.5 --- docs/schemas/declarative-manifest.v1alpha1.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/schemas/declarative-manifest.v1alpha1.json b/docs/schemas/declarative-manifest.v1alpha1.json index 0a33c9a..8e41a56 100644 --- a/docs/schemas/declarative-manifest.v1alpha1.json +++ b/docs/schemas/declarative-manifest.v1alpha1.json @@ -680,7 +680,21 @@ "description": "The JSON request body (POST only); string values are placeholders." } }, - "additionalProperties": false + "additionalProperties": false, + "if": { + "properties": { + "method": { + "const": "GET" + } + } + }, + "then": { + "properties": { + "body": { + "type": "null" + } + } + } }, "step": { "type": "object",