satisfy

package
v0.2.28 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package satisfy decides whether a tool does what a capability's contract asks, where the client gives the tool's input schema.

The rule, which is normative:

Arguments, checked at admission: every argument the contract declares
must be accepted by the connector, and every argument the connector
marks required must be supplied by the contract. Extras on either side
are allowed.

Results cannot be checked at admission, so they are validated at run
time against the contract.

The rule also covers types and a connector that describes nothing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Arguments

func Arguments(contract, tool map[string]any) []string

Arguments applies the admission half of the rule. It returns what stops the tool from satisfying the contract; empty means it satisfies.

func CallArguments

func CallArguments(contract, args map[string]any) string

CallArguments applies the contract at the moment of a call. The admission rule checks the connector against the contract before anything runs; this checks what the program actually sends. Every argument must be one the contract declares, with the type it declares, and every argument the contract requires must be present. A contract that declares no properties says nothing a call can be held against. It returns "" when the call conforms.

func Digest

func Digest(schema map[string]any) string

Digest identifies a schema whatever order its keys are written in. It is the `schema` of a binding: when it changes, the connector changed shape under the package.

func Result

func Result(contract map[string]any, answer string) string

Result applies the run-time half: the tool's answer is checked against the contract's result schema. It returns "" when the answer conforms.

Types

This section is empty.

Jump to

Keyboard shortcuts

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