Sync excluded field to MCP and CLI

Add excluded boolean to the MCP CookiePattern schema and
UpdateCookiePatternInput. Expose it in CLI cookie-pattern
view, list, and update commands.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-01 16:48:55 +04:00
parent 3ed61c6084
commit dd1d0ebffb
6 changed files with 29 additions and 2 deletions

View File

@@ -5093,6 +5093,9 @@ func (r *Resolver) UpdateCookiePatternTool(ctx context.Context, req *mcp.CallToo
if v := UnwrapOmittable(input.Description); v != nil && *v != nil {
updateReq.Description = *v
}
if v := UnwrapOmittable(input.Excluded); v != nil && *v != nil {
updateReq.Excluded = *v
}
pattern, err := r.cookieBanner.UpdateCookiePattern(ctx, scope, updateReq)
if err != nil {
return nil, types.UpdateCookiePatternOutput{}, fmt.Errorf("cannot update cookie pattern: %w", err)

View File

@@ -9320,6 +9320,7 @@ components:
- display_name
- description
- source
- excluded
- created_at
- updated_at
properties:
@@ -9357,6 +9358,9 @@ components:
type: string
enum: [SCRIPT, PRE_EXISTING]
description: How the pattern was discovered
excluded:
type: boolean
description: Whether this pattern is excluded from the consent banner
created_at:
type: string
format: date-time
@@ -9889,6 +9893,11 @@ components:
- string
- "null"
go.probo.inc/mcpgen/omittable: true
excluded:
type:
- boolean
- "null"
go.probo.inc/mcpgen/omittable: true
UpdateCookiePatternOutput:
type: object

View File

@@ -31,6 +31,7 @@ func NewCookiePattern(p *coredata.CookiePattern) *CookiePattern {
MaxAgeSeconds: p.MaxAgeSeconds,
Description: p.Description,
Source: CookiePatternSource(p.Source),
Excluded: p.Excluded,
CreatedAt: p.CreatedAt,
UpdatedAt: p.UpdatedAt,
}