nativeinbox

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 14 Imported by: 0 modules, 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 nativeinbox posts to the current Claude MCP parent's inherited local inbox. Credentials stay in this process; they are never discovered from disk.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnavailable    = errors.New("native inbox unavailable for this session")
	ErrInvalidMessage = errors.New("native inbox message exceeds limits or has invalid structure")
	ErrDelivery       = errors.New("native inbox write failed")
)

Functions

This section is empty.

Types

type Poster

type Poster struct {
	// contains filtered or unexported fields
}

Poster holds only the endpoint and credentials inherited by this MCP child. Each Post opens its own bounded connection; callers may post concurrently.

func FromEnvironment

func FromEnvironment(expectedSessionID string) (*Poster, error)

FromEnvironment requires the observed parent identity to match the inherited session UUID exactly. No fallback selects another session or reads token files.

func FromParentEnvironment

func FromParentEnvironment(parentPID int, verifyCurrent func(context.Context) bool) (*Poster, error)

FromParentEnvironment binds the inherited inbox to its actual server process. verifyCurrent rechecks the parent after dialing, before any credential write.

func (*Poster) Post

func (p *Poster) Post(ctx context.Context, message broker.Message) error

Post authenticates, then writes one user frame per message in FIFO order. Success means local writes completed, not authentication acknowledgement or model receipt. Errors can follow partial writes; callers must not blindly retry.

Jump to

Keyboard shortcuts

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