diff

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package diff compares two manifests and reports what was added, removed, or changed so a human approver can judge whether a capability change is safe.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Summarize

func Summarize(d *Diff) []string

Summarize renders a Diff as short human-readable lines, e.g. "Added tool: upload_attachment" — used anywhere a diff needs to be shown to a person or included in a notification (dashboard, API, webhook) without duplicating this formatting in each of those callers.

Types

type Diff

type Diff struct {
	AddedTools   []string     `json:"added_tools"`
	RemovedTools []string     `json:"removed_tools"`
	ChangedTools []ToolChange `json:"changed_tools"`

	AddedPrompts   []string       `json:"added_prompts"`
	RemovedPrompts []string       `json:"removed_prompts"`
	ChangedPrompts []PromptChange `json:"changed_prompts"`

	AddedResources   []string         `json:"added_resources"`
	RemovedResources []string         `json:"removed_resources"`
	ChangedResources []ResourceChange `json:"changed_resources"`
}

Diff is the set of differences between two manifest versions.

func Compare

func Compare(baseline, current *manifest.Manifest) *Diff

Compare returns the diff from baseline to current. baseline may be nil, meaning there is no prior approved baseline — every tool/prompt/resource in current is then reported as added.

type PromptChange

type PromptChange struct {
	Name               string `json:"name"`
	DescriptionChanged bool   `json:"description_changed"`
	ArgumentsChanged   bool   `json:"arguments_changed"`
}

type ResourceChange

type ResourceChange struct {
	URI                string `json:"uri"`
	DescriptionChanged bool   `json:"description_changed"`
	MimeTypeChanged    bool   `json:"mime_type_changed"`
}

type ToolChange

type ToolChange struct {
	Name               string `json:"name"`
	DescriptionChanged bool   `json:"description_changed"`
	SchemaChanged      bool   `json:"schema_changed"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL