agentctx

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package agentctx defines context keys for adapter routing information that flows through the agent pipeline. Both agent and configmcp import this package to set and extract routing context without coupling to each other.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapter

func Adapter(ctx context.Context) string

Adapter extracts the adapter name, or "" if unset.

func ConversationID

func ConversationID(ctx context.Context) string

ConversationID extracts the conversation ID, or "" if unset.

func ExternalID

func ExternalID(ctx context.Context) string

ExternalID extracts the external message ID, or "" if unset.

func WithAdapter

func WithAdapter(ctx context.Context, name string) context.Context

WithAdapter returns a context carrying the adapter name (e.g. "telegram", "ws").

func WithConversationID

func WithConversationID(ctx context.Context, id string) context.Context

WithConversationID returns a context carrying the conversation ID.

func WithExternalID

func WithExternalID(ctx context.Context, id string) context.Context

WithExternalID returns a context carrying the platform-specific message ID.

func WithSkillContext added in v0.31.8

func WithSkillContext(ctx context.Context, s *SkillSummary) context.Context

WithSkillContext returns a context carrying skill metadata for supervisor review.

Types

type SkillSummary added in v0.31.8

type SkillSummary struct {
	Name         string
	Description  string
	Body         string // skill body (markdown); truncated at render time
	IsScheduled  bool
	ScheduleName string
}

SkillSummary carries lightweight metadata about the skill driving the current session. Used by the supervisor to understand *why* a tool call is being made, especially for scheduled skill invocations.

func SkillContext added in v0.31.8

func SkillContext(ctx context.Context) *SkillSummary

SkillContext extracts the skill summary, or nil if unset.

Jump to

Keyboard shortcuts

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