Documentation
¶
Overview ¶
Package primarytext holds shared primary text connector helpers.
Index ¶
- func GoalProgressText(turnNumber, maxTurns int) string
- func RunOneOffCronjob(ctx context.Context, runner OneOffCronjobRunner, loaded cronjob.OneOffCronjob, ...)
- func SplitDiscordText(text string, preferredLimit, hardLimit int) []string
- func SplitSlackText(text string, preferredLimit, hardLimit int) []string
- type OneOffCronjobRunner
- type ThreadAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoalProgressText ¶
GoalProgressText returns the shared visible goal progress prefix.
func RunOneOffCronjob ¶
func RunOneOffCronjob(ctx context.Context, runner OneOffCronjobRunner, loaded cronjob.OneOffCronjob, publish func(context.Context, string, string, bool, bool, []events.OutboundAttachment) error, onPublishError func(error))
RunOneOffCronjob wires shared on-demand cron progress and final output handling.
func SplitDiscordText ¶
SplitDiscordText splits Discord responses on the same preferred boundaries as the connector.
func SplitSlackText ¶
SplitSlackText splits Slack responses on the same preferred boundaries as the connector.
Types ¶
type OneOffCronjobRunner ¶
type OneOffCronjobRunner interface {
LoadOneOffCronjob(string) (cronjob.OneOffCronjob, error)
RunOneOffCronjob(context.Context, cronjob.OneOffCronjob, *harnessbridge.RawRunProgress, func(context.Context, cronjob.RunResult, error))
}
OneOffCronjobRunner runs one loaded cronjob with progress callbacks.
type ThreadAgent ¶
ThreadAgent is one configured text prefix to managed-agent mapping.
func MatchThreadAgent ¶
func MatchThreadAgent(text string, agents []ThreadAgent, trimText bool) (ThreadAgent, string, bool)
MatchThreadAgent returns the configured agent matched by a connector-normalized prefix.
func NormalizeThreadAgents ¶
func NormalizeThreadAgents(threadAgents config.ThreadAgents, longestFirst bool) []ThreadAgent
NormalizeThreadAgents trims configured managed-agent prefixes and preserves connector-specific ordering.