Documentation
¶
Overview ¶
Package mcp provides an independently composed, bounded SDK adapter.
Index ¶
Constants ¶
View Source
const MaxFrame = 64 * 1024
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run owns the supplied I/O. Close must unblock both Read and Write. Caller cancellation (including a signal-derived context), EOF and framing failure cancel all request contexts, join SDK handlers, then close composition resources. Ports must return on cancellation; Go cannot forcibly stop an arbitrary port.
Types ¶
type Backend ¶
type Backend interface {
Notify(context.Context, agentnotify.Payload, origin.Context, notification.Deadline) agentnotify.Receipt
}
Backend is constructed once by composition and must honor cancellation.
type Options ¶
type Options struct {
Backend Backend
Status StatusPort
Clock agentnotify.Clock
// AdapterKind is operator configured: codex or claude. Never model supplied.
AdapterKind string
// CloseResources is called once after every SDK handler has joined.
CloseResources func() error
}
type Status ¶
type Status struct {
Enabled bool `json:"enabled"`
Configuration string `json:"configuration"`
Capability string `json:"capability"`
ContextReason string `json:"context_reason"`
// DedupScope and RateScope describe identity buckets, not caller trust.
// The runtime-wide rate cap also applies to every bucket.
DedupScope string `json:"dedup_scope"`
RateScope string `json:"rate_scope"`
}
Status contains only bounded configuration and capability diagnostics, no history.
Click to show internal directories.
Click to hide internal directories.