feat: añadir campo Message/Template/Prompt a ScheduledAction y dependencia cron
Se añaden tres campos nuevos a ScheduledAction en internal/config/schema.go: - Message: texto inline para send_message - Template: ruta a archivo .md para send_message o llm_prompt - Prompt: texto inline del prompt para llm_prompt Se agrega github.com/robfig/cron/v3 v3.0.1 como dependencia. No hay cambios de ruptura: los campos son opcionales y el schema existente sigue siendo compatible.
This commit is contained in:
@@ -41,6 +41,7 @@ require (
|
||||
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/rs/zerolog v1.33.0 // indirect
|
||||
github.com/spf13/cast v1.7.1 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
|
||||
@@ -79,6 +79,8 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qq
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
|
||||
@@ -340,6 +340,11 @@ type ScheduledAction struct {
|
||||
Target string `yaml:"target"`
|
||||
Command string `yaml:"command"`
|
||||
Script string `yaml:"script"`
|
||||
|
||||
// Phase 1: send_message and llm_prompt fields
|
||||
Message string `yaml:"message"` // inline text for send_message
|
||||
Template string `yaml:"template"` // path to .md file for send_message
|
||||
Prompt string `yaml:"prompt"` // inline prompt text for llm_prompt
|
||||
}
|
||||
|
||||
type FailureAction struct {
|
||||
|
||||
Reference in New Issue
Block a user