callstate

package
v2.0.23 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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