callstate

package
v2.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package callstate answers whether the CALLER ended a call, as opposed to the MCP service's own tool-call ceiling. Both arrive as context.DeadlineExceeded, so ctx.Err() cannot separate them; the ceiling stamps a cause and Abandoned is the one place it is compared. What each caller does with the answer, and why one place: pkg/mcp/middleware/README.md.

Index

Constants

This section is empty.

Variables

View Source
var ErrCeilingExpired = errors.New("the tool call exceeded its ceiling")

ErrCeilingExpired is stamped by pkg/mcp/middleware (Deadline), read only here.

Functions

func Abandoned

func Abandoned(ctx context.Context) bool

Abandoned reports that ctx ended and the tool-call ceiling was not what ended it — so the failure is evidence about the caller and about nothing else. An unstamped expiry counts: only the ceiling stamps. ⚠ Pass the context the CALL owns, never one narrowed inside it, and never nil — every caller gets one from net/http or from a handler chain, so a guard here would only hide a wiring bug.

Types

This section is empty.

Jump to

Keyboard shortcuts

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