Documentation
¶
Index ¶
- Constants
- Variables
- type App
- func (a *App) FlushRuntimeState() error
- func (a *App) FlushRuntimeStateIfDirty() error
- func (a *App) IsSessionActive(sessionKey string) bool
- func (a *App) LoadRuntimeState(path string) error
- func (a *App) Run(ctx context.Context) error
- func (a *App) RunWithoutConnector(ctx context.Context) error
- func (a *App) SetAutomationRunner(runner AutomationRunner)
- func (a *App) SetBotOpenID(openID string)
- func (a *App) SetCardActionHandler(handler CardActionHandler)
- func (a *App) SetPromptLoader(loader *prompting.Loader)
- func (a *App) UpdateRuntimeConfig(cfg config.Config)
- type Attachment
- type AttachmentDownloader
- type AutomationRunner
- type CardActionHandler
- type CardActionRequest
- type CardActionResult
- type ChatMemberNameResolver
- type Job
- type JobProcessState
- type MentionedUser
- type Processor
- func (p *Processor) FlushSessionState() error
- func (p *Processor) FlushSessionStateIfDirty() error
- func (p *Processor) LoadSessionState(path string) error
- func (p *Processor) ProcessJob(ctx context.Context, job Job) bool
- func (p *Processor) ProcessJobState(ctx context.Context, job Job) JobProcessState
- func (p *Processor) SetBuiltinHelpConfig(cfg config.Config)
- func (p *Processor) SetImmediateFeedback(mode, emojiType string)
- func (p *Processor) SetLLMBackend(backend agentbridge.Backend)
- func (p *Processor) SetPromptLoader(loader *prompting.Loader)
- func (p *Processor) SetReplyMessages(failureMessage, thinkingMessage string)
- func (p *Processor) SetRuntimeAPI(baseURL, token, runtimeBin string)
- func (p *Processor) SetStatusIdentity(botID, botName string)
- func (p *Processor) SetStatusStores(automationStore *automation.Store)
- func (p *Processor) SetStatusUsageSources(sources []StatusUsageSource)
- func (p *Processor) SetWorkspaceDir(workspaceDir string)
- func (p *Processor) UpdateRuntimeConfig(update ProcessorRuntimeUpdate) error
- type ProcessorRuntimeUpdate
- type ReplyContextProvider
- type Sender
- type StatusUsageSource
- type UserNameResolver
Constants ¶
View Source
const ( CardActionDecisionApprove = "approve" CardActionDecisionReject = "reject" )
Variables ¶
View Source
var ErrIgnoreMessage = errors.New("ignore message")
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) FlushRuntimeState ¶
func (*App) FlushRuntimeStateIfDirty ¶
func (*App) IsSessionActive ¶ added in v0.6.62
IsSessionActive reports whether any session matching the given sessionKey's visibility prefix is currently processing a user message. The automation engine calls this before executing a scheduled task to skip execution when the user is actively conversing, avoiding interruption.
Thread isolation: if either the query key or an active key carries a thread-specific token (seed or thread), only sessions in the *same* thread are considered a match. This prevents a conversation in one Feishu work-thread from blocking automation tasks that target a different thread in the same group.
func (*App) LoadRuntimeState ¶
func (*App) RunWithoutConnector ¶ added in v0.6.9
func (*App) SetAutomationRunner ¶
func (a *App) SetAutomationRunner(runner AutomationRunner)
func (*App) SetBotOpenID ¶ added in v0.6.53
func (*App) SetCardActionHandler ¶ added in v0.6.13
func (a *App) SetCardActionHandler(handler CardActionHandler)
func (*App) SetPromptLoader ¶
func (*App) UpdateRuntimeConfig ¶
type Attachment ¶
type AttachmentDownloader ¶
type AttachmentDownloader interface {
DownloadAttachment(ctx context.Context, resourceScopeKey, sourceMessageID string, attachment *Attachment) error
}
type AutomationRunner ¶
type CardActionHandler ¶ added in v0.6.13
type CardActionHandler interface {
HandleCardAction(ctx context.Context, req CardActionRequest) (CardActionResult, error)
}
type CardActionRequest ¶ added in v0.6.13
type CardActionResult ¶ added in v0.6.13
type ChatMemberNameResolver ¶
type Job ¶
type Job struct {
ReceiveID string
ReceiveIDType string
ChatType string
BotID string
BotName string
BotOpenID string
BotUserID string
SoulPath string
SenderName string
SenderOpenID string
SenderUserID string
SenderUnionID string
MentionedUsers []MentionedUser
SourceMessageID string
ReplyParentMessageID string
ThreadID string
RootID string
MessageType string
Text string
Attachments []Attachment
RawContent string
EventID string
ReceivedAt time.Time
ResourceScopeKey string
SessionKey string
SessionVersion uint64
Scene string
ResponseMode string
CreateFeishuThread bool
LLMProvider string
LLMModel string
LLMProfile string
LLMReasoningEffort string
LLMPersonality string
LLMPromptPrefix string
NoReplyToken string
SoulDoc soulDocument
DisableAck bool
WorkflowPhase string
}
type JobProcessState ¶
type JobProcessState string
const ( JobProcessCompleted JobProcessState = "completed" JobProcessRetryAfterRestart JobProcessState = "retry_after_restart" )
type MentionedUser ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewProcessor ¶
func (*Processor) FlushSessionState ¶
func (*Processor) FlushSessionStateIfDirty ¶
func (*Processor) LoadSessionState ¶
func (*Processor) ProcessJobState ¶
func (p *Processor) ProcessJobState(ctx context.Context, job Job) JobProcessState
func (*Processor) SetBuiltinHelpConfig ¶ added in v0.3.12
func (*Processor) SetImmediateFeedback ¶
func (*Processor) SetLLMBackend ¶
func (p *Processor) SetLLMBackend(backend agentbridge.Backend)
func (*Processor) SetPromptLoader ¶
func (*Processor) SetReplyMessages ¶
func (*Processor) SetRuntimeAPI ¶
func (*Processor) SetStatusIdentity ¶ added in v0.5.27
func (*Processor) SetStatusStores ¶ added in v0.5.25
func (p *Processor) SetStatusStores(automationStore *automation.Store)
func (*Processor) SetStatusUsageSources ¶ added in v0.5.27
func (p *Processor) SetStatusUsageSources(sources []StatusUsageSource)
func (*Processor) SetWorkspaceDir ¶ added in v0.6.68
func (*Processor) UpdateRuntimeConfig ¶ added in v0.5.27
func (p *Processor) UpdateRuntimeConfig(update ProcessorRuntimeUpdate) error
type ProcessorRuntimeUpdate ¶ added in v0.5.27
type ReplyContextProvider ¶
type Sender ¶
type Sender = messaging.ConversationSender
type StatusUsageSource ¶ added in v0.5.27
Source Files
¶
- app.go
- app_automation.go
- app_queue.go
- app_state.go
- card.go
- card_action.go
- group_scenes.go
- message.go
- message_identity.go
- message_mentions.go
- message_post.go
- message_session.go
- message_text.go
- message_trigger.go
- outgoing_hidden.go
- outgoing_mentions.go
- outgoing_plaintext.go
- processor.go
- processor_builtin_command.go
- processor_context.go
- processor_flow.go
- processor_runtime_update.go
- processor_status_service.go
- processor_status_usage.go
- processor_user_names.go
- prompt_templates.go
- reply_dispatcher.go
- runtime_store.go
- session_state.go
- session_state_alias.go
- session_state_persist.go
- soul_document.go
- types.go
Click to show internal directories.
Click to hide internal directories.