From 8a3bc5a78e3a248346b60d81702766ef871941d5 Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 00:23:49 +0100 Subject: [PATCH 01/13] feat(helm): add tools and default values for tool approval settings --- helm/agent/ci/tools-settings-values.yaml | 11 ++ helm/agent/templates/NOTES.txt | 3 + helm/agent/templates/_helpers.tpl | 130 ++++++++++++++++------- helm/agent/tool.schema.json | 22 ++++ helm/agent/values.schema.json | 55 +++++++++- helm/agent/values.yaml | 40 +++++-- 6 files changed, 216 insertions(+), 45 deletions(-) create mode 100644 helm/agent/ci/tools-settings-values.yaml create mode 100644 helm/agent/templates/NOTES.txt create mode 100644 helm/agent/tool.schema.json diff --git a/helm/agent/ci/tools-settings-values.yaml b/helm/agent/ci/tools-settings-values.yaml new file mode 100644 index 0000000..e194243 --- /dev/null +++ b/helm/agent/ci/tools-settings-values.yaml @@ -0,0 +1,11 @@ +# ct lint case: tools with Allow/Ask/Block settings and a default. The +# selectors render as the X-Muster-Toolset header; settings and default render +# nothing. +tools: + - server:pagerduty + - server:github: Ask + - tool:x_github_merge_pull_request: Allow + - tool:x_github_delete_repository: Block +default: Ask +modelConfig: + name: demo-model diff --git a/helm/agent/templates/NOTES.txt b/helm/agent/templates/NOTES.txt new file mode 100644 index 0000000..ca9f55a --- /dev/null +++ b/helm/agent/templates/NOTES.txt @@ -0,0 +1,3 @@ +{{- if .Values.muster.requireApproval }} +muster.requireApproval is deprecated: it still pauses every tool call, and chart 3.0 migrates it to `default: Ask` (see `tools` and `default`). +{{- end }} diff --git a/helm/agent/templates/_helpers.tpl b/helm/agent/templates/_helpers.tpl index d6aa1a5..c80bc76 100644 --- a/helm/agent/templates/_helpers.tpl +++ b/helm/agent/templates/_helpers.tpl @@ -106,68 +106,124 @@ the agent.* values. Empty when there is nothing to render. {{- end -}} {{/* -Validate the toolset: a list of selector strings, each preset:, -server:, workflow: or tool:. Unset means implicit full -access (no header); an empty list is refused so it can never silently mean -full access; more than 128 selectors is refused (define a preset instead); +Resolve and validate the agent's tool list. `tools` (selector strings or +one-key objects {selector: Allow|Ask|Block}) replaces the deprecated `toolset` +(selector strings); both set fails. Prints the effective selectors, settings +stripped, as a JSON array; prints nothing when neither is set (implicit full +access). Settings and `default` are read by agent-manager from the release +values and render nothing. + +Selectors are preset:, server:, workflow: or tool:. +An empty list is refused so it can never silently mean full access; more than +128 selectors (`tools`: 32) is refused (define a preset instead); toolset: is reserved for shared toolsets; label: exists only inside -presets. Fails the render with the offending selector. +presets. `tools` also refuses a duplicated selector, preset:none next to other +entries or with a setting (or `default`), and muster.requireApproval together +with any setting. Fails the render with the offending value. */}} -{{- define "agent.toolset.validate" -}} -{{- $ts := .Values.toolset -}} -{{- if not (kindIs "invalid" $ts) -}} - {{- if not (kindIs "slice" $ts) -}} - {{- fail (printf "toolset must be a list of selector strings, got %s" (kindOf $ts)) -}} +{{- define "agent.tools.resolve" -}} +{{- $name := "toolset" -}} +{{- $items := .Values.toolset -}} +{{- if not (kindIs "invalid" .Values.tools) -}} + {{- if not (kindIs "invalid" .Values.toolset) -}} + {{- fail "tools and toolset are both set: use tools only (toolset is deprecated)" -}} + {{- end -}} + {{- $name = "tools" -}} + {{- $items = .Values.tools -}} +{{- end -}} +{{- $settings := false -}} +{{- if not (kindIs "invalid" .Values.default) -}} + {{- if not (has .Values.default (list "Allow" "Ask" "Block")) -}} + {{- fail (printf "default %v is invalid: expected Allow, Ask or Block (case-sensitive)" .Values.default) -}} + {{- end -}} + {{- $settings = true -}} +{{- end -}} +{{- $selectors := list -}} +{{- if not (kindIs "invalid" $items) -}} + {{- if not (kindIs "slice" $items) -}} + {{- fail (printf "%s must be a list of selector strings, got %s" $name (kindOf $items)) -}} + {{- end -}} + {{- if eq (len $items) 0 -}} + {{- fail (printf "%s is empty: an agent without tools declares %s: [\"preset:none\"]; leave %s unset for implicit full access to everything the gateway exposes" $name $name $name) -}} {{- end -}} - {{- if eq (len $ts) 0 -}} - {{- fail "toolset is empty: an agent without tools declares toolset: [\"preset:none\"]; leave toolset unset for implicit full access to everything the gateway exposes" -}} + {{- if and (eq $name "tools") (gt (len $items) 32) -}} + {{- fail (printf "tools has %d items, above the limit of 32: define a preset (muster toolsetPresets) and select it with preset:" (len $items)) -}} {{- end -}} - {{- range $ts -}} - {{- if not (kindIs "string" .) -}} - {{- fail (printf "toolset selector %v must be a string" .) -}} + {{- range $items -}} + {{- $sel := . -}} + {{- if and (eq $name "tools") (kindIs "map" .) -}} + {{- if ne (len .) 1 -}} + {{- fail (printf "tools item %v must have exactly one key (a selector), got %d" . (len .)) -}} + {{- end -}} + {{- range $k, $v := . -}} + {{- $sel = $k -}} + {{- if not (has $v (list "Allow" "Ask" "Block")) -}} + {{- fail (printf "tools entry %q has the setting %v: expected Allow, Ask or Block (case-sensitive)" $k $v) -}} + {{- end -}} + {{- end -}} + {{- $settings = true -}} + {{- end -}} + {{- if not (kindIs "string" $sel) -}} + {{- fail (printf "%s selector %v must be a string" $name $sel) -}} {{- end -}} - {{- if hasPrefix "toolset:" . -}} - {{- fail (printf "toolset selector %q: toolset: is reserved for shared toolsets" .) -}} + {{- if hasPrefix "toolset:" $sel -}} + {{- fail (printf "%s selector %q: toolset: is reserved for shared toolsets" $name $sel) -}} {{- end -}} - {{- if hasPrefix "label:" . -}} - {{- fail (printf "toolset selector %q: label: selectors are allowed inside presets only" .) -}} + {{- if hasPrefix "label:" $sel -}} + {{- fail (printf "%s selector %q: label: selectors are allowed inside presets only" $name $sel) -}} {{- end -}} - {{- if not (regexMatch `^(preset|server|workflow|tool):[^\s,]+$` .) -}} - {{- fail (printf "toolset selector %q is invalid: expected preset:, server:, workflow: or tool: (exact name, no whitespace or commas)" .) -}} + {{- if not (regexMatch `^(preset|server|workflow|tool):[^\s,]+$` $sel) -}} + {{- fail (printf "%s selector %q is invalid: expected preset:, server:, workflow: or tool: (exact name, no whitespace or commas)" $name $sel) -}} {{- end -}} + {{- if and (eq $name "tools") (has $sel $selectors) -}} + {{- fail (printf "tools selector %q is listed more than once: a selector appears once, with or without a setting" $sel) -}} + {{- end -}} + {{- $selectors = append $selectors $sel -}} {{- end -}} - {{- $bytes := len (join "," $ts) -}} + {{- $bytes := len (join "," $selectors) -}} {{- if gt $bytes 8192 -}} - {{- fail (printf "toolset encodes to %d bytes, above the inline limit of 8192: define a preset (muster toolsetPresets) and select it with preset:" $bytes) -}} + {{- fail (printf "%s encodes to %d bytes, above the inline limit of 8192: define a preset (muster toolsetPresets) and select it with preset:" $name $bytes) -}} + {{- end -}} + {{- if and (eq $name "tools") (has "preset:none" $selectors) -}} + {{- if gt (len $selectors) 1 -}} + {{- fail "tools: preset:none cannot be combined with other entries: a chat-only agent declares tools: [\"preset:none\"]" -}} + {{- end -}} + {{- if $settings -}} + {{- fail "tools: preset:none cannot carry a setting (Allow, Ask or Block) and has no default: a chat-only agent has no tools to approve" -}} + {{- end -}} {{- end -}} {{- end -}} +{{- if and $settings .Values.muster.requireApproval -}} + {{- fail "muster.requireApproval is deprecated and cannot be combined with tool approval settings (tools entries with Allow/Ask/Block, default): remove muster.requireApproval and set default: Ask" -}} +{{- end -}} +{{- if $selectors -}}{{ toJson $selectors }}{{- end -}} {{- end -}} {{/* -"true" when the toolset is exactly ["preset:none"]: the agent has no tools, -so neither the RemoteMCPServer nor the muster binding is rendered. The ifs -are nested: Helm built with Go before 1.18 (the ct image) evaluates every -argument of `and`, so `len` would run on an unset toolset. +Validate the tool list (see agent.tools.resolve); prints nothing. */}} -{{- define "agent.toolset.isNone" -}} -{{- $ts := .Values.toolset -}} -{{- if kindIs "slice" $ts -}} - {{- if eq (len $ts) 1 -}} - {{- if eq (index $ts 0) "preset:none" -}}true{{- end -}} - {{- end -}} +{{- define "agent.toolset.validate" -}} +{{- $_ := include "agent.tools.resolve" . -}} {{- end -}} + +{{/* +"true" when the tool list is exactly ["preset:none"]: the agent has no tools, +so neither the RemoteMCPServer nor the muster binding is rendered. +*/}} +{{- define "agent.toolset.isNone" -}} +{{- if eq (include "agent.tools.resolve" .) "[\"preset:none\"]" -}}true{{- end -}} {{- end -}} {{/* -The X-Muster-Toolset header value: the selectors joined by "," (no spaces). -Empty when the toolset is unset. +The X-Muster-Toolset header value: the selectors (settings stripped) joined by +"," (no spaces). Empty when neither tools nor toolset is set. */}} {{- define "agent.toolset.header" -}} -{{- if kindIs "slice" .Values.toolset -}}{{ join "," .Values.toolset }}{{- end -}} +{{- with include "agent.tools.resolve" . -}}{{ join "," (fromJsonArray .) }}{{- end -}} {{- end -}} {{/* -"true" when the agent is bound to muster: muster.enabled and the toolset is +"true" when the agent is bound to muster: muster.enabled and the tool list is not exactly ["preset:none"]. Gates the RemoteMCPServer and the binding alike. */}} {{- define "agent.musterBinding" -}} diff --git a/helm/agent/tool.schema.json b/helm/agent/tool.schema.json new file mode 100644 index 0000000..cb805eb --- /dev/null +++ b/helm/agent/tool.schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$comment": "One entry of the `tools` value: a selector string, or an object with exactly one key (a selector) whose value is the tool's approval setting. Referenced from values.yaml (`tools: # @schema itemRef:tool.schema.json`) and bundled into values.schema.json by the helm-schema pre-commit hook.", + "oneOf": [ + { + "type": "string", + "pattern": "^(preset|server|workflow|tool):[^\\s,]+$" + }, + { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "propertyNames": { + "pattern": "^(preset|server|workflow|tool):[^\\s,]+$" + }, + "additionalProperties": { + "type": "string", + "enum": ["Allow", "Ask", "Block"] + } + } + ] +} diff --git a/helm/agent/values.schema.json b/helm/agent/values.schema.json index 94713e3..17b572a 100644 --- a/helm/agent/values.schema.json +++ b/helm/agent/values.schema.json @@ -149,11 +149,50 @@ "$comment": "One entry of the `agent.tags` value: a lowercase kebab-case keyword. Referenced from values.yaml (`tags: [] # @schema itemRef:tag.schema.json`) and bundled into values.schema.json by the helm-schema pre-commit hook.", "maxLength": 63, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" + }, + "tool.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$comment": "One entry of the `tools` value: a selector string, or an object with exactly one key (a selector) whose value is the tool's approval setting. Referenced from values.yaml (`tools: # @schema itemRef:tool.schema.json`) and bundled into values.schema.json by the helm-schema pre-commit hook.", + "oneOf": [ + { + "type": "string", + "pattern": "^(preset|server|workflow|tool):[^\\s,]+$" + }, + { + "type": "object", + "additionalProperties": { + "type": "string", + "enum": [ + "Allow", + "Ask", + "Block" + ] + }, + "maxProperties": 1, + "minProperties": 1, + "propertyNames": { + "pattern": "^(preset|server|workflow|tool):[^\\s,]+$" + } + } + ] } }, "type": "object", "additionalProperties": false, "properties": { + "default": { + "type": [ + "string", + "null" + ], + "description": "The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders nothing (read by agent-manager). `default: Ask` is what `muster.requireApproval: true` becomes in chart 3.0.", + "enum": [ + "Allow", + "Ask", + "Block", + null + ] + }, "agent": { "type": "object", "description": "Identity and prompt of the agent.", @@ -416,7 +455,7 @@ }, "requireApproval": { "type": "boolean", - "description": "Pause the agent before every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's human-in-the-loop): the Harness stops the task at `input-required` for each call and continues with the person's decision. It applies to the tools the binding exposes — `tools` when set, otherwise every muster tool. A client that negotiates kagent's HITL A2A extension (`https://kagent.dev/extensions/hitl/v1`) receives the structured `tool_approval_request` and answers it; one that does not sees a plain notice that human input is required. Off by default: the agent calls tools without asking." + "description": "Deprecated: set `default: Ask` instead (chart 3.0 migrates it); fails together with any `tools` setting or `default`. Pause the agent before every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's human-in-the-loop): the Harness stops the task at `input-required` for each call and continues with the person's decision. It applies to the tools the binding exposes — `tools` when set, otherwise every muster tool. A client that negotiates kagent's HITL A2A extension (`https://kagent.dev/extensions/hitl/v1`) receives the structured `tool_approval_request` and answers it; one that does not sees a plain notice that human input is required. Off by default: the agent calls tools without asking." }, "timeout": { "type": "string", @@ -475,12 +514,24 @@ "subscriptionID": { "type": "string" }, + "tools": { + "type": [ + "array", + "null" + ], + "description": "The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `[\"preset:none\"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry); settings and `default` render nothing: agent-manager reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render, as does `muster.requireApproval: true` together with any setting.", + "items": { + "$ref": "#/$defs/tool.schema.json" + }, + "maxItems": 32, + "minItems": 1 + }, "toolset": { "type": [ "array", "null" ], - "description": "The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `[\"preset:none\"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary.", + "description": "Deprecated: use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `[\"preset:none\"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary.", "items": { "type": "string" }, diff --git a/helm/agent/values.yaml b/helm/agent/values.yaml index a61afe4..0d6aa18 100644 --- a/helm/agent/values.yaml +++ b/helm/agent/values.yaml @@ -10,9 +10,9 @@ # are platform-owned and referenced by name. # # values.schema.json is generated from the # @schema annotations in this file -# (and skill.schema.json for the skills entries) by the helm-schema pre-commit -# hook (losisin/helm-values-schema-json); edit the annotations here, never the -# schema directly. +# (and skill.schema.json, tool.schema.json for the skills and tools entries) by +# the helm-schema pre-commit hook (losisin/helm-values-schema-json); edit the +# annotations here, never the schema directly. # -- Identity and prompt of the agent. agent: @@ -279,8 +279,9 @@ muster: # the whole server and report a warning in the Agent's status.warnings. tools: [] # @schema type:boolean - # -- Pause the agent before every tool call through muster until a person - # approves it. Rendered as `requireApproval: true` on the binding (kagent's + # -- Deprecated: set `default: Ask` instead (chart 3.0 migrates it); fails + # together with any `tools` setting or `default`. Pause the agent before + # every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's # human-in-the-loop): the Harness stops the task at `input-required` for # each call and continues with the person's decision. It applies to the # tools the binding exposes — `tools` when set, otherwise every muster @@ -300,8 +301,35 @@ muster: # time as the signed-in person. Turn on only for a muster without OAuth. enabled: false +# @schema type:[array, null];itemRef:tool.schema.json;minItems:1;maxItems:32 +# -- (list) The tools the agent is composed with, 1 to 32 items; replaces +# `toolset`. An item is a selector string or an object with one key (a +# selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: +# Ask`. Selectors are `preset:`, `server:`, `workflow:` or +# `tool:` with exact, case-sensitive names (regex +# `^(preset|server|workflow|tool):[^\s,]+$`); a selector appears once. An +# unlisted tool is invisible to the agent. The selectors alone render as the +# `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly +# `["preset:none"]` renders no RemoteMCPServer and no muster binding, and +# takes no setting and no other entry); settings and `default` render nothing: +# agent-manager reads them from the release values and binds them per Session. +# `Allow` over a connector's `Ask` holds only when a connector admin grants it +# through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` +# together fails the render, as does `muster.requireApproval: true` together +# with any setting. +# @default -- unset: implicit full access, renders no header +tools: + +# @schema type:[string, null];enum:[Allow, Ask, Block, null] +# -- (string) The setting for every tool in `tools` without its own: `Allow`, +# `Ask` or `Block` (case-sensitive). Optional; absent means no default. +# Renders nothing (read by agent-manager). `default: Ask` is what +# `muster.requireApproval: true` becomes in chart 3.0. +# @default -- unset: no default +default: + # @schema type:[array, null];item:string;maxItems:128 -# -- (list) The tools the agent is composed with: a list of selectors that muster +# -- (list) Deprecated: use `tools`. The tools the agent is composed with: a list of selectors that muster # resolves per request. Selectors are `preset:`, `server:`, # `workflow:` or `tool:` with exact, case-sensitive names (regex # `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a From 551d66087bf40cbf43e889288be8783aecbcb801 Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 00:23:49 +0100 Subject: [PATCH 02/13] test(helm): cover tools and default rendering, failures and schema --- helm/agent/tests/tools_test.yaml | 317 +++++++++++++++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 helm/agent/tests/tools_test.yaml diff --git a/helm/agent/tests/tools_test.yaml b/helm/agent/tests/tools_test.yaml new file mode 100644 index 0000000..9a060fb --- /dev/null +++ b/helm/agent/tests/tools_test.yaml @@ -0,0 +1,317 @@ +# Render tests for `tools` and `default` (tool approval settings): the +# selectors render exactly as `toolset` does, settings and `default` render +# nothing, and the combinations the chart refuses fail with a message that +# names the value. +# +# Run with: make helm-test (helm unittest helm/agent). +suite: tools +templates: + - templates/remotemcpserver.yaml + - templates/agent.yaml + - templates/NOTES.txt +release: + name: demo + namespace: demo-ns +set: + modelConfig.name: demo-model +tests: + # tools without settings == toolset + - it: renders tools without settings as the same header as toolset + set: + tools: + - preset:read-only + - workflow:incident-triage + asserts: + - equal: + path: spec.headersFrom + value: + - name: X-Muster-Toolset + value: preset:read-only,workflow:incident-triage + template: templates/remotemcpserver.yaml + - equal: + path: spec.description + value: muster MCP gateway of agent demo (toolset preset:read-only,workflow:incident-triage) + template: templates/remotemcpserver.yaml + - equal: + path: spec.template.tools[0].mcp.server.name + value: demo + template: templates/agent.yaml + + # tools with settings: the selectors, settings stripped + - it: renders the selectors of tools with settings and nothing else + set: + tools: + - server:pagerduty + - server:github: Ask + - tool:x_github_merge_pull_request: Allow + - tool:x_github_delete_repository: Block + asserts: + - hasDocuments: + count: 1 + template: templates/remotemcpserver.yaml + - equal: + path: spec.headersFrom + value: + - name: X-Muster-Toolset + value: server:pagerduty,server:github,tool:x_github_merge_pull_request,tool:x_github_delete_repository + template: templates/remotemcpserver.yaml + - equal: + path: spec.description + value: muster MCP gateway of agent demo (toolset server:pagerduty,server:github,tool:x_github_merge_pull_request,tool:x_github_delete_repository) + template: templates/remotemcpserver.yaml + - lengthEqual: + path: spec.template.tools + count: 1 + template: templates/agent.yaml + - notExists: + path: spec.template.tools[0].mcp.requireApproval + template: templates/agent.yaml + + - it: renders default nothing + set: + tools: + - server:github + default: Ask + asserts: + - equal: + path: spec.headersFrom[0].value + value: server:github + template: templates/remotemcpserver.yaml + - notExists: + path: spec.template.tools[0].mcp.requireApproval + template: templates/agent.yaml + - notMatchRegex: + path: spec.description + pattern: Ask + template: templates/remotemcpserver.yaml + + - it: renders a chat-only agent for tools ["preset:none"] + set: + tools: + - preset:none + asserts: + - hasDocuments: + count: 0 + template: templates/remotemcpserver.yaml + - notExists: + path: spec.template.tools + template: templates/agent.yaml + + # failures + - it: fails when tools and toolset are both set + set: + tools: + - server:a + toolset: + - server:a + asserts: + - failedTemplate: + errorPattern: tools and toolset are both set + + - it: fails on a duplicated selector in tools + set: + tools: + - server:github + - server:github: Ask + asserts: + - failedTemplate: + errorPattern: 'tools selector "server:github" is listed more than once' + + - it: fails on preset:none with a setting + set: + tools: + - preset:none: Ask + asserts: + - failedTemplate: + errorPattern: 'tools: preset:none cannot carry a setting' + + - it: fails on preset:none with default + set: + tools: + - preset:none + default: Ask + asserts: + - failedTemplate: + errorPattern: 'tools: preset:none cannot carry a setting' + + - it: fails on preset:none with other entries + set: + tools: + - preset:none + - server:github + asserts: + - failedTemplate: + errorPattern: 'tools: preset:none cannot be combined with other entries' + + - it: fails on requireApproval with a setting on an entry + set: + muster: + requireApproval: true + tools: + - server:github: Ask + asserts: + - failedTemplate: + errorPattern: 'muster.requireApproval is deprecated and cannot be combined with tool approval settings \(tools entries with Allow/Ask/Block, default\): remove muster.requireApproval and set default: Ask' + + - it: fails on requireApproval with default + set: + muster: + requireApproval: true + default: Ask + asserts: + - failedTemplate: + errorPattern: muster.requireApproval is deprecated and cannot be combined + + # requireApproval alone keeps rendering + - it: renders the kagent flag for requireApproval with tools without settings + set: + muster: + requireApproval: true + tools: + - server:github + asserts: + - equal: + path: spec.template.tools[0].mcp.requireApproval + value: true + template: templates/agent.yaml + - equal: + path: spec.headersFrom[0].value + value: server:github + template: templates/remotemcpserver.yaml + + - it: prints a deprecation line in NOTES.txt for requireApproval + set: + muster: + requireApproval: true + asserts: + - matchRegexRaw: + pattern: muster.requireApproval is deprecated + template: templates/NOTES.txt + + # schema + - it: refuses a setting that is not Allow, Ask or Block through the values schema + set: + tools: + - server:github: Deny + asserts: + - failedTemplate: + errorPattern: tools + + - it: refuses a lower-case setting through the values schema + set: + tools: + - server:github: ask + asserts: + - failedTemplate: + errorPattern: tools + + - it: refuses default Deny through the values schema + set: + default: Deny + asserts: + - failedTemplate: + errorPattern: default + + - it: refuses an object item with two keys through the values schema + set: + tools: + - server:github: Ask + server:pagerduty: Allow + asserts: + - failedTemplate: + errorPattern: tools + + - it: refuses an object item whose key is not a selector through the values schema + set: + tools: + - github: Ask + asserts: + - failedTemplate: + errorPattern: tools + + - it: refuses an empty tools list through the values schema + set: + tools: [] + asserts: + - failedTemplate: + errorPattern: tools + + - it: renders 32 tools + set: + tools: + - tool:t0 + - tool:t1 + - tool:t2 + - tool:t3 + - tool:t4 + - tool:t5 + - tool:t6 + - tool:t7 + - tool:t8 + - tool:t9 + - tool:t10 + - tool:t11 + - tool:t12 + - tool:t13 + - tool:t14 + - tool:t15 + - tool:t16 + - tool:t17 + - tool:t18 + - tool:t19 + - tool:t20 + - tool:t21 + - tool:t22 + - tool:t23 + - tool:t24 + - tool:t25 + - tool:t26 + - tool:t27 + - tool:t28 + - tool:t29 + - tool:t30 + - tool:t31 + asserts: + - isKind: + of: RemoteMCPServer + template: templates/remotemcpserver.yaml + + - it: refuses 33 tools through the values schema + set: + tools: + - tool:t0 + - tool:t1 + - tool:t2 + - tool:t3 + - tool:t4 + - tool:t5 + - tool:t6 + - tool:t7 + - tool:t8 + - tool:t9 + - tool:t10 + - tool:t11 + - tool:t12 + - tool:t13 + - tool:t14 + - tool:t15 + - tool:t16 + - tool:t17 + - tool:t18 + - tool:t19 + - tool:t20 + - tool:t21 + - tool:t22 + - tool:t23 + - tool:t24 + - tool:t25 + - tool:t26 + - tool:t27 + - tool:t28 + - tool:t29 + - tool:t30 + - tool:t31 + - tool:t32 + asserts: + - failedTemplate: + errorPattern: tools From a5984eff6c92b1891dc456b10fafcbed146ab52d Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 00:23:49 +0100 Subject: [PATCH 03/13] docs: describe tools, default and the toolset and requireApproval deprecations --- README.md | 33 ++++++++++++++++++++++++++++++++- helm/agent/README.md | 6 ++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8a58469..52deaf1 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ labels: The technical resource name defaults to the Helm release name. By default the agent is wired to the platform's muster gateway with **all** of its (dynamic) tools — implicit full access to everything the gateway exposes to the invoking -human. Declare a **toolset** to compose the agent with a subset: +human. Declare a **toolset** (deprecated, use `tools` below) to compose the agent with a subset: ```yaml toolset: @@ -99,6 +99,37 @@ preset), and `toolset:` is reserved. Composition, not authorization: the human's identity and the backends' own authorization remain the boundary. The agent gets no wider access of its own. +### Tools with approval settings + +`tools` replaces `toolset` (deprecated: use `tools`). An item is a selector, or +a one-key object that gives the selector a setting (`Allow`, `Ask` or `Block`, +case-sensitive); `default` is the setting for every listed tool without its own: + +```yaml +tools: # 1 to 32 items; unlisted tools are invisible + - server:pagerduty # visible; the connector's settings apply + - server:github: Ask # every GitHub tool asks, new ones too + - tool:x_github_merge_pull_request: Allow # holds over the connector's Ask only with a grant + - tool:x_github_delete_repository: Block # hidden from the agent +default: Ask # optional +``` + +- The selectors alone, settings stripped, render exactly as `toolset` renders + them: the `X-Muster-Toolset` header, and `["preset:none"]` renders no + `RemoteMCPServer` and no muster binding. Settings and `default` render + nothing; agent-manager reads them from the release values and binds them per + Session. +- Setting `tools` and `toolset` together fails the render, as does a selector + listed twice, `preset:none` next to other entries or with a setting (or + `default`), and a value other than `Allow`, `Ask` or `Block`. +- `muster.requireApproval` is deprecated: `true` alone keeps rendering kagent's + `requireApproval: true` and prints a deprecation line in `NOTES.txt`; with any + setting (an object item or `default`) the render fails. Chart 3.0 migrates + `requireApproval: true` to `default: Ask`. +- An `Allow` over a connector's `Ask` holds only when a connector admin grants + it through agent-manager's `set_agent_approval`; without a grant the connector's + `Ask` stays in force. + `muster.tools` narrows the binding to a subset of muster's *meta-tools* (`list_tools`, `call_tool`, ...), not the tools behind the gateway — a toolset is the way to narrow those. A Harness enforces a partial selection only when diff --git a/helm/agent/README.md b/helm/agent/README.md index a03f847..b2ab77f 100644 --- a/helm/agent/README.md +++ b/helm/agent/README.md @@ -47,10 +47,12 @@ What an agent can reach and how to add a host (`agent.egress`): [What an agent c | muster.url | string | `"http://muster.agent-platform.svc.cluster.local:8090/mcp"` | URL of muster's MCP endpoint, rendered into the RemoteMCPServer's spec.url. The default is the platform's in-cluster URL; set it for an installation whose muster is elsewhere. | | muster.timeout | string | `"60m"` | How long one tool call through muster may run before the agent's runtime cancels it, rendered as given into the RemoteMCPServer's spec.timeout (a duration with a unit: `180s`, `5m`). Without the field kagent applies its own 30 s, which cuts a backend tool that legitimately runs longer — a write that creates a repository and opens a pull request in one call, a watch that blocks for minutes — although muster's own per-server budget for that backend allows more. The default is muster's progress cap (an MCPServer's `progress.maxDuration`, at most an hour): kagent applies the value to the whole request, which no MCP progress notification restarts, so a wait kept alive by progress (devctl's `pr_wait`, `pr_merge`, `release_wait`) returns its verdict in one call; muster still bounds every call by its backend's own `spec.timeout`, restarted by that progress, so a call is bounded by its backend, not by the caller. | | muster.tools | list | `[]` | Set to narrow the binding to a subset of muster's meta-tools (`list_tools`, `call_tool`, ...); leave empty to bind every tool. Rendered into the binding's `tools`. A toolset is the way to narrow the tools behind the gateway. A Harness enforces a partial selection only when it can discover the server's tools; with discovery off (the default) it may expose the whole server and report a warning in the Agent's status.warnings. | -| muster.requireApproval | bool | `false` | Pause the agent before every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's human-in-the-loop): the Harness stops the task at `input-required` for each call and continues with the person's decision. It applies to the tools the binding exposes — `tools` when set, otherwise every muster tool. A client that negotiates kagent's HITL A2A extension (`https://kagent.dev/extensions/hitl/v1`) receives the structured `tool_approval_request` and answers it; one that does not sees a plain notice that human input is required. Off by default: the agent calls tools without asking. | +| muster.requireApproval | bool | `false` | Deprecated: set `default: Ask` instead (chart 3.0 migrates it); fails together with any `tools` setting or `default`. Pause the agent before every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's human-in-the-loop): the Harness stops the task at `input-required` for each call and continues with the person's decision. It applies to the tools the binding exposes — `tools` when set, otherwise every muster tool. A client that negotiates kagent's HITL A2A extension (`https://kagent.dev/extensions/hitl/v1`) receives the structured `tool_approval_request` and answers it; one that does not sees a plain notice that human input is required. Off by default: the agent calls tools without asking. | | muster.discovery | object | `{"enabled":false}` | Tool discovery by the kagent controller against muster. | | muster.discovery.enabled | bool | `false` | Let the kagent controller list muster's tools when it reconciles the RemoteMCPServer. Off by default: muster is an OAuth resource server and the controller holds no user token, so the chart labels the server `kagent.dev/discovery: disabled` and the agent resolves its tools at run time as the signed-in person. Turn on only for a muster without OAuth. | -| toolset | list | unset: implicit full access, renders no header | The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary. | +| tools | list | unset: implicit full access, renders no header | The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `["preset:none"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry); settings and `default` render nothing: agent-manager reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render, as does `muster.requireApproval: true` together with any setting. | +| default | string | unset: no default | The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders nothing (read by agent-manager). `default: Ask` is what `muster.requireApproval: true` becomes in chart 3.0. | +| toolset | list | unset: implicit full access, renders no header | Deprecated: use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary. | | extraTools | list | `[]` | Additional raw api.kagent.dev/v1alpha3 tool bindings appended after the muster binding: `{mcp: {server: {kind: RemoteMCPServer, name}, tools, requireApproval}}` or `{subAgent: {name, description, templateRef: {name}}}` (`agentRef` in place of `templateRef` names an Agent; the runtime does not compile it yet). Servers, templates and agents are referenced in the agent's own namespace. | | labels | object | `{}` | Extra labels merged over the standard set on both objects, e.g. tenant/owner dimensions. They win over the standard set on both objects. | | annotations | object | `{}` | Extra annotations merged next to the display-name, icon-url and tags annotations on the Agent. ui.giantswarm.io/display-name, icon-url and tags are refused here; set agent.displayName, agent.iconUrl and agent.tags. | From 9bd75b9e99887773e98e9f4e2be96e3f54ae5179 Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 01:49:05 +0100 Subject: [PATCH 04/13] feat(helm): render tool approval settings as X-Muster-Tool-Approval Settings and default reach muster on every request of the agent's RemoteMCPServer, so they hold for Sessions agent-manager did not start. The header carries no grants and can only make tools stricter; Sessions agent-manager binds take its settings and grants instead. --- README.md | 8 +++++--- helm/agent/README.md | 4 ++-- helm/agent/templates/_helpers.tpl | 25 +++++++++++++++++++++++ helm/agent/templates/remotemcpserver.yaml | 10 ++++++++- helm/agent/tests/tools_test.yaml | 16 ++++++++++----- helm/agent/values.schema.json | 4 ++-- helm/agent/values.yaml | 9 +++++--- 7 files changed, 60 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 52deaf1..434dc63 100644 --- a/README.md +++ b/README.md @@ -116,9 +116,11 @@ default: Ask # optional - The selectors alone, settings stripped, render exactly as `toolset` renders them: the `X-Muster-Toolset` header, and `["preset:none"]` renders no - `RemoteMCPServer` and no muster binding. Settings and `default` render - nothing; agent-manager reads them from the release values and binds them per - Session. + `RemoteMCPServer` and no muster binding. Settings and `default` render as a + second header, `X-Muster-Tool-Approval: =,...,default=`, + which muster applies to requests no Session binding covers (it carries no + grants, so it only tightens); agent-manager reads them from the release values + and binds them, with grants, to every Session it starts. - Setting `tools` and `toolset` together fails the render, as does a selector listed twice, `preset:none` next to other entries or with a setting (or `default`), and a value other than `Allow`, `Ask` or `Block`. diff --git a/helm/agent/README.md b/helm/agent/README.md index b2ab77f..d150da6 100644 --- a/helm/agent/README.md +++ b/helm/agent/README.md @@ -50,8 +50,8 @@ What an agent can reach and how to add a host (`agent.egress`): [What an agent c | muster.requireApproval | bool | `false` | Deprecated: set `default: Ask` instead (chart 3.0 migrates it); fails together with any `tools` setting or `default`. Pause the agent before every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's human-in-the-loop): the Harness stops the task at `input-required` for each call and continues with the person's decision. It applies to the tools the binding exposes — `tools` when set, otherwise every muster tool. A client that negotiates kagent's HITL A2A extension (`https://kagent.dev/extensions/hitl/v1`) receives the structured `tool_approval_request` and answers it; one that does not sees a plain notice that human input is required. Off by default: the agent calls tools without asking. | | muster.discovery | object | `{"enabled":false}` | Tool discovery by the kagent controller against muster. | | muster.discovery.enabled | bool | `false` | Let the kagent controller list muster's tools when it reconciles the RemoteMCPServer. Off by default: muster is an OAuth resource server and the controller holds no user token, so the chart labels the server `kagent.dev/discovery: disabled` and the agent resolves its tools at run time as the signed-in person. Turn on only for a muster without OAuth. | -| tools | list | unset: implicit full access, renders no header | The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `["preset:none"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry); settings and `default` render nothing: agent-manager reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render, as does `muster.requireApproval: true` together with any setting. | -| default | string | unset: no default | The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders nothing (read by agent-manager). `default: Ask` is what `muster.requireApproval: true` becomes in chart 3.0. | +| tools | list | unset: implicit full access, renders no header | The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `["preset:none"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry). Settings and `default` render as `X-Muster-Tool-Approval` beside it (`=,...,default=`), which muster applies where no Session binding carries them; agent-manager also reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render, as does `muster.requireApproval: true` together with any setting. | +| default | string | unset: no default | The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). `default: Ask` is what `muster.requireApproval: true` becomes in chart 3.0. | | toolset | list | unset: implicit full access, renders no header | Deprecated: use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary. | | extraTools | list | `[]` | Additional raw api.kagent.dev/v1alpha3 tool bindings appended after the muster binding: `{mcp: {server: {kind: RemoteMCPServer, name}, tools, requireApproval}}` or `{subAgent: {name, description, templateRef: {name}}}` (`agentRef` in place of `templateRef` names an Agent; the runtime does not compile it yet). Servers, templates and agents are referenced in the agent's own namespace. | | labels | object | `{}` | Extra labels merged over the standard set on both objects, e.g. tenant/owner dimensions. They win over the standard set on both objects. | diff --git a/helm/agent/templates/_helpers.tpl b/helm/agent/templates/_helpers.tpl index c80bc76..c44a4ff 100644 --- a/helm/agent/templates/_helpers.tpl +++ b/helm/agent/templates/_helpers.tpl @@ -199,6 +199,31 @@ with any setting. Fails the render with the offending value. {{- if $selectors -}}{{ toJson $selectors }}{{- end -}} {{- end -}} +{{/* +The agent's approval settings as the X-Muster-Tool-Approval header value: +"=" per tools entry with a setting, then "default=", +joined by commas; empty without settings. muster applies it to requests that +no Session binding with agent-manager's settings covers (Sessions not started +through agent-manager): it carries no grants, so it can only make tools +stricter than their connectors' settings. +*/}} +{{- define "agent.tools.approvalHeader" -}} +{{- $parts := list -}} +{{- if not (kindIs "invalid" .Values.tools) -}} + {{- range .Values.tools -}} + {{- if kindIs "map" . -}} + {{- range $k, $v := . -}} + {{- $parts = append $parts (printf "%s=%s" $k $v) -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- if not (kindIs "invalid" .Values.default) -}} + {{- $parts = append $parts (printf "default=%s" .Values.default) -}} +{{- end -}} +{{- join "," $parts -}} +{{- end -}} + {{/* Validate the tool list (see agent.tools.resolve); prints nothing. */}} diff --git a/helm/agent/templates/remotemcpserver.yaml b/helm/agent/templates/remotemcpserver.yaml index 5a2c27c..b5f4850 100644 --- a/helm/agent/templates/remotemcpserver.yaml +++ b/helm/agent/templates/remotemcpserver.yaml @@ -18,9 +18,17 @@ spec: url: {{ .Values.muster.url | quote }} protocol: STREAMABLE_HTTP timeout: {{ .Values.muster.timeout }} - {{- with include "agent.toolset.header" . }} + {{- $toolset := include "agent.toolset.header" . }} + {{- $approval := include "agent.tools.approvalHeader" . }} + {{- if or $toolset $approval }} headersFrom: + {{- with $toolset }} - name: X-Muster-Toolset value: {{ . | quote }} + {{- end }} + {{- with $approval }} + - name: X-Muster-Tool-Approval + value: {{ . | quote }} + {{- end }} {{- end }} {{- end }} diff --git a/helm/agent/tests/tools_test.yaml b/helm/agent/tests/tools_test.yaml index 9a060fb..4923737 100644 --- a/helm/agent/tests/tools_test.yaml +++ b/helm/agent/tests/tools_test.yaml @@ -1,6 +1,6 @@ # Render tests for `tools` and `default` (tool approval settings): the -# selectors render exactly as `toolset` does, settings and `default` render -# nothing, and the combinations the chart refuses fail with a message that +# selectors render exactly as `toolset` does, settings and `default` render as +# X-Muster-Tool-Approval, and the combinations the chart refuses fail with a message that # names the value. # # Run with: make helm-test (helm unittest helm/agent). @@ -54,6 +54,8 @@ tests: value: - name: X-Muster-Toolset value: server:pagerduty,server:github,tool:x_github_merge_pull_request,tool:x_github_delete_repository + - name: X-Muster-Tool-Approval + value: server:github=Ask,tool:x_github_merge_pull_request=Allow,tool:x_github_delete_repository=Block template: templates/remotemcpserver.yaml - equal: path: spec.description @@ -67,15 +69,19 @@ tests: path: spec.template.tools[0].mcp.requireApproval template: templates/agent.yaml - - it: renders default nothing + - it: renders default into X-Muster-Tool-Approval set: tools: - server:github default: Ask asserts: - equal: - path: spec.headersFrom[0].value - value: server:github + path: spec.headersFrom + value: + - name: X-Muster-Toolset + value: server:github + - name: X-Muster-Tool-Approval + value: default=Ask template: templates/remotemcpserver.yaml - notExists: path: spec.template.tools[0].mcp.requireApproval diff --git a/helm/agent/values.schema.json b/helm/agent/values.schema.json index 17b572a..2685f98 100644 --- a/helm/agent/values.schema.json +++ b/helm/agent/values.schema.json @@ -185,7 +185,7 @@ "string", "null" ], - "description": "The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders nothing (read by agent-manager). `default: Ask` is what `muster.requireApproval: true` becomes in chart 3.0.", + "description": "The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). `default: Ask` is what `muster.requireApproval: true` becomes in chart 3.0.", "enum": [ "Allow", "Ask", @@ -519,7 +519,7 @@ "array", "null" ], - "description": "The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `[\"preset:none\"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry); settings and `default` render nothing: agent-manager reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render, as does `muster.requireApproval: true` together with any setting.", + "description": "The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `[\"preset:none\"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry). Settings and `default` render as `X-Muster-Tool-Approval` beside it (`=,...,default=`), which muster applies where no Session binding carries them; agent-manager also reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render, as does `muster.requireApproval: true` together with any setting.", "items": { "$ref": "#/$defs/tool.schema.json" }, diff --git a/helm/agent/values.yaml b/helm/agent/values.yaml index 0d6aa18..82ac3c8 100644 --- a/helm/agent/values.yaml +++ b/helm/agent/values.yaml @@ -311,8 +311,10 @@ muster: # unlisted tool is invisible to the agent. The selectors alone render as the # `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly # `["preset:none"]` renders no RemoteMCPServer and no muster binding, and -# takes no setting and no other entry); settings and `default` render nothing: -# agent-manager reads them from the release values and binds them per Session. +# takes no setting and no other entry). Settings and `default` render as +# `X-Muster-Tool-Approval` beside it (`=,...,default=`), +# which muster applies where no Session binding carries them; agent-manager +# also reads them from the release values and binds them per Session. # `Allow` over a connector's `Ask` holds only when a connector admin grants it # through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` # together fails the render, as does `muster.requireApproval: true` together @@ -323,7 +325,8 @@ tools: # @schema type:[string, null];enum:[Allow, Ask, Block, null] # -- (string) The setting for every tool in `tools` without its own: `Allow`, # `Ask` or `Block` (case-sensitive). Optional; absent means no default. -# Renders nothing (read by agent-manager). `default: Ask` is what +# Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). +# `default: Ask` is what # `muster.requireApproval: true` becomes in chart 3.0. # @default -- unset: no default default: From 8900a1526656f60950c23d8b84222cb302915fe2 Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 02:08:03 +0100 Subject: [PATCH 05/13] docs: say X-Muster-Tool-Approval holds only while the runtime sends it --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 434dc63..8cbb797 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,10 @@ default: Ask # optional second header, `X-Muster-Tool-Approval: =,...,default=`, which muster applies to requests no Session binding covers (it carries no grants, so it only tightens); agent-manager reads them from the release values - and binds them, with grants, to every Session it starts. + and binds them, with grants, to every Session it starts. Only those bound + settings are enforced whatever the client does: the header is sent by the + agent's runtime, so for a Session agent-manager did not start the settings + hold only while the runtime sends it. - Setting `tools` and `toolset` together fails the render, as does a selector listed twice, `preset:none` next to other entries or with a setting (or `default`), and a value other than `Allow`, `Ask` or `Block`. From 1081d226d7b8bff9698becd1c25a00440f288a08 Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 09:38:36 +0100 Subject: [PATCH 06/13] feat(helm): remove muster.requireApproval, replaced by default: Ask Chart 3.0 no longer renders kagent's requireApproval on the muster binding and its values schema refuses muster.requireApproval. default: Ask replaces true: muster asks a person before every tool call through it. The deprecation line in NOTES.txt and the render failure for the combination with tool approval settings go with it. --- helm/agent/README.md | 7 ++-- helm/agent/templates/NOTES.txt | 3 -- helm/agent/templates/_helpers.tpl | 10 +---- helm/agent/tests/agent_test.yaml | 48 +--------------------- helm/agent/tests/remotemcpserver_test.yaml | 17 -------- helm/agent/tests/tools_test.yaml | 45 ++++++++------------ helm/agent/values.schema.json | 8 +--- helm/agent/values.yaml | 20 ++------- 8 files changed, 30 insertions(+), 128 deletions(-) delete mode 100644 helm/agent/templates/NOTES.txt diff --git a/helm/agent/README.md b/helm/agent/README.md index d150da6..875f175 100644 --- a/helm/agent/README.md +++ b/helm/agent/README.md @@ -42,16 +42,15 @@ What an agent can reach and how to add a host (`agent.egress`): [What an agent c | plugins | list | `[]` | Plugins, each pinned to an immutable source like a skill. An entry is `{git: {url, commit}, path, skills: [...]}` or `{oci: , path, skills: [...]}`. An Agent Plugins format package (`plugin.json` at its root) enables only the skills `skills` names (optional, unique, never a name `skills[]` or another plugin already uses), and its `mcp.json` servers load either way. A Claude Code format plugin (`.claude-plugin/plugin.json`) loads whole on the `claude` Harness, its hooks, commands and subagents included, and needs no `skills`. Rendered into the Agent's spec.template.plugins[] as `{source: {git | oci, path}, skills}`, `skills` only when set. The pinning rules of `skills[]` apply (a branch, a tag, a short SHA or an OCI tag fails the render), and `skillsGitAuthSecretRef` reaches every git plugin the way it reaches every git skill. | | skillsGitAuthSecretRef | object | `{"name":""}` | One read credential for every private git skill and git plugin. The chart never creates the Secret; the tenant provisions it in the agent's namespace (on the platform: the namespace the agents are compiled in), or agent-manager mints it. | | skillsGitAuthSecretRef.name | string | `""` | Name of a Secret in the agent's namespace whose key `token` holds `base64(":")` (on GitHub `x-access-token:`) with read access to the agent's private git skills and plugins; the egress gateway sends it as `Authorization: Basic` to every request to that host, public repositories included. When set, every `skills[]` and `plugins[]` entry with `git` renders `source.git.credentialRef: {name, key: token}`; OCI sources are unchanged. Empty (the default) renders anonymous fetches. Requires an `https://` URL on every git skill and plugin: the CRD refuses a credential on any other source, and the chart fails the render first, naming the entry. Rotate the Secret's contents, never its name. The full contract and its failure modes: the README's "Private skill repositories". | -| muster | object | `{"discovery":{"enabled":false},"enabled":true,"requireApproval":false,"timeout":"60m","tools":[],"url":"http://muster.agent-platform.svc.cluster.local:8090/mcp"}` | The platform's muster MCP gateway. Unless the agent is chat-only (toolset exactly `["preset:none"]`) or `enabled` is false, the chart renders a RemoteMCPServer named after the agent that points at muster and carries the toolset header, and binds it into the Agent's spec.template.tools. | +| muster | object | `{"discovery":{"enabled":false},"enabled":true,"timeout":"60m","tools":[],"url":"http://muster.agent-platform.svc.cluster.local:8090/mcp"}` | The platform's muster MCP gateway. Unless the agent is chat-only (toolset exactly `["preset:none"]`) or `enabled` is false, the chart renders a RemoteMCPServer named after the agent that points at muster and carries the toolset header, and binds it into the Agent's spec.template.tools. | | muster.enabled | bool | `true` | Wire muster into the agent's tools: render the agent's RemoteMCPServer and bind it in the Agent's template. | | muster.url | string | `"http://muster.agent-platform.svc.cluster.local:8090/mcp"` | URL of muster's MCP endpoint, rendered into the RemoteMCPServer's spec.url. The default is the platform's in-cluster URL; set it for an installation whose muster is elsewhere. | | muster.timeout | string | `"60m"` | How long one tool call through muster may run before the agent's runtime cancels it, rendered as given into the RemoteMCPServer's spec.timeout (a duration with a unit: `180s`, `5m`). Without the field kagent applies its own 30 s, which cuts a backend tool that legitimately runs longer — a write that creates a repository and opens a pull request in one call, a watch that blocks for minutes — although muster's own per-server budget for that backend allows more. The default is muster's progress cap (an MCPServer's `progress.maxDuration`, at most an hour): kagent applies the value to the whole request, which no MCP progress notification restarts, so a wait kept alive by progress (devctl's `pr_wait`, `pr_merge`, `release_wait`) returns its verdict in one call; muster still bounds every call by its backend's own `spec.timeout`, restarted by that progress, so a call is bounded by its backend, not by the caller. | | muster.tools | list | `[]` | Set to narrow the binding to a subset of muster's meta-tools (`list_tools`, `call_tool`, ...); leave empty to bind every tool. Rendered into the binding's `tools`. A toolset is the way to narrow the tools behind the gateway. A Harness enforces a partial selection only when it can discover the server's tools; with discovery off (the default) it may expose the whole server and report a warning in the Agent's status.warnings. | -| muster.requireApproval | bool | `false` | Deprecated: set `default: Ask` instead (chart 3.0 migrates it); fails together with any `tools` setting or `default`. Pause the agent before every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's human-in-the-loop): the Harness stops the task at `input-required` for each call and continues with the person's decision. It applies to the tools the binding exposes — `tools` when set, otherwise every muster tool. A client that negotiates kagent's HITL A2A extension (`https://kagent.dev/extensions/hitl/v1`) receives the structured `tool_approval_request` and answers it; one that does not sees a plain notice that human input is required. Off by default: the agent calls tools without asking. | | muster.discovery | object | `{"enabled":false}` | Tool discovery by the kagent controller against muster. | | muster.discovery.enabled | bool | `false` | Let the kagent controller list muster's tools when it reconciles the RemoteMCPServer. Off by default: muster is an OAuth resource server and the controller holds no user token, so the chart labels the server `kagent.dev/discovery: disabled` and the agent resolves its tools at run time as the signed-in person. Turn on only for a muster without OAuth. | -| tools | list | unset: implicit full access, renders no header | The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `["preset:none"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry). Settings and `default` render as `X-Muster-Tool-Approval` beside it (`=,...,default=`), which muster applies where no Session binding carries them; agent-manager also reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render, as does `muster.requireApproval: true` together with any setting. | -| default | string | unset: no default | The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). `default: Ask` is what `muster.requireApproval: true` becomes in chart 3.0. | +| tools | list | unset: implicit full access, renders no header | The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `["preset:none"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry). Settings and `default` render as `X-Muster-Tool-Approval` beside it (`=,...,default=`), which muster applies where no Session binding carries them; agent-manager also reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render. | +| default | string | unset: no default | The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). `default: Ask` is what `muster.requireApproval: true` (removed in chart 3.0) becomes: agent-manager's `migrate` rewrites it. | | toolset | list | unset: implicit full access, renders no header | Deprecated: use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary. | | extraTools | list | `[]` | Additional raw api.kagent.dev/v1alpha3 tool bindings appended after the muster binding: `{mcp: {server: {kind: RemoteMCPServer, name}, tools, requireApproval}}` or `{subAgent: {name, description, templateRef: {name}}}` (`agentRef` in place of `templateRef` names an Agent; the runtime does not compile it yet). Servers, templates and agents are referenced in the agent's own namespace. | | labels | object | `{}` | Extra labels merged over the standard set on both objects, e.g. tenant/owner dimensions. They win over the standard set on both objects. | diff --git a/helm/agent/templates/NOTES.txt b/helm/agent/templates/NOTES.txt deleted file mode 100644 index ca9f55a..0000000 --- a/helm/agent/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -{{- if .Values.muster.requireApproval }} -muster.requireApproval is deprecated: it still pauses every tool call, and chart 3.0 migrates it to `default: Ask` (see `tools` and `default`). -{{- end }} diff --git a/helm/agent/templates/_helpers.tpl b/helm/agent/templates/_helpers.tpl index c44a4ff..5d505c4 100644 --- a/helm/agent/templates/_helpers.tpl +++ b/helm/agent/templates/_helpers.tpl @@ -118,8 +118,8 @@ An empty list is refused so it can never silently mean full access; more than 128 selectors (`tools`: 32) is refused (define a preset instead); toolset: is reserved for shared toolsets; label: exists only inside presets. `tools` also refuses a duplicated selector, preset:none next to other -entries or with a setting (or `default`), and muster.requireApproval together -with any setting. Fails the render with the offending value. +entries or with a setting (or `default`). Fails the render with the offending +value. */}} {{- define "agent.tools.resolve" -}} {{- $name := "toolset" -}} @@ -193,9 +193,6 @@ with any setting. Fails the render with the offending value. {{- end -}} {{- end -}} {{- end -}} -{{- if and $settings .Values.muster.requireApproval -}} - {{- fail "muster.requireApproval is deprecated and cannot be combined with tool approval settings (tools entries with Allow/Ask/Block, default): remove muster.requireApproval and set default: Ask" -}} -{{- end -}} {{- if $selectors -}}{{ toJson $selectors }}{{- end -}} {{- end -}} @@ -437,9 +434,6 @@ tools: tools: {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.muster.requireApproval }} - requireApproval: true - {{- end }} {{- end }} {{- with .Values.extraTools }} {{- toYaml . | nindent 2 }} diff --git a/helm/agent/tests/agent_test.yaml b/helm/agent/tests/agent_test.yaml index 39afd66..e11695b 100644 --- a/helm/agent/tests/agent_test.yaml +++ b/helm/agent/tests/agent_test.yaml @@ -972,47 +972,13 @@ tests: - list_tools - call_tool - - it: gates every muster tool call behind a human approval with muster.requireApproval + - it: refuses muster.requireApproval, removed in chart 3.0 (default Ask replaces it) set: muster: requireApproval: true - asserts: - - lengthEqual: - path: spec.template.tools - count: 1 - - equal: - path: spec.template.tools[0].mcp.server.name - value: demo - - equal: - path: spec.template.tools[0].mcp.requireApproval - value: true - - notExists: - path: spec.template.tools[0].mcp.tools - - - it: gates the narrowed binding when muster.requireApproval and muster.tools are combined - set: - muster: - requireApproval: true - tools: - - call_tool - asserts: - - equal: - path: spec.template.tools[0].mcp - value: - server: - kind: RemoteMCPServer - name: demo - tools: - - call_tool - requireApproval: true - - - it: refuses a non-boolean muster.requireApproval through the values schema - set: - muster: - requireApproval: "yes" asserts: - failedTemplate: - errorPattern: 'muster[./]requireApproval' + errorPattern: 'additional properties .requireApproval. not allowed' - it: appends extraTools after the muster binding set: @@ -1052,16 +1018,6 @@ tests: - notExists: path: spec.template.tools - - it: renders no tools for ["preset:none"] even with muster.requireApproval - set: - toolset: - - preset:none - muster: - requireApproval: true - asserts: - - notExists: - path: spec.template.tools - - it: renders only the extraTools for ["preset:none"] with extraTools set: toolset: diff --git a/helm/agent/tests/remotemcpserver_test.yaml b/helm/agent/tests/remotemcpserver_test.yaml index a29e6af..4231d19 100644 --- a/helm/agent/tests/remotemcpserver_test.yaml +++ b/helm/agent/tests/remotemcpserver_test.yaml @@ -61,23 +61,6 @@ tests: - notMatchRegexRaw: pattern: '(?i)authorization' - - it: is untouched by muster.requireApproval (the pause is the binding's, not the server's) - set: - muster: - requireApproval: true - asserts: - - hasDocuments: - count: 1 - - notMatchRegexRaw: - pattern: requireApproval - - equal: - path: spec - value: - description: muster MCP gateway of agent demo (implicit full access) - url: http://muster.agent-platform.svc.cluster.local:8090/mcp - protocol: STREAMABLE_HTTP - timeout: 60m - - it: follows agent.name set: agent: diff --git a/helm/agent/tests/tools_test.yaml b/helm/agent/tests/tools_test.yaml index 4923737..d5e1068 100644 --- a/helm/agent/tests/tools_test.yaml +++ b/helm/agent/tests/tools_test.yaml @@ -8,7 +8,6 @@ suite: tools templates: - templates/remotemcpserver.yaml - templates/agent.yaml - - templates/NOTES.txt release: name: demo namespace: demo-ns @@ -149,50 +148,42 @@ tests: - failedTemplate: errorPattern: 'tools: preset:none cannot be combined with other entries' - - it: fails on requireApproval with a setting on an entry + # chart 3.0: muster.requireApproval is gone; `default: Ask` replaces it + - it: refuses muster.requireApproval through the values schema (removed in 3.0) set: muster: requireApproval: true tools: - - server:github: Ask + - server:github asserts: - failedTemplate: - errorPattern: 'muster.requireApproval is deprecated and cannot be combined with tool approval settings \(tools entries with Allow/Ask/Block, default\): remove muster.requireApproval and set default: Ask' + errorPattern: requireApproval - - it: fails on requireApproval with default + - it: refuses muster.requireApproval false too (the key is gone, not only the flag) set: muster: - requireApproval: true - default: Ask + requireApproval: false asserts: - failedTemplate: - errorPattern: muster.requireApproval is deprecated and cannot be combined + errorPattern: requireApproval - # requireApproval alone keeps rendering - - it: renders the kagent flag for requireApproval with tools without settings + - it: renders default Ask, what muster.requireApproval true becomes, as a header and no kagent flag set: - muster: - requireApproval: true - tools: + toolset: - server:github + default: Ask asserts: - equal: + path: spec.headersFrom + value: + - name: X-Muster-Toolset + value: server:github + - name: X-Muster-Tool-Approval + value: default=Ask + template: templates/remotemcpserver.yaml + - notExists: path: spec.template.tools[0].mcp.requireApproval - value: true template: templates/agent.yaml - - equal: - path: spec.headersFrom[0].value - value: server:github - template: templates/remotemcpserver.yaml - - - it: prints a deprecation line in NOTES.txt for requireApproval - set: - muster: - requireApproval: true - asserts: - - matchRegexRaw: - pattern: muster.requireApproval is deprecated - template: templates/NOTES.txt # schema - it: refuses a setting that is not Allow, Ask or Block through the values schema diff --git a/helm/agent/values.schema.json b/helm/agent/values.schema.json index 2685f98..176ee03 100644 --- a/helm/agent/values.schema.json +++ b/helm/agent/values.schema.json @@ -185,7 +185,7 @@ "string", "null" ], - "description": "The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). `default: Ask` is what `muster.requireApproval: true` becomes in chart 3.0.", + "description": "The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). `default: Ask` is what `muster.requireApproval: true` (removed in chart 3.0) becomes: agent-manager's `migrate` rewrites it.", "enum": [ "Allow", "Ask", @@ -453,10 +453,6 @@ "type": "boolean", "description": "Wire muster into the agent's tools: render the agent's RemoteMCPServer and bind it in the Agent's template." }, - "requireApproval": { - "type": "boolean", - "description": "Deprecated: set `default: Ask` instead (chart 3.0 migrates it); fails together with any `tools` setting or `default`. Pause the agent before every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's human-in-the-loop): the Harness stops the task at `input-required` for each call and continues with the person's decision. It applies to the tools the binding exposes — `tools` when set, otherwise every muster tool. A client that negotiates kagent's HITL A2A extension (`https://kagent.dev/extensions/hitl/v1`) receives the structured `tool_approval_request` and answers it; one that does not sees a plain notice that human input is required. Off by default: the agent calls tools without asking." - }, "timeout": { "type": "string", "description": "How long one tool call through muster may run before the agent's runtime cancels it, rendered as given into the RemoteMCPServer's spec.timeout (a duration with a unit: `180s`, `5m`). Without the field kagent applies its own 30 s, which cuts a backend tool that legitimately runs longer — a write that creates a repository and opens a pull request in one call, a watch that blocks for minutes — although muster's own per-server budget for that backend allows more. The default is muster's progress cap (an MCPServer's `progress.maxDuration`, at most an hour): kagent applies the value to the whole request, which no MCP progress notification restarts, so a wait kept alive by progress (devctl's `pr_wait`, `pr_merge`, `release_wait`) returns its verdict in one call; muster still bounds every call by its backend's own `spec.timeout`, restarted by that progress, so a call is bounded by its backend, not by the caller.", @@ -519,7 +515,7 @@ "array", "null" ], - "description": "The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `[\"preset:none\"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry). Settings and `default` render as `X-Muster-Tool-Approval` beside it (`=,...,default=`), which muster applies where no Session binding carries them; agent-manager also reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render, as does `muster.requireApproval: true` together with any setting.", + "description": "The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `[\"preset:none\"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry). Settings and `default` render as `X-Muster-Tool-Approval` beside it (`=,...,default=`), which muster applies where no Session binding carries them; agent-manager also reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render.", "items": { "$ref": "#/$defs/tool.schema.json" }, diff --git a/helm/agent/values.yaml b/helm/agent/values.yaml index 82ac3c8..1f09043 100644 --- a/helm/agent/values.yaml +++ b/helm/agent/values.yaml @@ -278,19 +278,6 @@ muster: # discover the server's tools; with discovery off (the default) it may expose # the whole server and report a warning in the Agent's status.warnings. tools: [] - # @schema type:boolean - # -- Deprecated: set `default: Ask` instead (chart 3.0 migrates it); fails - # together with any `tools` setting or `default`. Pause the agent before - # every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's - # human-in-the-loop): the Harness stops the task at `input-required` for - # each call and continues with the person's decision. It applies to the - # tools the binding exposes — `tools` when set, otherwise every muster - # tool. A client that negotiates kagent's HITL A2A extension - # (`https://kagent.dev/extensions/hitl/v1`) receives the structured - # `tool_approval_request` and answers it; one that does not sees a plain - # notice that human input is required. Off by default: the agent calls - # tools without asking. - requireApproval: false # -- Tool discovery by the kagent controller against muster. discovery: # @schema type:boolean @@ -317,8 +304,7 @@ muster: # also reads them from the release values and binds them per Session. # `Allow` over a connector's `Ask` holds only when a connector admin grants it # through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` -# together fails the render, as does `muster.requireApproval: true` together -# with any setting. +# together fails the render. # @default -- unset: implicit full access, renders no header tools: @@ -326,8 +312,8 @@ tools: # -- (string) The setting for every tool in `tools` without its own: `Allow`, # `Ask` or `Block` (case-sensitive). Optional; absent means no default. # Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). -# `default: Ask` is what -# `muster.requireApproval: true` becomes in chart 3.0. +# `default: Ask` is what `muster.requireApproval: true` (removed in chart 3.0) +# becomes: agent-manager's `migrate` rewrites it. # @default -- unset: no default default: From 32f814cce68ef24e6b48a1b09bc9838bfa8af7ce Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 09:38:36 +0100 Subject: [PATCH 07/13] docs: describe the 3.0 migration of muster.requireApproval to default: Ask --- README.md | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8cbb797..642c10d 100644 --- a/README.md +++ b/README.md @@ -127,10 +127,10 @@ default: Ask # optional - Setting `tools` and `toolset` together fails the render, as does a selector listed twice, `preset:none` next to other entries or with a setting (or `default`), and a value other than `Allow`, `Ask` or `Block`. -- `muster.requireApproval` is deprecated: `true` alone keeps rendering kagent's - `requireApproval: true` and prints a deprecation line in `NOTES.txt`; with any - setting (an object item or `default`) the render fails. Chart 3.0 migrates - `requireApproval: true` to `default: Ask`. +- `muster.requireApproval` is gone in chart 3.0: the values schema refuses the + key (`true` or `false`). `default: Ask` replaces `true`: muster asks a person + before every tool call the agent makes, where kagent's flag paused the agent + ([Migrating from 2.x](#migrating-from-2x)). - An `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`; without a grant the connector's `Ask` stays in force. @@ -434,6 +434,30 @@ namespace's default model, the ModelConfig annotated or to any other ModelConfig in the namespace. A release that already sets `modelConfig.name` upgrades unchanged. +Chart 3.0 also removes `muster.requireApproval`, deprecated since `tools` and +`default` came: the values schema refuses the key, so a 2.x release that +still carries it fails its 3.0 render and stays on its 2.x revision, asking as +before, until its values change. `default: Ask` replaces `muster.requireApproval: true`: +muster, not kagent, asks a person before every tool call through it, also from +clients other than kagent's, and nothing asks twice. `false` is dropped. A +release that also sets `tools` entries with a setting or `default` never +rendered (2.x refused the combination); choose its settings by hand. + +agent-manager's `migrate` (the Agent Platform runs it on the upgrade that moves +the agent chart line to 3.x) does both rewrites before it moves a namespace's +chart source: `muster.requireApproval: true` becomes `default: Ask` (only where +the muster binding renders: not with `muster.enabled: false` or a tool list of +exactly `["preset:none"]`), the key is dropped, and an unset `modelConfig.name` +is written as `default-model-config`, what 2.x rendered. A GitOps-owned release +gets the same change as a diff in the report for the owning repository; apply +it together with the move of the source's range to 3.x. + +```diff + muster: +- requireApproval: true ++default: Ask +``` + ## Migrating from 1.x Chart 2.0 renders the kagent API that ships the `Agent` kind From 0dc63006d322777a314151d7c93d8282ccd37f2e Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 10:00:10 +0100 Subject: [PATCH 08/13] fix(helm): refuse muster.requireApproval in the templates too The values schema refused the key, but a release with schema validation skipped (HelmRelease disableSchemaValidation) rendered the agent without kagent's flag and without default: Ask. The tool list now fails on the key whatever its value. --- helm/agent/templates/_helpers.tpl | 7 ++++++- helm/agent/tests/tools_test.yaml | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/helm/agent/templates/_helpers.tpl b/helm/agent/templates/_helpers.tpl index 5d505c4..0112d74 100644 --- a/helm/agent/templates/_helpers.tpl +++ b/helm/agent/templates/_helpers.tpl @@ -118,10 +118,15 @@ An empty list is refused so it can never silently mean full access; more than 128 selectors (`tools`: 32) is refused (define a preset instead); toolset: is reserved for shared toolsets; label: exists only inside presets. `tools` also refuses a duplicated selector, preset:none next to other -entries or with a setting (or `default`). Fails the render with the offending +entries or with a setting (or `default`), and muster.requireApproval (removed +in 3.0) whatever its value, also when the values schema is skipped +(HelmRelease disableSchemaValidation). Fails the render with the offending value. */}} {{- define "agent.tools.resolve" -}} +{{- if and (kindIs "map" .Values.muster) (hasKey .Values.muster "requireApproval") -}} + {{- fail "muster.requireApproval was removed in agent chart 3.0: set default: Ask instead (muster asks a person before every tool call; agent-manager's migrate rewrites requireApproval: true to it). Remove the key, true or false" -}} +{{- end -}} {{- $name := "toolset" -}} {{- $items := .Values.toolset -}} {{- if not (kindIs "invalid" .Values.tools) -}} diff --git a/helm/agent/tests/tools_test.yaml b/helm/agent/tests/tools_test.yaml index d5e1068..9483025 100644 --- a/helm/agent/tests/tools_test.yaml +++ b/helm/agent/tests/tools_test.yaml @@ -167,6 +167,14 @@ tests: - failedTemplate: errorPattern: requireApproval + - it: refuses muster.requireApproval in the template too, so a skipped schema cannot drop the ask + set: + muster: + requireApproval: true + asserts: + - failedTemplate: + errorPattern: requireApproval + - it: renders default Ask, what muster.requireApproval true becomes, as a header and no kagent flag set: toolset: From 34fffb7f8c75222018d8669affc6517cb44edacf Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 10:00:19 +0100 Subject: [PATCH 09/13] docs: say to replace muster.requireApproval with default: Ask, and which releases migrate only reports --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 642c10d..c2857f6 100644 --- a/README.md +++ b/README.md @@ -435,13 +435,15 @@ or to any other ModelConfig in the namespace. A release that already sets `modelConfig.name` upgrades unchanged. Chart 3.0 also removes `muster.requireApproval`, deprecated since `tools` and -`default` came: the values schema refuses the key, so a 2.x release that -still carries it fails its 3.0 render and stays on its 2.x revision, asking as -before, until its values change. `default: Ask` replaces `muster.requireApproval: true`: +`default` came: the values schema and the templates refuse the key (also +with schema validation skipped), so a 2.x release that still carries it fails +its 3.0 render and stays on its 2.x revision, asking as before, until its +values change: replace it with `default: Ask`, never just delete it. `default: Ask` replaces `muster.requireApproval: true`: muster, not kagent, asks a person before every tool call through it, also from clients other than kagent's, and nothing asks twice. `false` is dropped. A release that also sets `tools` entries with a setting or `default` never -rendered (2.x refused the combination); choose its settings by hand. +rendered (no released chart ever rendered that combination); choose its +settings by hand. agent-manager's `migrate` (the Agent Platform runs it on the upgrade that moves the agent chart line to 3.x) does both rewrites before it moves a namespace's @@ -450,7 +452,11 @@ the muster binding renders: not with `muster.enabled: false` or a tool list of exactly `["preset:none"]`), the key is dropped, and an unset `modelConfig.name` is written as `default-model-config`, what 2.x rendered. A GitOps-owned release gets the same change as a diff in the report for the owning repository; apply -it together with the move of the source's range to 3.x. +it together with the move of the source's range to 3.x. A release with +`spec.valuesFrom`, one whose chart source migrate cannot move, and every +release in an organization namespace are reported with the change, never +written: no released 2.x chart takes `default`, so values and source move +together. ```diff muster: From 95493af1fbc77f950800af6ae6a94779866800be Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 10:25:32 +0100 Subject: [PATCH 10/13] test(helm): pin the template refusal of muster.requireApproval with the schema skipped helm-unittest validates the values schema first, so its case passed with the template check removed. make helm-test now renders with the schema skipped and asserts the template's own message, true and false, with muster off and for a chat-only agent. --- Makefile.custom.mk | 20 +++++++++++++++++++- helm/agent/tests/tools_test.yaml | 10 +++------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Makefile.custom.mk b/Makefile.custom.mk index 4b7bc54..6fb9ef8 100644 --- a/Makefile.custom.mk +++ b/Makefile.custom.mk @@ -22,7 +22,25 @@ helm-template: ## Render the chart with the CI values. # Prerequisite-only, no recipe: make merges it into the generated helm-test # rule, which keeps its recipe (the helm-unittest run) and gains the lint. .PHONY: helm-test -helm-test: helm-lint helm-toolset-schema-test +helm-test: helm-lint helm-toolset-schema-test helm-require-approval-test + +# Chart 3.0 refuses muster.requireApproval in its templates, not only in the +# values schema: a HelmRelease with disableSchemaValidation must not render the +# agent with neither kagent's flag nor default: Ask. helm-unittest validates +# the schema first, so this check renders with the schema skipped. +.PHONY: helm-require-approval-test +helm-require-approval-test: + @set -eu; \ + for v in true false; do \ + for extra in "" "--set muster.enabled=false" "--set toolset[0]=preset:none"; do \ + if out=$$(helm template example helm/agent --kubeconfig /dev/null --skip-schema-validation \ + --set-string modelConfig.name=schema-test --set muster.requireApproval=$$v $$extra 2>&1); then \ + echo "FAIL: muster.requireApproval=$$v $$extra renders with the schema skipped"; exit 1; \ + fi; \ + echo "$$out" | grep -q 'muster.requireApproval was removed in agent chart 3.0' || { echo "$$out" >&2; exit 1; }; \ + done; \ + done; \ + helm template example helm/agent --kubeconfig /dev/null --skip-schema-validation --set-string modelConfig.name=schema-test --set default=Ask >/dev/null .PHONY: helm-toolset-schema-test helm-toolset-schema-test: diff --git a/helm/agent/tests/tools_test.yaml b/helm/agent/tests/tools_test.yaml index 9483025..5886165 100644 --- a/helm/agent/tests/tools_test.yaml +++ b/helm/agent/tests/tools_test.yaml @@ -167,13 +167,9 @@ tests: - failedTemplate: errorPattern: requireApproval - - it: refuses muster.requireApproval in the template too, so a skipped schema cannot drop the ask - set: - muster: - requireApproval: true - asserts: - - failedTemplate: - errorPattern: requireApproval + # The template's own refusal (schema skipped) is pinned by + # `make helm-require-approval-test`: helm-unittest validates the schema + # first, whose message would satisfy any pattern here. - it: renders default Ask, what muster.requireApproval true becomes, as a header and no kagent flag set: From 303f238a3e066583b62ef9ff2b06b6d07c5588ba Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Thu, 26 Nov 2026 12:15:20 +0100 Subject: [PATCH 11/13] test(helm): assert the tools refusals on the remotemcpserver template that raises them --- helm/agent/tests/tools_test.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/helm/agent/tests/tools_test.yaml b/helm/agent/tests/tools_test.yaml index 5886165..a90b55c 100644 --- a/helm/agent/tests/tools_test.yaml +++ b/helm/agent/tests/tools_test.yaml @@ -112,6 +112,7 @@ tests: asserts: - failedTemplate: errorPattern: tools and toolset are both set + template: templates/remotemcpserver.yaml - it: fails on a duplicated selector in tools set: @@ -121,6 +122,7 @@ tests: asserts: - failedTemplate: errorPattern: 'tools selector "server:github" is listed more than once' + template: templates/remotemcpserver.yaml - it: fails on preset:none with a setting set: @@ -129,6 +131,7 @@ tests: asserts: - failedTemplate: errorPattern: 'tools: preset:none cannot carry a setting' + template: templates/remotemcpserver.yaml - it: fails on preset:none with default set: @@ -138,6 +141,7 @@ tests: asserts: - failedTemplate: errorPattern: 'tools: preset:none cannot carry a setting' + template: templates/remotemcpserver.yaml - it: fails on preset:none with other entries set: @@ -147,6 +151,7 @@ tests: asserts: - failedTemplate: errorPattern: 'tools: preset:none cannot be combined with other entries' + template: templates/remotemcpserver.yaml # chart 3.0: muster.requireApproval is gone; `default: Ask` replaces it - it: refuses muster.requireApproval through the values schema (removed in 3.0) From 23e75671764ae1842d36da77ccde63218b236abc Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Fri, 27 Nov 2026 00:14:36 +0100 Subject: [PATCH 12/13] docs: condense tool approval docs --- README.md | 80 +++++++++++++++-------------------- helm/agent/README.md | 6 +-- helm/agent/values.schema.json | 6 +-- helm/agent/values.yaml | 46 +++++++++----------- 4 files changed, 59 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index c2857f6..247bc10 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ labels: The technical resource name defaults to the Helm release name. By default the agent is wired to the platform's muster gateway with **all** of its (dynamic) tools — implicit full access to everything the gateway exposes to the invoking -human. Declare a **toolset** (deprecated, use `tools` below) to compose the agent with a subset: +human. Declare a **toolset** (deprecated, see `tools` below) to compose the agent with a subset: ```yaml toolset: @@ -101,9 +101,9 @@ agent gets no wider access of its own. ### Tools with approval settings -`tools` replaces `toolset` (deprecated: use `tools`). An item is a selector, or -a one-key object that gives the selector a setting (`Allow`, `Ask` or `Block`, -case-sensitive); `default` is the setting for every listed tool without its own: +`tools` replaces the deprecated `toolset`. An item is a selector or a one-key +object giving it a setting (`Allow`, `Ask` or `Block`, case-sensitive); +`default` is the setting of every listed tool without its own. ```yaml tools: # 1 to 32 items; unlisted tools are invisible @@ -114,26 +114,19 @@ tools: # 1 to 32 items; unlisted tools are default: Ask # optional ``` -- The selectors alone, settings stripped, render exactly as `toolset` renders - them: the `X-Muster-Toolset` header, and `["preset:none"]` renders no - `RemoteMCPServer` and no muster binding. Settings and `default` render as a - second header, `X-Muster-Tool-Approval: =,...,default=`, - which muster applies to requests no Session binding covers (it carries no - grants, so it only tightens); agent-manager reads them from the release values - and binds them, with grants, to every Session it starts. Only those bound - settings are enforced whatever the client does: the header is sent by the - agent's runtime, so for a Session agent-manager did not start the settings - hold only while the runtime sends it. -- Setting `tools` and `toolset` together fails the render, as does a selector - listed twice, `preset:none` next to other entries or with a setting (or - `default`), and a value other than `Allow`, `Ask` or `Block`. -- `muster.requireApproval` is gone in chart 3.0: the values schema refuses the - key (`true` or `false`). `default: Ask` replaces `true`: muster asks a person - before every tool call the agent makes, where kagent's flag paused the agent - ([Migrating from 2.x](#migrating-from-2x)). -- An `Allow` over a connector's `Ask` holds only when a connector admin grants - it through agent-manager's `set_agent_approval`; without a grant the connector's - `Ask` stays in force. +- The selectors alone render as `toolset` does (`X-Muster-Toolset`; + `["preset:none"]` renders no `RemoteMCPServer` and no muster binding). + Settings and `default` render as the header `X-Muster-Tool-Approval`, which + muster applies where no Session binding carries settings (it only tightens). + agent-manager binds them, with grants, to every Session it starts; only + those bindings hold whatever the runtime does. +- The render fails for `tools` with `toolset`, a duplicate selector, + `preset:none` beside other entries or with a setting or `default`, and any + value but `Allow`, `Ask` or `Block`. +- An `Allow` over a connector's `Ask` needs a grant by a connector admin + through agent-manager's `set_agent_approval`; without it the `Ask` stays. +- `muster.requireApproval` is removed in chart 3.0 (the schema refuses it): + use `default: Ask`, see [Migrating from 2.x](#migrating-from-2x). `muster.tools` narrows the binding to a subset of muster's *meta-tools* (`list_tools`, `call_tool`, ...), not the tools behind the gateway — a toolset @@ -434,29 +427,13 @@ namespace's default model, the ModelConfig annotated or to any other ModelConfig in the namespace. A release that already sets `modelConfig.name` upgrades unchanged. -Chart 3.0 also removes `muster.requireApproval`, deprecated since `tools` and -`default` came: the values schema and the templates refuse the key (also -with schema validation skipped), so a 2.x release that still carries it fails -its 3.0 render and stays on its 2.x revision, asking as before, until its -values change: replace it with `default: Ask`, never just delete it. `default: Ask` replaces `muster.requireApproval: true`: -muster, not kagent, asks a person before every tool call through it, also from -clients other than kagent's, and nothing asks twice. `false` is dropped. A -release that also sets `tools` entries with a setting or `default` never -rendered (no released chart ever rendered that combination); choose its -settings by hand. - -agent-manager's `migrate` (the Agent Platform runs it on the upgrade that moves -the agent chart line to 3.x) does both rewrites before it moves a namespace's -chart source: `muster.requireApproval: true` becomes `default: Ask` (only where -the muster binding renders: not with `muster.enabled: false` or a tool list of -exactly `["preset:none"]`), the key is dropped, and an unset `modelConfig.name` -is written as `default-model-config`, what 2.x rendered. A GitOps-owned release -gets the same change as a diff in the report for the owning repository; apply -it together with the move of the source's range to 3.x. A release with -`spec.valuesFrom`, one whose chart source migrate cannot move, and every -release in an organization namespace are reported with the change, never -written: no released 2.x chart takes `default`, so values and source move -together. +Chart 3.0 also removes `muster.requireApproval`, in the schema and the +templates (also with schema validation skipped): a 2.x release still carrying +it fails its 3.0 render and stays on its 2.x revision until its values change. +Replace `true` with `default: Ask` (muster asks a person before every tool +call, where kagent's flag paused the agent), never just delete it; `false` is +dropped. A release that also sets `tools` settings or `default` never rendered +before: choose its settings by hand. ```diff muster: @@ -464,6 +441,15 @@ together. +default: Ask ``` +agent-manager's `migrate` (run by the Agent Platform upgrade to the 3.x line) +does both rewrites before it moves a namespace's chart source: `requireApproval: +true` becomes `default: Ask` (only where the muster binding renders), and an +unset `modelConfig.name` is written as `default-model-config`. A GitOps-owned +release gets the change as a diff in the report; apply it together with the +move of the source's range to 3.x. A release with `spec.valuesFrom`, one whose +source migrate cannot move, and every release in an organization namespace is +reported, never written. + ## Migrating from 1.x Chart 2.0 renders the kagent API that ships the `Agent` kind diff --git a/helm/agent/README.md b/helm/agent/README.md index 875f175..f5ef207 100644 --- a/helm/agent/README.md +++ b/helm/agent/README.md @@ -49,9 +49,9 @@ What an agent can reach and how to add a host (`agent.egress`): [What an agent c | muster.tools | list | `[]` | Set to narrow the binding to a subset of muster's meta-tools (`list_tools`, `call_tool`, ...); leave empty to bind every tool. Rendered into the binding's `tools`. A toolset is the way to narrow the tools behind the gateway. A Harness enforces a partial selection only when it can discover the server's tools; with discovery off (the default) it may expose the whole server and report a warning in the Agent's status.warnings. | | muster.discovery | object | `{"enabled":false}` | Tool discovery by the kagent controller against muster. | | muster.discovery.enabled | bool | `false` | Let the kagent controller list muster's tools when it reconciles the RemoteMCPServer. Off by default: muster is an OAuth resource server and the controller holds no user token, so the chart labels the server `kagent.dev/discovery: disabled` and the agent resolves its tools at run time as the signed-in person. Turn on only for a muster without OAuth. | -| tools | list | unset: implicit full access, renders no header | The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `["preset:none"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry). Settings and `default` render as `X-Muster-Tool-Approval` beside it (`=,...,default=`), which muster applies where no Session binding carries them; agent-manager also reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render. | -| default | string | unset: no default | The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). `default: Ask` is what `muster.requireApproval: true` (removed in chart 3.0) becomes: agent-manager's `migrate` rewrites it. | -| toolset | list | unset: implicit full access, renders no header | Deprecated: use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary. | +| tools | list | unset: implicit full access, renders no header | The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector (`preset:`, `server:`, `workflow:` or `tool:`, exact and case-sensitive, each once) or a one-key object giving it `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Unlisted tools are invisible. The selectors render as `toolset` does (exactly `["preset:none"]` renders no RemoteMCPServer and takes no setting or other entry); settings and `default` render as the header `X-Muster-Tool-Approval`, which muster applies where no Session binding carries them, and agent-manager binds them per Session. An `Allow` over a connector's `Ask` needs a grant by a connector admin through agent-manager's `set_agent_approval`. `tools` with `toolset` fails the render. | +| default | string | unset: no default | The setting of every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). `default: Ask` replaces the removed `muster.requireApproval: true`. | +| toolset | list | unset: implicit full access, renders no header | Deprecated, use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary. | | extraTools | list | `[]` | Additional raw api.kagent.dev/v1alpha3 tool bindings appended after the muster binding: `{mcp: {server: {kind: RemoteMCPServer, name}, tools, requireApproval}}` or `{subAgent: {name, description, templateRef: {name}}}` (`agentRef` in place of `templateRef` names an Agent; the runtime does not compile it yet). Servers, templates and agents are referenced in the agent's own namespace. | | labels | object | `{}` | Extra labels merged over the standard set on both objects, e.g. tenant/owner dimensions. They win over the standard set on both objects. | | annotations | object | `{}` | Extra annotations merged next to the display-name, icon-url and tags annotations on the Agent. ui.giantswarm.io/display-name, icon-url and tags are refused here; set agent.displayName, agent.iconUrl and agent.tags. | diff --git a/helm/agent/values.schema.json b/helm/agent/values.schema.json index 176ee03..228d076 100644 --- a/helm/agent/values.schema.json +++ b/helm/agent/values.schema.json @@ -185,7 +185,7 @@ "string", "null" ], - "description": "The setting for every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). Optional; absent means no default. Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). `default: Ask` is what `muster.requireApproval: true` (removed in chart 3.0) becomes: agent-manager's `migrate` rewrites it.", + "description": "The setting of every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). `default: Ask` replaces the removed `muster.requireApproval: true`.", "enum": [ "Allow", "Ask", @@ -515,7 +515,7 @@ "array", "null" ], - "description": "The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector string or an object with one key (a selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); a selector appears once. An unlisted tool is invisible to the agent. The selectors alone render as the `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly `[\"preset:none\"]` renders no RemoteMCPServer and no muster binding, and takes no setting and no other entry). Settings and `default` render as `X-Muster-Tool-Approval` beside it (`=,...,default=`), which muster applies where no Session binding carries them; agent-manager also reads them from the release values and binds them per Session. `Allow` over a connector's `Ask` holds only when a connector admin grants it through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` together fails the render.", + "description": "The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector (`preset:`, `server:`, `workflow:` or `tool:`, exact and case-sensitive, each once) or a one-key object giving it `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Unlisted tools are invisible. The selectors render as `toolset` does (exactly `[\"preset:none\"]` renders no RemoteMCPServer and takes no setting or other entry); settings and `default` render as the header `X-Muster-Tool-Approval`, which muster applies where no Session binding carries them, and agent-manager binds them per Session. An `Allow` over a connector's `Ask` needs a grant by a connector admin through agent-manager's `set_agent_approval`. `tools` with `toolset` fails the render.", "items": { "$ref": "#/$defs/tool.schema.json" }, @@ -527,7 +527,7 @@ "array", "null" ], - "description": "Deprecated: use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `[\"preset:none\"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary.", + "description": "Deprecated, use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:`, `server:`, `workflow:` or `tool:` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `[\"preset:none\"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary.", "items": { "type": "string" }, diff --git a/helm/agent/values.yaml b/helm/agent/values.yaml index 1f09043..b5820d9 100644 --- a/helm/agent/values.yaml +++ b/helm/agent/values.yaml @@ -290,40 +290,34 @@ muster: # @schema type:[array, null];itemRef:tool.schema.json;minItems:1;maxItems:32 # -- (list) The tools the agent is composed with, 1 to 32 items; replaces -# `toolset`. An item is a selector string or an object with one key (a -# selector) whose value is `Allow`, `Ask` or `Block`, e.g. `- server:github: -# Ask`. Selectors are `preset:`, `server:`, `workflow:` or -# `tool:` with exact, case-sensitive names (regex -# `^(preset|server|workflow|tool):[^\s,]+$`); a selector appears once. An -# unlisted tool is invisible to the agent. The selectors alone render as the -# `toolset` header (`X-Muster-Toolset` on the RemoteMCPServer; exactly -# `["preset:none"]` renders no RemoteMCPServer and no muster binding, and -# takes no setting and no other entry). Settings and `default` render as -# `X-Muster-Tool-Approval` beside it (`=,...,default=`), -# which muster applies where no Session binding carries them; agent-manager -# also reads them from the release values and binds them per Session. -# `Allow` over a connector's `Ask` holds only when a connector admin grants it -# through agent-manager's `set_agent_approval`. Setting `tools` and `toolset` -# together fails the render. +# `toolset`. An item is a selector (`preset:`, `server:`, `workflow:` or +# `tool:`, exact and case-sensitive, each once) or a one-key object +# giving it `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Unlisted +# tools are invisible. The selectors render as `toolset` does (exactly +# `["preset:none"]` renders no RemoteMCPServer and takes no setting or other +# entry); settings and `default` render as the header `X-Muster-Tool-Approval`, +# which muster applies where no Session binding carries them, and +# agent-manager binds them per Session. An `Allow` over a connector's `Ask` +# needs a grant by a connector admin through agent-manager's +# `set_agent_approval`. `tools` with `toolset` fails the render. # @default -- unset: implicit full access, renders no header tools: # @schema type:[string, null];enum:[Allow, Ask, Block, null] -# -- (string) The setting for every tool in `tools` without its own: `Allow`, -# `Ask` or `Block` (case-sensitive). Optional; absent means no default. -# Renders into `X-Muster-Tool-Approval` (and is bound by agent-manager). -# `default: Ask` is what `muster.requireApproval: true` (removed in chart 3.0) -# becomes: agent-manager's `migrate` rewrites it. +# -- (string) The setting of every tool in `tools` without its own: `Allow`, +# `Ask` or `Block` (case-sensitive). `default: Ask` replaces the removed +# `muster.requireApproval: true`. # @default -- unset: no default default: # @schema type:[array, null];item:string;maxItems:128 -# -- (list) Deprecated: use `tools`. The tools the agent is composed with: a list of selectors that muster -# resolves per request. Selectors are `preset:`, `server:`, -# `workflow:` or `tool:` with exact, case-sensitive names (regex -# `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a -# preset for more. `toolset:` is reserved and refused; patterns, -# excludes, the read-only predicate and `label:` exist only inside presets. +# -- (list) Deprecated, use `tools`. The tools the agent is composed with: a +# list of selectors that muster resolves per request. Selectors are +# `preset:`, `server:`, `workflow:` or `tool:` with +# exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); +# at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for +# more. `toolset:` is reserved and refused; patterns, excludes, the +# read-only predicate and `label:` exist only inside presets. # Rendered as the static `X-Muster-Toolset` header on the agent's # RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly # `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so From a294ac4e3a235f87e97d351c2d32075ef3a8f3ac Mon Sep 17 00:00:00 2001 From: Dominik Schmidle Date: Sat, 28 Nov 2026 15:44:25 +0100 Subject: [PATCH 13/13] docs: describe what migrate writes in organization namespaces --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 247bc10..e6b85ef 100644 --- a/README.md +++ b/README.md @@ -444,11 +444,13 @@ before: choose its settings by hand. agent-manager's `migrate` (run by the Agent Platform upgrade to the 3.x line) does both rewrites before it moves a namespace's chart source: `requireApproval: true` becomes `default: Ask` (only where the muster binding renders), and an -unset `modelConfig.name` is written as `default-model-config`. A GitOps-owned -release gets the change as a diff in the report; apply it together with the -move of the source's range to 3.x. A release with `spec.valuesFrom`, one whose -source migrate cannot move, and every release in an organization namespace is -reported, never written. +unset `modelConfig.name` is written as `default-model-config`. Releases in +organization namespaces that migrate manages are rewritten the same way. A +GitOps-owned release gets the change as a diff in the report; apply it together +with the move of the source's range to 3.x. A release with `spec.valuesFrom` or +one whose source migrate cannot move is reported, never written. Readiness is +reported through the ready mark the operator waits for (with the release's UID +and generation). ## Migrating from 1.x