missiontools

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 8 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

Index

Constants

View Source
const (
	ToolNameReport       = "mission_report"
	ToolNameAskAttention = "mission_ask_attention"
	ToolNamePlan         = "mission_plan"
	ToolNameFinish       = "mission_finish"
)
View Source
const (
	ToolNameListMissions = "mission_list"
	ToolNameAnswer       = "mission_answer"
)
View Source
const ToolsProviderName = "mission"

Variables

This section is empty.

Functions

func MissionIDFromContext

func MissionIDFromContext(ctx context.Context) string

func New

func New(missions MissionStore, asker AttentionAsker, opts ...Option) taskengine.ToolsRepo

func ParentSessionIDFromContext

func ParentSessionIDFromContext(ctx context.Context) string

func WithMissionID

func WithMissionID(ctx context.Context, missionID string) context.Context

func WithParentSessionID

func WithParentSessionID(ctx context.Context, contenoxSessionID string) context.Context

Types

type AttentionAsker

type AttentionAsker interface {
	RaiseAttention(ctx context.Context, missionID, summary, detail string) (string, error)
}

type AttentionResolver

type AttentionResolver interface {
	PendingAsks(ctx context.Context, missionID string) ([]PendingAsk, error)
	AnswerAsAgent(ctx context.Context, askID, text string) error
}

type MissionStore

type MissionStore interface {
	AddReport(ctx context.Context, missionID string, report *missionservice.Report) error
	Heartbeat(ctx context.Context, id string, lastErr string) (*missionservice.Mission, error)
	SetPlan(ctx context.Context, id string, entries []missionservice.PlanEntry, explanation string) (*missionservice.Mission, error)
	Finish(ctx context.Context, id string, status missionservice.Status, reason string) (*missionservice.Mission, error)
}

type Option

type Option func(*provider)

func WithSupervision

func WithSupervision(store SupervisorStore, resolver AttentionResolver) Option

type PendingAsk

type PendingAsk struct {
	AskID     string `json:"askId"`
	MissionID string `json:"missionId"`
	Question  string `json:"question"`
	Detail    string `json:"detail,omitempty"`
	AskedAt   string `json:"askedAt,omitempty"`
}

type SupervisorStore

type SupervisorStore interface {
	MissionsFiredBy(ctx context.Context, parentSessionID string, limit int) ([]*missionservice.Mission, error)
	ListReports(ctx context.Context, missionID string, limit int) ([]*missionservice.Report, error)
}

Jump to

Keyboard shortcuts

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