Versions in this module Expand all Collapse all v0 v0.0.3 Mar 26, 2026 v0.0.1 Mar 24, 2026 Changes in this version + func BuildCronMessage(jobID, jobName, message, timezone string) string + func ComputeNextRunAtMs(schedule Schedule, nowMs int64) *int64 + func ExecuteTool(ctx context.Context, args map[string]any, deps ToolExecDeps) (string, error) + func New(host iruntime.Host) iruntime.ModuleHooks + func ValidateDeliveryTo(to string) error + func WrapSafeExternalPrompt(message string) string + type Delivery struct + BestEffort *bool + Channel string + Mode DeliveryMode + To string + type DeliveryMode string + const DeliveryAnnounce + const DeliveryNone + type DeliveryPatch struct + BestEffort *bool + Channel *string + Mode *DeliveryMode + To *string + type DeliveryResolverDeps struct + DefaultChatRoomID func() string + IsLoggedIn func() bool + IsStaleTarget func(roomID string, agentID string) bool + LastActiveRoomID func(agentID string) string + ResolveLastTarget func(agentID string) (channel string, target string, ok bool) + ResolvePortalByRoom func(roomID string) any + type DeliveryTarget struct + Channel string + Portal any + Reason string + RoomID string + func ResolveCronDeliveryTarget(agentID string, delivery *Delivery, deps DeliveryResolverDeps) DeliveryTarget + type Integration struct + func (i *Integration) CommandDefinitions(_ context.Context, _ iruntime.CommandScope) []iruntime.CommandDefinition + func (i *Integration) ExecuteCommand(ctx context.Context, call iruntime.CommandCall) (bool, error) + func (i *Integration) ExecuteTool(ctx context.Context, call iruntime.ToolCall) (bool, string, error) + func (i *Integration) Name() string + func (i *Integration) Start(context.Context) error + func (i *Integration) Stop() + func (i *Integration) ToolAvailability(_ context.Context, _ iruntime.ToolScope, toolName string) (bool, bool, iruntime.SettingSource, string) + func (i *Integration) ToolDefinitions(_ context.Context, _ iruntime.ToolScope) []iruntime.ToolDefinition + type Job struct + AgentID string + CreatedAtMs int64 + DeleteAfterRun bool + Delivery *Delivery + Description string + Enabled bool + ID string + Name string + Payload Payload + Schedule Schedule + State JobState + UpdatedAtMs int64 + type JobCreate struct + AgentID *string + DeleteAfterRun *bool + Delivery *Delivery + Description *string + Enabled *bool + Name string + Payload Payload + Schedule Schedule + State *JobState + func NormalizeJobCreate(input JobCreate) JobCreate + func NormalizeJobCreateRaw(raw any) (JobCreate, error) + type JobPatch struct + AgentID *string + DeleteAfterRun *bool + Delivery *DeliveryPatch + Description *string + Enabled *bool + Name *string + Payload *PayloadPatch + Schedule *Schedule + State *JobState + func NormalizeJobPatchRaw(raw any) (JobPatch, error) + type JobState struct + LastDurationMs *int64 + LastError string + LastRunAtMs *int64 + LastStatus string + NextRunAtMs *int64 + RunningAtMs *int64 + type Payload struct + AllowUnsafeExternal *bool + Kind string + Message string + Model string + Thinking string + TimeoutSeconds *int + type PayloadPatch struct + AllowUnsafeExternal *bool + Kind string + Message *string + Model *string + Thinking *string + TimeoutSeconds *int + type ReminderContextLine struct + Role string + Text string + type Schedule struct + AnchorMs *int64 + At string + EveryMs int64 + Expr string + Kind string + TZ string + type TimestampValidationResult struct + Message string + Ok bool + func ValidateSchedule(schedule Schedule) TimestampValidationResult + func ValidateScheduleTimestamp(schedule Schedule, nowMs int64) TimestampValidationResult + type ToolCreateContext struct + AgentID string + SourceInternal bool + SourceRoomID string + type ToolExecDeps struct + Add func(input JobCreate) (Job, error) + List func(includeDisabled bool) ([]Job, error) + NowMs func() int64 + Remove func(id string) (bool, error) + ResolveCreateContext func() ToolCreateContext + ResolveReminderLines func(count int) []ReminderContextLine + Run func(id string) (bool, string, error) + Status func() (enabled bool, backend string, jobCount int, nextRun *int64, err error) + Update func(id string, patch JobPatch) (Job, error) + ValidateDeliveryTo func(to string) error