mcpbridge

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvReceiveIDType   = "ALICE_MCP_RECEIVE_ID_TYPE"
	EnvReceiveID       = "ALICE_MCP_RECEIVE_ID"
	EnvResourceRoot    = "ALICE_MCP_RESOURCE_ROOT"
	EnvSourceMessageID = "ALICE_MCP_SOURCE_MESSAGE_ID"
	EnvActorUserID     = "ALICE_MCP_ACTOR_USER_ID"
	EnvActorOpenID     = "ALICE_MCP_ACTOR_OPEN_ID"
	EnvChatType        = "ALICE_MCP_CHAT_TYPE"
	EnvSessionKey      = "ALICE_MCP_SESSION_KEY"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionContext

type SessionContext struct {
	ReceiveIDType   string
	ReceiveID       string
	ResourceRoot    string
	SourceMessageID string
	ActorUserID     string
	ActorOpenID     string
	ChatType        string
	SessionKey      string
}

func MergeSessionContext

func MergeSessionContext(primary, fallback SessionContext) SessionContext

MergeSessionContext fills empty fields in primary with values from fallback.

func SessionContextFromEnv

func SessionContextFromEnv(getenv func(key string) string) SessionContext

func SessionContextFromProcessTree

func SessionContextFromProcessTree(
	startPID int,
	readFile func(string) ([]byte, error),
	maxDepth int,
) SessionContext

SessionContextFromProcessTree tries to read session context from process ancestry (Linux /proc/<pid>/environ), starting from startPID.

func (SessionContext) ToEnv

func (c SessionContext) ToEnv() map[string]string

func (SessionContext) Validate

func (c SessionContext) Validate() error

Jump to

Keyboard shortcuts

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